com.sas.commands.dataselectors
Class FilterAndRankSelectorCommand

com.sas.commands.dataselectors.FilterAndRankSelectorCommand
All Implemented Interfaces:
CommandStatusInterface, CommandSupportedInterface, CancelInterface, ContentsChangedInterface, DataSelectorCommandInterface, DynamicAttributeCommandInterface, PendingCommandInterface, BaseEntityInterface, BaseEntityValueInterface, EntityKeyInterface, com.sas.lang.StringDataInterface, com.sas.PublicClonable, com.sas.util.Command, com.sas.util.SimpleCommand, java.lang.Cloneable, java.rmi.Remote

public class FilterAndRankSelectorCommand
implements CommandSupportedInterface, CommandStatusInterface

This class provides command support for the "Filter and Rank" Selector. Ideally, the command class will perform all the modifications to the Selector model. The selector should react to the ContentsChangedEvents fired off after the model changes.


Field Summary
protected  java.util.Map actionInfo
          The action map
static java.lang.String mode
           
static java.lang.String RB_KEY
          RB key for internationalization
protected  TupleElementInterface tupleElement
          Tuple Element for this command
 
Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
actionClass, CANCEL_MODE, COMMIT_MODE, complete, contentsChanged, eventInfo, eventSource, modal, model, PROCESS_MODE, selector, selectorModel, SHOW_MODE
 
Fields inherited from interface com.sas.actionprovider.CommandStatusInterface
DISABLED, ENABLED, IS_CURRENT_STATE_DISABLED, MODEL_MEMBER_DISABLED, MODEL_STATE_DISABLED, MODEL_TYPE_DISABLED
 
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
COMMAND_NAME_PREFIX
 
Constructor Summary
FilterAndRankSelectorCommand()
          The default constructor for this command.
FilterAndRankSelectorCommand(java.lang.String name)
          Constructor that accepts a command name.
FilterAndRankSelectorCommand(java.lang.String name, java.lang.String actionClass)
          Constructor that accepts a command name and an action class type.
 
Method Summary
 void cancel(java.lang.Object o)
          The cancel method resets the model to its original state and hides or destroys the selector visual.
protected  void cleanUp()
           
protected  void commit(java.lang.Object o)
          The commit method alters the original model to reflect any changes made by the user and hides or destroys the selector visual.
 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.lang.String getAction()
          Returns the current action of the selector command.
 java.lang.String getClearCol()
           
 java.lang.String getClearRow()
           
 int getCommandStatus(ActionSupportFilter filter)
          Returns a int value indicating whether the command is enabled for the given area as specified by the current area information encapsulate in the ActionSupportFilter.
 java.lang.String getFilterCondition()
           
 java.lang.String getFilterType()
           
 java.lang.String getFilterValue()
           
protected static java.lang.String getID(java.lang.Object object)
           
 java.lang.String getRankOption()
           
 java.lang.String getRankOrder()
           
 java.lang.String getRankType()
           
 java.lang.String getRankValue()
           
 TupleElementInterface getTupleElement()
          Get the tupleElement set on the command.
 boolean isSupported(ActionSupportFilter actionFilter)
          Returns TRUE if the command is supported given the contents of the support filter.
protected  boolean isSwing()
           
protected  void process(java.lang.Object o)
          Processes the request object to manipulate the model.
 void setAction(java.lang.String value)
          Sets the current action of the selector command.
 void setClearCol(java.lang.String clearCol)
           
 void setClearRow(java.lang.String clearRow)
           
 void setFilterCondition(FilterOperatorEnum filterCondition)
           
 void setFilterCondition(java.lang.String name)
           
 void setFilterType(FilterTypeEnum filterType)
           
 void setFilterType(java.lang.String typeText)
           
 void setFilterValue(java.lang.String filterValue)
           
 void setModel(java.lang.Object model)
          Sets the data model being viewed or manipulated by the selector.
 void setRankOption(java.lang.String rankOption)
           
 void setRankOrder(RankOrderEnum order)
           
 void setRankOrder(java.lang.String text)
           
 void setRankType(RankTypeEnum rankType)
           
 void setRankType(java.lang.String text)
           
 void setRankValue(java.lang.String rankValue)
           
 void setTupleElement(TupleElementInterface tupleElement)
          set the tupleElement set on the command
protected  void show(java.lang.Object o)
          Creates the initial selector model from the stored data model and supplies it to the associated selector.
 
Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
cancel, closeSelector, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, setComplete, setModal, setMode, setSelector, setSelectorModel
 
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

RB_KEY

public static final java.lang.String RB_KEY
RB key for internationalization

See Also:
Constant Field Values

actionInfo

protected java.util.Map actionInfo
The action map


mode

public static java.lang.String mode

tupleElement

protected TupleElementInterface tupleElement
Tuple Element for this command

Constructor Detail

FilterAndRankSelectorCommand

public FilterAndRankSelectorCommand()
The default constructor for this command.


