Data types for parameters passed to extensions?

I’m working on a pre-processing extension and am puzzled about how to pass parameters with the correct data types.

I would like to pass the text of a content item field as one of the parameters - I don’t want the extension to have to retrieve the value from the field, rather I just want to pass the value. The extension is designed to work with that parameter value as a Java String, and works correctly in my Java test environment (outside CM System)

I can’t figure out how to enter the correct information into the parameter dialog when I add the extension to the Pre-Processing tab in the content type definition. I get correct behavior when I put a string literal as the parameter value (no surprise there). I expected that selecting “Content Data” and then the field name (“ovpid”) as the parameter value would result in the field value being passed to the extension as a String. it appears in the dialog as PSXContentItemData/ovpid. Instead I get two different problems.

When creating a new item (i.e. the extension runs before the item actually exists), I get this error in the Content Editor window (instead of getting the fields and labels):


<Error id="0">
An error occurred while pre-processing the request submitted by the host (-not available-).
</Error>
<Error id="1">contentid may not be null</Error>

I don’t know why this error is appearing - it’s not an error from my extension.

When editing an existing item, which does have a value in the ovpid field, I get a stack overflow error. I’m not getting any logging information - I suspect it’s not even getting to the point where it runs the extension code. Here’s the error:

java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject$SecureSet.contains(Unknown Source)
at java.util.AbstractCollection.containsAll(Unknown Source)
at java.util.AbstractSet.equals(Unknown Source)

at com.percussion.cms.objectstore.server.PSServerItem.load(Unknown Source)
at com.percussion.cms.objectstore.server.PSServerItem.<init>(Unknown Source)
at com.percussion.data.PSContentItemDataExtractor.extract(Unknown Source)
at com.percussion.data.PSContentItemDataExtractor.extract(Unknown Source)

Does anyone know what type of Object is passed to the extension when you select PSXContentItemData/<fieldname>? FYI, The method signature for the extension shows the parameter array as an array of Objects:

public void preProcessRequest(Object[] params, IPSRequestContext request)
throws PSAuthorizationException, PSRequestValidationException,
PSParameterMismatchException, PSExtensionProcessingException

Thanks for any ideas -
Kathleen