com.ibm.bpc.clientcore

Interface Command


  1. public interface Command
Represents an action on Business Process Choreographer application objects. Implement this interface to add commands to the Business Process Choregrapher client application. The action's functionality is to be encapsulated in 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.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
(C) Copyright IBM Corporation 2005.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
execute(java.util.List selectedObjects)
Excutes the command on a list of Business Process Choregrapher application objects.
  1. boolean[]
isApplicable(java.util.List itemsOnList)
Checks if the command's preconidtions are met for the list of selected objects.
  1. boolean
isMultiSelectEnabled()
Indicates if the command is enabled for multiple selection.
  1. void
setContext(java.lang.Object context)
Sets the context object for the Command.

Field Detail

  1. static final java.lang.String COPYRIGHT
(C) Copyright IBM Corporation 2005.
See Also:

Method Detail

execute

  1. java.lang.String execute(java.util.List selectedObjects)
  2. throws ClientException
Excutes the command on a list of Business Process Choregrapher application objects.
Parameters:
selectedObjects - The environment must provide the list of application objects on which the Command is to be executed.
Returns:
A String indicating the outcome of the command.
Throws:

isMultiSelectEnabled

  1. boolean isMultiSelectEnabled()
Indicates if the command is enabled for multiple selection.
Returns:
true if the command can handle multiple objects. false if the command can only handle a single object.

isApplicable

  1. boolean[] isApplicable(java.util.List itemsOnList)
Checks if the command's preconidtions are met for the list of selected objects.
Parameters:
itemsOnList - The list of objects to be checked.
Returns:
An array of boolean values which indicate if the Command is applicable to the corresponding item in the list.

setContext

  1. void setContext(java.lang.Object context)
Sets the context object for the Command. A context object provides required information to the command implementation during its execute(List) method.
Parameters:
context - The context object which the command implementation uses.