|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.commands.BaseCommand
public abstract class BaseCommand
BaseCommand is the base class for all commands.
The logic to perform the operation is implemented in the execute() method.
execute(java.lang.Object)
Field Summary |
---|
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface |
---|
COMMAND_NAME_PREFIX |
Constructor Summary | |
---|---|
BaseCommand()
Default constructor |
|
BaseCommand(java.lang.String name)
Name Constructor |
Method Summary | |
---|---|
abstract void |
execute(java.lang.Object o)
Executes this command. |
java.util.Locale |
getLocale()
Returns the command's locale |
java.lang.String |
getName()
Returns the name of the command. |
static java.lang.String |
getNextCommandName()
Returns a unique command name. |
java.lang.String |
getText()
Placeholder to satisy interface requirements. |
boolean |
isExecutable()
Returns the boolean indicating whether the command is in a state that it can be executed. |
boolean |
isUndoable()
Returns the boolean indicating whether the last operation this command executed can be undone ( rolled back ). |
void |
setLocale(java.util.Locale loc)
Sets the command's locale |
void |
setName(java.lang.String name)
Sets the name of the command. |
void |
setText(java.lang.String text)
Placeholder to satisy interface requirements. |
void |
undo()
Tells the command to undo its previous operation. |
Methods inherited from class com.sas.entities.BaseEntity |
---|
clone, containsAttributeNamed, equals, equals, getAttribute, getAttribute, getAttributeCount, getAttributes, getEntityKey, getPropertyDescriptors, getStringAttribute, listAttributeNames, removeAllAttributes, removeAttribute, reset, sameEntity, setAttribute, setAttributes, setEntityKey, toString |
Methods inherited from interface com.sas.entities.BaseEntityValueInterface |
---|
getAttribute, setAttribute |
Methods inherited from interface com.sas.util.Command |
---|
clone |
Constructor Detail |
---|
public BaseCommand()
public BaseCommand(java.lang.String name)
Method Detail |
---|
public java.lang.String getName()
getName
in interface DynamicAttributeCommandInterface
setName(java.lang.String)
public void setName(java.lang.String name)
To ensure unique command names
use the getNextCommandName()
method.
setName
in interface DynamicAttributeCommandInterface
name
- unique name of the command.getName()
public void setLocale(java.util.Locale loc)
loc
- the localegetLocale()
public java.util.Locale getLocale()
setLocale(java.util.Locale)
public static java.lang.String getNextCommandName()
Convenience method for ensuring commands are given unique names.
setName(java.lang.String)
public void undo()
Default operation does nothing.
undo
in interface com.sas.util.Command
isUndoable()
public boolean isUndoable()
Default value is false
isUndoable
in interface com.sas.util.Command
undo()
public boolean isExecutable()
Default value is true
isExecutable
in interface com.sas.util.Command
public void setText(java.lang.String text)
Does nothing
setText
in interface com.sas.lang.StringDataInterface
text
- the command's textgetText()
public java.lang.String getText()
getText
in interface com.sas.lang.StringDataInterface
setText(java.lang.String)
public abstract void execute(java.lang.Object o)
execute
in interface com.sas.util.SimpleCommand
o
- The output stream to which the results of this command should be written.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |