public interface Command
execute(List)
.
The command implementation must check any preconditions and the context before it performs the
execute method. If the execute method succeeds, it returns a String
to indicate the result.
The caller can use this string to determine the following actions, e.g. determine the next
view on the user interface. If the execute method fails, it throws a ClientException
.
If the command is used as a batch command, the command can report several exceptions that relate to diverent items using an
ErrorsInCommandException
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
(C) Copyright IBM Corporation 2005.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
execute(java.util.List selectedObjects)
Excutes the command on a list of Business Process Choregrapher application objects.
|
boolean[] |
isApplicable(java.util.List itemsOnList)
Checks if the command's preconidtions are met for the list of selected objects.
|
boolean |
isMultiSelectEnabled()
Indicates if the command is enabled for multiple selection.
|
void |
setContext(java.lang.Object context)
Sets the context object for the
Command . |
static final java.lang.String COPYRIGHT
java.lang.String execute(java.util.List selectedObjects) throws ClientException
selectedObjects
- The environment must provide the list of application objects on which the Command is to be executed.ClientException
boolean isMultiSelectEnabled()
boolean[] isApplicable(java.util.List itemsOnList)
itemsOnList
- The list of objects to be checked.Command
is applicable to the corresponding item in the list.void setContext(java.lang.Object context)
Command
. A context object provides required information to the command implementation during
its execute(List)
method.context
- The context object which the command implementation uses.