FilterAndRankSelectorCommand

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

Parameters:
name - the name of this command

FilterAndRankSelectorCommand

public FilterAndRankSelectorCommand(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 class name for the appropriate action
Method Detail

show

protected void show(java.lang.Object o)
Creates the initial selector model from the stored data model and supplies it to the associated selector.

Overrides:
show in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

cleanUp

protected void cleanUp()

isSwing

protected boolean isSwing()

process

protected void process(java.lang.Object o)
Processes the request object to manipulate the model. The selector then represents these changes for the user.

Overrides:
process in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

cancel

public void cancel(java.lang.Object o)
The cancel method resets the model to its original state and hides or destroys the selector visual.

Overrides:
cancel in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

commit

protected void commit(java.lang.Object o)
               throws java.io.IOException
The commit method alters the original model to reflect any changes made by the user and hides or destroys the selector visual.

Overrides:
commit in class BaseSelectorCommand
Parameters:
o - ignored in this implementation
Throws:
java.io.IOException

getFilterCondition

public java.lang.String getFilterCondition()

setFilterCondition

public void setFilterCondition(FilterOperatorEnum filterCondition)

setFilterCondition

public void setFilterCondition(java.lang.String name)

setAction

public void setAction(java.lang.String value)
Sets the current action of the selector command.

Parameters:
value - the action being executed

getAction

public java.lang.String getAction()
Returns the current action of the selector command.

Returns:
the current action

getID

protected static java.lang.String getID(java.lang.Object object)

getCommandStatus

public int getCommandStatus(ActionSupportFilter filter)
Returns a int value indicating whether the command is enabled for the given area as specified by the current area information encapsulate in the ActionSupportFilter. If not enabled, the key indicates a reason why the command is not enabled.

Specified by:
getCommandStatus in interface CommandStatusInterface
Parameters:
filter - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
Returns:
an int value indicating whether the command is enabled and, if not, why.
See Also:
BaseAction.setReturnStatus(int)

isSupported

public boolean isSupported(ActionSupportFilter actionFilter)
Returns TRUE if the command is supported given the contents of the support filter.

Specified by:
isSupported in interface CommandSupportedInterface
Parameters:
actionFilter - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
Returns:
a boolean indicating whether the command is supported
See Also:
BaseAction.setReturnStatus(int)

execute

public void execute(java.lang.Object o)
Description copied from class: BaseSelectorCommand
This method implements the execute method on the CommandInterface, which is not implemented by the abstract BaseCommand class.

Specified by:
execute in interface DataSelectorCommandInterface
Specified by:
execute in interface com.sas.util.SimpleCommand
Overrides:
execute in class BaseSelectorCommand
Parameters:
o - ignored by the default implementation

setTupleElement

public void setTupleElement(TupleElementInterface tupleElement)
set the tupleElement set on the command

Parameters:
tupleElement - set the element on the command

getTupleElement

public TupleElementInterface getTupleElement()
Get the tupleElement set on the command. If this is a non swing case, a tupleElement is derived from the axis index, tuple index and the element index

Returns:
tuple element for the command

setModel

public void setModel(java.lang.Object model)
Description copied from class: BaseSelectorCommand
Sets the data model being viewed or manipulated by the selector.

Specified by:
setModel in interface DataSelectorCommandInterface
Overrides:
setModel in class BaseSelectorCommand
Parameters:
model - the model

getFilterType

public java.lang.String getFilterType()
Returns:

setFilterType

public void setFilterType(FilterTypeEnum filterType)
Parameters:
filterType -

setFilterType

public void setFilterType(java.lang.String typeText)

getFilterValue

public java.lang.String getFilterValue()
Returns:

setFilterValue

public void setFilterValue(java.lang.String filterValue)
Parameters:
filterValue -

getRankType

public java.lang.String getRankType()
Returns:

setRankType

public void setRankType(RankTypeEnum rankType)
Parameters:
rankOperator -

setRankType

public void setRankType(java.lang.String text)

getRankOrder

public java.lang.String getRankOrder()
Returns:

setRankOrder

public void setRankOrder(RankOrderEnum order)
Parameters:
order -

setRankOrder

public void setRankOrder(java.lang.String text)

getRankValue

public java.lang.String getRankValue()
Returns:

setRankValue

public void setRankValue(java.lang.String rankValue)
Parameters:
rankValue -

getRankOption

public java.lang.String getRankOption()
Returns:

setRankOption

public void setRankOption(java.lang.String rankOption)
Parameters:
rankOption -

getClearCol

public java.lang.String getClearCol()
Returns:

setClearCol

public void setClearCol(java.lang.String clearCol)
Parameters:
clearCol -

getClearRow

public java.lang.String getClearRow()
Returns:

setClearRow

public void setClearRow(java.lang.String clearRow)
Parameters:
clearRow -



Copyright © 2009 SAS Institute Inc. All Rights Reserved.