com.sas.commands.relational
Class BaseEditCommand

com.sas.commands.relational.BaseEditCommand
All Implemented Interfaces:
CommandSupportedInterface, DynamicAttributeCommandInterface, BaseEntityInterface, BaseEntityValueInterface, EntityKeyInterface, com.sas.lang.StringDataInterface, com.sas.PublicClonable, com.sas.util.Command, com.sas.util.SimpleCommand, java.lang.Cloneable, java.rmi.Remote
Direct Known Subclasses:
CancelCommand, CommitCommand, DeleteCommand, InsertCommand, UpdateCommand

public abstract class BaseEditCommand
implements CommandSupportedInterface

This class implements the basic functionality for an edit command.


Field Summary
 
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
COMMAND_NAME_PREFIX
 
Constructor Summary
BaseEditCommand()
          Default constructor
BaseEditCommand(java.lang.String name)
          Constructor that accepts a command name
BaseEditCommand(java.lang.String name, java.lang.String actionClass)
          Constructor that accepts a command name and an action class type
 
Method Summary
 java.lang.String getChangedCells()
          Sets the value of the changed cells.
 EditNavigationInterface getModel()
          Gets the model of the viewer associated with this command.
 int getRow()
          Gets the editable row number associated with this command.
abstract  boolean isSupported(ActionSupportFilter actionFilter)
          Returns a boolean indicating whether the command is supported for the area specified on the ActionSupportFilter argument.
 void setChangedCells(java.lang.String cells)
          Sets the value of the changed cells.
 void setModel(EditNavigationInterface model)
          Sets the model of the viewer associated with this command.
 void setRow(int row)
          Sets the editable row number associated with this command.
 
Methods inherited from class com.sas.commands.BaseCommand
execute, 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
 

Constructor Detail

BaseEditCommand

public BaseEditCommand()
Default constructor


BaseEditCommand

public BaseEditCommand(java.lang.String name)
Constructor that accepts a command name

Parameters:
name - the name of this command

BaseEditCommand

public BaseEditCommand(java.lang.String name,
                       java.lang.String actionClass)
Constructor that accepts a command name and an action class type

Parameters:
name - the name of this command
actionClass - the name of the action class for this command
Method Detail

setModel

public void setModel(EditNavigationInterface model)
Sets the model of the viewer associated with this command.

Parameters:
model - the model of the viewer associated with this command

getModel

public EditNavigationInterface getModel()
Gets the model of the viewer associated with this command.

Returns:
the model of the viewer associated with this command

setRow

public void setRow(int row)
Sets the editable row number associated with this command.

Parameters:
row - the editable row number associated with this command

getRow

public int getRow()
Gets the editable row number associated with this command.

Returns:
the editable row number associated with this command

setChangedCells

public void setChangedCells(java.lang.String cells)
Sets the value of the changed cells. Its a string containing the names of the editable cells that have a changed value or should be committed. The values are assumed to be seperated by a ";". The names of the editable cells are determined by the viewer doing the editing.

Parameters:
cells - the names of the changed editable cells
See Also:
TableView

getChangedCells

public java.lang.String getChangedCells()
Sets the value of the changed cells. Its a string containing the names of the editable cells that have a changed value or should be committed. The values are assumed to be seperated by a ";". The names of the editable cells are determined by the viewer doing the editing.

Returns:
the names of the changed editable cells
See Also:
TableView

isSupported

public abstract boolean isSupported(ActionSupportFilter actionFilter)
Returns a boolean indicating whether the command is supported for the area specified on the ActionSupportFilter argument. The implementation on this class always return true. Extensions of this class should override this method if there are conditions where the command may not be available or supported.

Specified by:
isSupported in interface CommandSupportedInterface
Parameters:
actionFilter - The object that describes the current area.
Returns:
a boolean indicating whether the command is supported.
See Also:
BaseAction.setReturnStatus(int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.