|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.commands.CommandImpl
public abstract class CommandImpl
CommandImpl handles the general bookkeeping of the Command interface, including maintaining the dataset, the parent command, and the list of child commands. It also implements execute() with the help of the abstract method executeThisCommand() which derived classes must implement. It also assembles all command types together for this command and descendant commands, based on derived classes' implementations of getCommandType()
| Constructor Summary | |
|---|---|
CommandImpl()
|
|
| Method Summary | |
|---|---|
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.String |
getCommandType()
By default the command type is given by the Constants.COMMAND_PREFIX plus the class name. |
IDataset |
getDataset()
Get the Dataset used by this command. |
java.lang.Object |
getInputProperty(java.lang.String name)
Retrieve the value of the given input property |
java.util.Set<IPrecondition> |
getPreconditions()
Return the set of preconditions for this 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openanzo.commands.Command |
|---|
execute |
| Constructor Detail |
|---|
public CommandImpl()
| Method Detail |
|---|
public void setInputProperty(java.lang.String name,
java.lang.Object value)
Command
setInputProperty in interface Commandname - Name of input propertyvalue - Value of input propertypublic java.lang.Object getInputProperty(java.lang.String name)
name - Name of value to retreive
public void setDataset(IDataset dataset)
Command
setDataset in interface Commanddataset - the dataset where statements are added or removedpublic IDataset getDataset()
Command
getDataset in interface Commandpublic java.lang.String getCommandType()
getCommandType in interface Commandpublic 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 server
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||