|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.ogsadai.client.toolkit.activity.BaseActivity
public abstract class BaseActivity
Abstract base class that can be used for client toolkit activity implementations.
| Constructor Summary | |
|---|---|
BaseActivity(ActivityName activityName)
Constructor. |
|
| Method Summary | |
|---|---|
void |
buildRequest(RequestBuilder builder)
Builds a request by writing details to the given request builder. |
ActivityName |
getActivityName()
Gets the activity name. |
protected SingleActivityOutput[] |
getConnectedOutputs(ActivityOutput[] outputs)
Filters an array of activity outputs returning an array of those that are connected. |
Message[] |
getErrorMessages()
Gets the error messages associated with the activity. |
protected ActivityInputDescriptor[] |
getInputDescriptors()
Gets the input descriptors that describe the operational inputs of the activity. |
protected abstract ActivityInput[] |
getInputs()
Gets the inputs associated with the activity. |
ActivityInstanceName |
getInstanceName()
Gets the activity instance name. |
protected abstract ActivityOutput[] |
getOutputs()
Gets the outputs associated with the activity. |
RequestAndStatusHandler |
getRequestAndStatusHandler()
Gets an interface through which requests can be built and request status handled. |
protected Server |
getServer()
Gets the server associated with this activity. |
ActivityStatus |
getStatus()
Gets the activity status. |
Message[] |
getWarnings()
Gets the warnings associated with the activity. |
boolean |
hasErrorMessages()
Gets whether or not the activity has any error messages. |
boolean |
hasWarnings()
Gets whether not the activity has reported any warnings. |
void |
processRequestStatus(RequestStatus requestStatus)
Processes the given request status. |
void |
setActivityName(ActivityName activityName)
Sets the name of the activity to invoke. |
void |
setServer(Server server)
Sets the server associated with this resource. |
java.lang.String |
toString()
|
protected abstract void |
validateIOState()
Validates the state of the activity inputs and outputs. |
protected void |
validateState()
Validates the state of the activity to ensure it has a complete and consistent set of inputs and outputs. |
protected java.lang.String |
writeToString(boolean includeResourceID,
ResourceID resourceID)
Writes the activity as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseActivity(ActivityName activityName)
activityName - the default activity name.| Method Detail |
|---|
public ActivityName getActivityName()
Activity
getActivityName in interface Activitypublic ActivityInstanceName getInstanceName()
Activity
getInstanceName in interface Activitypublic ActivityStatus getStatus()
Activity
getStatus in interface Activitynull if there the activity
status has not yet been obtained from the server. This would
be the case if the request has not yet been passed to the server.public boolean hasErrorMessages()
Activity
hasErrorMessages in interface Activitytrue if the activity has error messages,
false otherwise.public Message[] getErrorMessages()
getErrorMessages in interface Activitypublic boolean hasWarnings()
hasWarnings in interface Activitytrue if the activity has reported warnings,
false otherwise.public Message[] getWarnings()
getWarnings in interface Activitypublic void setActivityName(ActivityName activityName)
Activity
setActivityName in interface ActivityactivityName - Name of the activity to invoke.public RequestAndStatusHandler getRequestAndStatusHandler()
Activity
getRequestAndStatusHandler in interface Activitypublic void setServer(Server server)
RequestAndStatusHandler
setServer in interface RequestAndStatusHandlerserver - the server associated with this resource.
public void buildRequest(RequestBuilder builder)
throws ActivityIllegalStateException
RequestAndStatusHandler
buildRequest in interface RequestAndStatusHandlerbuilder - request builder user to build the request.
ActivityIllegalStateException - if the request cannot be built because an activity is in an illegal
state.public void processRequestStatus(RequestStatus requestStatus)
RequestAndStatusHandler
processRequestStatus in interface RequestAndStatusHandlerrequestStatus - request status to process.protected Server getServer()
null
if no server has been set.protected ActivityInputDescriptor[] getInputDescriptors()
protected void validateState()
throws ActivityIllegalStateException
ActivityIllegalStateException - if the activity is not in a valid state.
protected abstract void validateIOState()
throws ActivityIOIllegalStateException
ActivityIOIllegalStateException - if an activity input is not in a valid state.protected abstract ActivityInput[] getInputs()
protected abstract ActivityOutput[] getOutputs()
protected SingleActivityOutput[] getConnectedOutputs(ActivityOutput[] outputs)
outputs - array of activity outputs
public java.lang.String toString()
toString in class java.lang.Object
protected java.lang.String writeToString(boolean includeResourceID,
ResourceID resourceID)
includeResourceID - should a resource ID be listed.resourceID - resource ID to list.
String describing the activity.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||