com.adobe.idp.dsc
Interface InvocationResponse


public interface InvocationResponse

A InvocationResponse is used to encapsulate the result of an InvocationRequest. If the operation is invoked synchronously, the InvocationResponse contains the result of the target operation. If the operation is invoked asynchronously, the InvocationResponse returns the job identifier that can be used to get the status of the job.

For information about handling an invocation response that is sent back from a Adobe Experience Manager forms service, see Invoking Adobe Experience Manager forms Services.


Method Summary
 java.util.Map getClientParameters()
          Returns a map of the parameters specified in the invocation request.
 java.lang.String getInvocationId()
          Returns the invocation identifier of the Adobe Experience Manager forms service operation that is invoked and is marked long-lived in the component.xml file.
 java.lang.String getJobId()
          Deprecated.  
 java.lang.Object getOutputParameter(java.lang.String parameterName)
          Gets the value of an output parameter.
 java.util.Map getOutputParameters()
          Gets the invocation result in a map that cannot be modified.
 java.lang.Object getProperty(java.lang.String propertyName)
          Retrieves the value of a property that is returned within this invocation request.
 java.lang.Object getProperty(java.lang.String propertyName, java.lang.Object defaultValue)
          Retrieves a response property.
 java.lang.Object removeProperty(java.lang.String propertyName)
          Removes a property from the invocation response.
 void setOutputParameter(java.lang.String parameterName, java.lang.Object value)
          Sets the value of an output parameter.
 void setProperty(java.lang.String propertyName, java.lang.Object defaultValue)
          Specifies a response property.
 

Method Detail

setOutputParameter

void setOutputParameter(java.lang.String parameterName,
                        java.lang.Object value)
Sets the value of an output parameter. Adobe Experience Manager forms uses this method to set a key-value pair of an output parameter of an invocation response.

Parameters:
parameterName - The name of the specified output parameter.
value - The value of the specified output parameter.

getOutputParameter

java.lang.Object getOutputParameter(java.lang.String parameterName)
Gets the value of an output parameter. A client application uses this method to retrieve the output result of an InvocationRequest.

Parameters:
parameterName - The name of the output parameter.
Returns:
The value of the specified output parameter.

getOutputParameters

java.util.Map getOutputParameters()
Gets the invocation result in a map that cannot be modified. The map contains the results of the invocation request. For example, consider the following invocation request:
Map params = new HashMap();
FileInputStream fileInputStream = new FileInputStream("C:\\MapPasswordEncrypt.pdf");
Document inDoc = new Document ;(fileInputStream);
String myPassword = "password2";
params.put("inDocument", inDoc);
params.put("password", myPassword);
InvocationRequest request = myFactory.createInvocationRequest("EncryptionService", "removePDFPasswordSecurity",params,true);
InvocationResponse response = myServiceClient.invoke(request);
Object returnValue[] = response.getOutputParameters().values().toArray();

In this situation, this method returns a map object that contains an unsecured PDF document (the removePDFPasswordSecurity operation removed password-based encryption from the PDF document).

Returns:
An unmodifiable map that contains key-value pairs.
See Also:
Collections.UnmodifiableMap

getJobId

java.lang.String getJobId()
Deprecated. 

Retrieves the job identifier.

Returns:
The job identifier.

getInvocationId

java.lang.String getInvocationId()
Returns the invocation identifier of the Adobe Experience Manager forms service operation that is invoked and is marked long-lived in the component.xml file.

Returns:
A string value that represents the invocation identifier.

getProperty

java.lang.Object getProperty(java.lang.String propertyName)
Retrieves the value of a property that is returned within this invocation request.

Parameters:
propertyName - The name of the property.
Returns:
The value of the specified property. If the specified property does not exist, the method returns a null value.
See Also:
setProperty()

getProperty

java.lang.Object getProperty(java.lang.String propertyName,
                             java.lang.Object defaultValue)
Retrieves a response property.

Parameters:
propertyName - The name of the property to retrieve.
defaultValue - A default value if the property does not exist in the invocation request.
Returns:
The property value or the default value if the property does not exist.
See Also:
getProperty(), setProperty()

setProperty

void setProperty(java.lang.String propertyName,
                 java.lang.Object defaultValue)
Specifies a response property.

Parameters:
propertyName - The name of the property.
defaultValue - A default value if the property does not exist in the invocation request.
See Also:
InvocationResponse.getProperty(String)

removeProperty

java.lang.Object removeProperty(java.lang.String propertyName)
Removes a property from the invocation response.

Parameters:
propertyName - The name of the property to remove.
Returns:
The value of the removed property.
See Also:
getProperty(), setProperty()

getClientParameters

java.util.Map getClientParameters()
Returns a map of the parameters specified in the invocation request. Consider the following invocation request that is sent to the Encryption service to remove password-based encryption from a PDF document:
Map params = new HashMap();
FileInputStream fileInputStream = new FileInputStream("C:\\MapPasswordEncrypt.pdf");
Document inDoc = new Document ;(fileInputStream);
String myPassword = "password2";
params.put("inDocument", inDoc);
params.put("password", myPassword);
InvocationRequest request = myFactory.createInvocationRequest("EncryptionService", "removePDFPasswordSecurity",params,true);

In this situation, this method returns a java.util.map object that contains a com.adobe.idp.Document object that was passed to the inDocument parameter and a string value that was passed to the to the password parameter. For information about creating an invocation request, see Invoking Adobe Experience Manager forms Services.

Returns:
A map of the parameters used in the invocation request.