|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.RequestComponent | +--uk.org.ogsadai.client.toolkit.activity.Activity | +--uk.org.ogsadai.client.toolkit.activity.delivery.DeliverToAttachment
This activity delivers data to an attachment that will be sent with the response message.
Activity ouput stores a value of the Content-Id MIME header identifying attachment that holds the proper activity output data. This data can be accessed using AttachmentManager that can be obtained from the Response object.
See usage example below.
List data = new ArrayList();
data.add("data");
DataStore ds = new DataStore(data);
DeliverToAttachment dta = new DeliverToAttachment();
dta.setInput(ds.getOutput());
ActivityRequest request = new ActivityRequest();
request.add(ds);
request.add(dta);
// Perform request
Response response = dataservice.perform(request);
// Get attachment manager from response
AttachmentManager attMgr = response.getAttachmentManager();
// Get Content-Id MIME Header value
String contentID = dta.getOutput().getData();
// Extract data as string from attachment identified by Content-Id
String dataRcv = attMgr.getAttachmentAsString(contentID);
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static org.apache.log4j.Logger |
LOG
|
private boolean |
mIsSessionSpecific
Is the resource property to be session specfic. |
private javax.xml.namespace.QName |
mResourcePropertyName
Name of resource property that output is written to. |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
DeliverToAttachment()
Constructs the activity. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity output. |
void |
setInput(ActivityOutput input)
Connected the input of this activity to output of another activity. |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
getDataService, getName, getSession, setDataService, setSession |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final org.apache.log4j.Logger LOG
private javax.xml.namespace.QName mResourcePropertyName
private boolean mIsSessionSpecific
Constructor Detail |
public DeliverToAttachment()
Method Detail |
public final void setInput(ActivityOutput input)
input
- output from another activity
java.lang.IllegalArgumentException
- if the argument is nullpublic ActivityOutput getOutput()
protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |