uk.org.ogsadai.client.toolkit.activity
Class ActivityInputParameterImpl

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.ActivityInputParameterImpl
All Implemented Interfaces:
ActivityInputParameter, ActivityInputParameterInternal

class ActivityInputParameterImpl
extends java.lang.Object
implements ActivityInputParameterInternal, ActivityInputParameter

Represents details of an activity input parameter.

Each activity can have a number of inputs and outputs. Inputs must be connected to the outputs from other activities.

Implements both the internally and externally visible interfaces to an activity input parameter. The internal view includes various setter methods that are excluded from the external view.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  boolean mIsOptional
          Flags whether this input is optional or not
private  java.lang.String mName
          Parameter name.
private  java.lang.String mOutputName
          Name of output that is attached to this input.
 
Constructor Summary
(package private) ActivityInputParameterImpl(java.lang.String parameterName)
          Create a new input parameter with the specified name.
 
Method Summary
 java.lang.String getName()
          Gets the name of the input parameter.
 java.lang.String getOutputName()
          Gets the name of the activity output that is the input to this parameter.
 boolean isOptional()
          Gets whether or not this input parameter can be regarded as optional or not.
 void setIsOptional(boolean isOptional)
          Sets whether or not this input is optional.
 void setOutputName(java.lang.String outputName)
          Sets the name of the output that will be the input to this parameter.
 java.lang.String toString()
          Returns a brief description of this activity input parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mName

private java.lang.String mName
Parameter name. This is not used internally but is purely a label that can be attached to the activity input if the inputs are to be displayed to the user for some reason.


mOutputName

private java.lang.String mOutputName
Name of output that is attached to this input.


mIsOptional

private boolean mIsOptional
Flags whether this input is optional or not

Constructor Detail

ActivityInputParameterImpl

ActivityInputParameterImpl(java.lang.String parameterName)
Create a new input parameter with the specified name. The parameter will have no corresponding output name. The parameter is not optional.

Parameters:
parameterName - Name of parameter - this is purely a label that can be attached to the input if the inputs are being listed for some reason.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ActivityInputParameter
Gets the name of the input parameter.

This name has no real internal purpose. It is intended purely as a label that can be attached to the input if the inputs are to be displayed to the user.

Specified by:
getName in interface ActivityInputParameter
Returns:
the input parameter name.

getOutputName

public java.lang.String getOutputName()
Description copied from interface: ActivityInputParameter
Gets the name of the activity output that is the input to this parameter.

Note that this is the name of the output not the name of the an output parameter. Multiple activities may have outputs that share the same parameter name (for example 'QueryResult') but each output for each activity will have a unique output name.

Specified by:
getOutputName in interface ActivityInputParameter
Returns:
name of the output that is the input to this parameter, or null if the output has not yet been specified.

setOutputName

public void setOutputName(java.lang.String outputName)
Description copied from interface: ActivityInputParameterInternal
Sets the name of the output that will be the input to this parameter.

Specified by:
setOutputName in interface ActivityInputParameterInternal
Parameters:
outputName - Name of activity output.

isOptional

public boolean isOptional()
Description copied from interface: ActivityInputParameter
Gets whether or not this input parameter can be regarded as optional or not.

Specified by:
isOptional in interface ActivityInputParameter
Returns:
true is the input is optional, false otherwise.

setIsOptional

public void setIsOptional(boolean isOptional)
Description copied from interface: ActivityInputParameterInternal
Sets whether or not this input is optional.

Specified by:
setIsOptional in interface ActivityInputParameterInternal
Parameters:
isOptional - true if the input is optional, false otherwise.

toString

public java.lang.String toString()
Description copied from interface: ActivityInputParameter
Returns a brief description of this activity input parameter. The exact details are subject to change but at present the format is:
[ActivityInputParameter: name = 'query' output = 'f6373a5f' optional = false]

Specified by:
toString in interface ActivityInputParameter
Overrides:
toString in class java.lang.Object
Returns:
brief description of this activity input parameter.