|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.commands.dataselectors.BaseSelectorCommand
public class BaseSelectorCommand
This class will provide the base functionality for all selector commands.
Field Summary | |
---|---|
protected java.lang.String |
actionClass
|
static java.lang.String |
CANCEL_MODE
Cancel mode indicates the user has canceled his/her changes. |
static java.lang.String |
COMMIT_MODE
Commit mode indicates the user wants to commit his/her changes. |
protected boolean |
complete
|
protected boolean |
contentsChanged
|
protected java.util.HashMap |
eventInfo
|
protected java.lang.Object |
eventSource
|
protected boolean |
modal
|
protected java.lang.String |
mode
The current mode the command is executing in. |
protected java.lang.Object |
model
|
static java.lang.String |
PROCESS_MODE
Process mode is used throughout the interaction with the user. |
protected DataSelectorInterface |
selector
The selector associated with this command. |
protected java.lang.Object |
selectorModel
|
static java.lang.String |
SHOW_MODE
The show mode indicates the selector is to be written to the page in full. |
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface |
---|
COMMAND_NAME_PREFIX |
Constructor Summary | |
---|---|
BaseSelectorCommand()
Default constructor |
|
BaseSelectorCommand(java.lang.String name)
Constructor that accepts a command name. |
|
BaseSelectorCommand(java.lang.String name,
java.lang.String actionClass)
Constructor that accepts a command name and an action class type. |
Method Summary | |
---|---|
void |
cancel()
Cancels the command. |
void |
cancel(java.lang.Object o)
|
protected void |
closeSelector()
Inform the selector that the a commit or cancel has occured. |
protected void |
commit(java.lang.Object o)
|
void |
execute(java.lang.Object o)
This method implements the execute method on the CommandInterface, which is not implemented by the abstract BaseCommand class. |
java.util.HashMap |
getEventInfo()
Returns a HashMap with information about the pending ContentsChangedEvent or null if no event is pending. |
java.lang.Object |
getEventSource()
Returns the source of a pending ContentsChangedEvent event. |
java.lang.String |
getMode()
Gets the current mode of execution for this command. |
java.lang.Object |
getModel()
Gets the data model being viewed or manipulated by the selector. |
DataSelectorInterface |
getSelector()
Gets the parent selector for this command. |
java.lang.Object |
getSelectorModel()
Gets the model used internally by the selector. |
boolean |
isComplete()
Returns a boolean indicating whether the command has been explicitly committed or cancelled. |
boolean |
isContentsChanged()
Returns true if a ContentsChangedEvent should be generated, false otherwise. |
boolean |
isModal()
|
protected void |
process(java.lang.Object o)
|
void |
setComplete(boolean complete)
Set the boolean indicating whether the command has been explicitly committed or cancelled. |
void |
setModal(boolean modal)
|
void |
setMode(java.lang.String value)
Sets the mode of execution for this command. |
void |
setModel(java.lang.Object model)
Sets the data model being viewed or manipulated by the selector. |
void |
setSelector(DataSelectorInterface value)
Sets the command's reference to it's parent selector. |
void |
setSelectorModel(java.lang.Object value)
Sets the model used internally by the selector. |
protected void |
show(java.lang.Object o)
|
Methods inherited from class com.sas.commands.BaseCommand |
---|
getLocale, getName, getNextCommandName, getText, isExecutable, isUndoable, setLocale, setName, setText, undo |
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 |
Field Detail |
---|
protected java.lang.Object model
protected java.lang.Object selectorModel
protected java.util.HashMap eventInfo
protected boolean contentsChanged
protected java.lang.Object eventSource
protected boolean complete
protected boolean modal
public static final java.lang.String SHOW_MODE
public static final java.lang.String PROCESS_MODE
public static final java.lang.String CANCEL_MODE
public static final java.lang.String COMMIT_MODE
protected DataSelectorInterface selector
protected java.lang.String mode
protected java.lang.String actionClass
Constructor Detail |
---|
public BaseSelectorCommand()
public BaseSelectorCommand(java.lang.String name)
name
- the name for this commandpublic BaseSelectorCommand(java.lang.String name, java.lang.String actionClass)
name
- the name for this commandactionClass
- the class name of the associated actionMethod Detail |
---|
public void execute(java.lang.Object o)
execute
in interface DataSelectorCommandInterface
execute
in interface com.sas.util.SimpleCommand
execute
in class BaseCommand
o
- ignored by the default implementationprotected void show(java.lang.Object o)
protected void process(java.lang.Object o)
public void cancel(java.lang.Object o)
public void cancel()
CancelInterface
Common things done in this method:
cancel
in interface CancelInterface
protected void commit(java.lang.Object o) throws java.io.IOException
java.io.IOException
public void setModel(java.lang.Object model)
setModel
in interface DataSelectorCommandInterface
model
- the modelpublic java.lang.Object getModel()
getModel
in interface DataSelectorCommandInterface
public void setSelectorModel(java.lang.Object value)
value
- the selector's modelpublic java.lang.Object getSelectorModel()
public void setSelector(DataSelectorInterface value)
setSelector
in interface DataSelectorCommandInterface
value
- the selector associated with this commandpublic DataSelectorInterface getSelector()
getSelector
in interface DataSelectorCommandInterface
public void setMode(java.lang.String value)
value
- the mode for this commandpublic java.lang.String getMode()
public boolean isContentsChanged()
isContentsChanged
in interface ContentsChangedInterface
public java.util.HashMap getEventInfo()
getEventInfo
in interface ContentsChangedInterface
public java.lang.Object getEventSource()
getEventSource
in interface ContentsChangedInterface
public boolean isComplete()
isComplete
in interface PendingCommandInterface
public void setComplete(boolean complete)
complete
- the boolean indicating whether the command has been explicitly
committed or cancelled.public boolean isModal()
public void setModal(boolean modal)
protected void closeSelector()
If getSelector method returns an instanceof the SelectorCloseInterface, this method will call its close method.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |