|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.commands.CommandChain
public class CommandChain
An CommandChain is an Command that is made up of a chain of Commands that get executed in order. The output of each command is placed in the input properties of the next command to reference if needed.
| Constructor Summary | |
|---|---|
CommandChain()
|
|
| Method Summary | |
|---|---|
void |
addCommand(Command command)
Add a command to the end of this command chain |
void |
addPrecondition(IPrecondition precondition)
Add a precondition to this command that will get evaluated on the server to decide if the command can get commited. |
java.lang.Object |
execute()
Method that is executed by local transaction manager when this command is processed. |
java.lang.String |
getCommandType()
Returns a string representing the command type encompassed by this command. |
IDataset |
getDataset()
Get the Dataset used by this command. |
java.util.Set<IPrecondition> |
getPreconditions()
Return the set of preconditions for this command. |
void |
linkCommand(Command targetCommand,
java.lang.String propertyName,
Command sourceCommand)
Linking commands allows for linking the output of one command to the input of another command. |
void |
setDataset(IDataset dataset)
Set the Dataset used by this command, for example to create new resources. |
void |
setInputProperty(java.lang.String name,
java.lang.Object value)
An input property is a name/value pair that can be used by the command during its execution. |
void |
setPreconditions(java.util.Set<IPrecondition> preconditions)
Set this commands preconditions to the given set. |
void |
setTransactionQueueHandler(ITransactionQueueManager transactionQueueHandler)
Set the transactionQueueHandler on which this command is to execute |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandChain()
| Method Detail |
|---|
public void addCommand(Command command)
command - Command to add to end of chain.
public void linkCommand(Command targetCommand,
java.lang.String propertyName,
Command sourceCommand)
throws AnzoException
targetCommand - Command on which input property is being setpropertyName - Name of the property under which to store the output of the source commandsourceCommand - Command whose output is used as input to the target command's input properties
AnzoException - if the source command is not a member of this chainpublic java.lang.Object execute()
Command
execute in interface Commandpublic IDataset getDataset()
Command
getDataset in interface Commandpublic void setDataset(IDataset dataset)
Command
setDataset in interface Commanddataset - the dataset where statements are added or removedpublic java.lang.String getCommandType()
Command
getCommandType in interface Command
public void setInputProperty(java.lang.String name,
java.lang.Object value)
Command
setInputProperty in interface Commandname - Name of input propertyvalue - Value of input propertypublic void addPrecondition(IPrecondition precondition)
Command
addPrecondition in interface Commandprecondition - Precondition that is evaluated on the serverpublic java.util.Set<IPrecondition> getPreconditions()
Command
getPreconditions in interface Commandpublic void setPreconditions(java.util.Set<IPrecondition> preconditions)
Command
setPreconditions in interface Commandpreconditions - Set of preconditions that are evaluated on the serverpublic void setTransactionQueueHandler(ITransactionQueueManager transactionQueueHandler)
transactionQueueHandler - the transactionQueueHandler on which this command is to execute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||