uk.org.ogsadai.client.toolkit.activity.delivery
Class DeliverToResourceProperty

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.delivery.DeliverToResourceProperty

public class DeliverToResourceProperty
extends Activity

Activity that delivers its input to a specified resource property. The input to this activity must blocks of strings. The single string constructed from concatinating all the strings will be written to the specified resource property.

The activity has one input - blocks of strings - and no outputs.

Author:
OGSA-DAI team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  boolean mIsSessionSpecific
          Is the resource property to be session specific.
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
DeliverToResourceProperty(javax.xml.namespace.QName resourcePropertyName)
          Constructs the activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 javax.xml.namespace.QName getResourcePropertyName()
          Gets the name of the resource property.
 javax.xml.namespace.QName getResourcePropertyName(SessionID sessionID)
          Gets the name of the session-specific resource property.
 void setInput(ActivityOutput input)
          Sets the input of this activity to be the output from another activity that will provide the data to be stored.
 void setResourcePropertyName(javax.xml.namespace.QName resourcePropertyName)
          Sets the name of the resource property.
 void setSessionSpecific(boolean sessionSpecific)
          Sets whether or not the resource property is specific to the session.
 
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

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mResourcePropertyName

private javax.xml.namespace.QName mResourcePropertyName
Name of resource property that output is written to.


mIsSessionSpecific

private boolean mIsSessionSpecific
Is the resource property to be session specific.

Constructor Detail

DeliverToResourceProperty

public DeliverToResourceProperty(javax.xml.namespace.QName resourcePropertyName)
Constructs the activity. By default the resource property will be session specific. The activity providing the input data must be set using setInput.

Parameters:
resourcePropertyName - The name of the resource property into which to write the input. If the resource property is session specific then this name of the resource property will be this name appended with "-" followed by the session ID.
Throws:
java.lang.IllegalArgumentException - If resourcePropertyName is null.
Method Detail

setResourcePropertyName

public void setResourcePropertyName(javax.xml.namespace.QName resourcePropertyName)
Sets the name of the resource property.

Parameters:
resourcePropertyName - The name of the resource property into which to write the input data.
Throws:
java.lang.IllegalArgumentException - If resourcePropertyName is null.

getResourcePropertyName

public javax.xml.namespace.QName getResourcePropertyName()
Gets the name of the resource property.

Returns:
the name of the resource property into which to write the

getResourcePropertyName

public javax.xml.namespace.QName getResourcePropertyName(SessionID sessionID)
Gets the name of the session-specific resource property. This is the resource property name with "-" followed by the session ID appended.

Parameters:
sessionID - ID of the session that executed the activity.
Returns:
the name of the resource property to which the data has been delivered.
Throws:
java.lang.IllegalArgumentException - If sessionID is null.

setSessionSpecific

public void setSessionSpecific(boolean sessionSpecific)
Sets whether or not the resource property is specific to the session. If it is specific to the session the resource property name will be appened with "-" followed by the session ID.

Parameters:
sessionSpecific - Is the resource property to be session specific?

setInput

public final void setInput(ActivityOutput input)
Sets the input of this activity to be the output from another activity that will provide the data to be stored.

Parameters:
input - Output from another activity.
Throws:
java.lang.IllegalArgumentException - If input is null.

generateXML

protected java.lang.String generateXML()
Description copied from class: RequestComponent
Generates the XML representing the activity. This XML can then be inserted into a perform document that is sent to a data service.

Specified by:
generateXML in class Activity
Returns:
the XML for the activity