com.sas.commands.dataselectors
Class FindSelectorCommand

com.sas.commands.dataselectors.FindSelectorCommand
All Implemented Interfaces:
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.beans.PropertyChangeListener, java.lang.Cloneable, java.rmi.Remote, java.util.EventListener

public class FindSelectorCommand
implements CommandSupportedInterface, java.beans.PropertyChangeListener

Assists the Find selector with business model interactions needed to perform the find functions.


Field Summary
protected  FindSelectorInterface adapter
           
protected  int columnNumber
           
protected  java.lang.String findCondition
           
protected  java.lang.String findDirection
           
protected  java.lang.String findType
           
protected  java.lang.String findValue
           
protected  int rowNumber
           
protected  com.sas.beans.PropertyChangeSource viewerComponent
           
 
Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
actionClass, CANCEL_MODE, COMMIT_MODE, complete, contentsChanged, eventInfo, eventSource, modal, mode, model, PROCESS_MODE, selector, selectorModel, SHOW_MODE
 
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
COMMAND_NAME_PREFIX
 
Constructor Summary
FindSelectorCommand()
           
FindSelectorCommand(java.lang.String name)
          Constructor that accepts a command name
FindSelectorCommand(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)
          Cancel is called when the user clicks on the cancel button on the selector or another selector becomes active.
protected  void commit(java.lang.Object o)
          Commits all changes made to the selector model to the viewer's business model.
protected  FindSelectorInterface createAdapter(OLAPDataSetInterface ods)
           
 int getColumnNumber()
          Get the viewer current column number
 java.lang.String getFindCondition()
          Get the find condition string
 java.lang.String getFindDirection()
          Get the find direction string
 java.lang.String getFindType()
          Get the find type
 java.lang.String getFindValue()
          Get the find value
 int getRowNumber()
          Get the viewer current row number
 com.sas.beans.PropertyChangeSource getViewerComponent()
          Get the viewer component
 boolean isSupported(ActionSupportFilter actionFilter)
          Returns a boolean indicating whether the command is supported for the area specified on the ActionSupportFilter argument.
protected  void process(java.lang.Object o)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          Responds to property change events from the attached viewer.
 void setColumnNumber(int i)
          Set the viewer current column number
 void setFindCondition(java.lang.String string)
          Set the find condition
 void setFindDirection(java.lang.String string)
          Set the find direction
 void setFindType(java.lang.String string)
          Set the find type
 void setFindValue(java.lang.String string)
          Set the find value
 void setRowNumber(int i)
          Set the viewer current row number
 void setViewerComponent(com.sas.beans.PropertyChangeSource vwr)
          Set the viewer component.
protected  void show(java.lang.Object o)
          Creates the selector model and sets it on the selector.
 
Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
cancel, closeSelector, execute, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, setComplete, setModal, setMode, setModel, 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

findType

protected java.lang.String findType

findCondition

protected java.lang.String findCondition

findValue

protected java.lang.String findValue

findDirection

protected java.lang.String findDirection

adapter

protected FindSelectorInterface adapter

rowNumber

protected int rowNumber

columnNumber

protected int columnNumber

viewerComponent

protected com.sas.beans.PropertyChangeSource viewerComponent
Constructor Detail

FindSelectorCommand

public FindSelectorCommand()

FindSelectorCommand

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


FindSelectorCommand

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

Method Detail

show

protected void show(java.lang.Object o)
Creates the selector model and sets it on the selector. This is typically run when the selector dialog is initially displayed.

Overrides:
show in class BaseSelectorCommand

process

protected void process(java.lang.Object o)
Overrides:
process in class BaseSelectorCommand

cancel

public void cancel(java.lang.Object o)
Cancel is called when the user clicks on the cancel button on the selector or another selector becomes active. Sets the selector visible property to false so the selector window gets closed.

Overrides:
cancel in class BaseSelectorCommand

commit

protected void commit(java.lang.Object o)
               throws java.io.IOException
Commits all changes made to the selector model to the viewer's business model. The items selected for each role are set as the result items on the BusinessQuery. If problems are enountered while updating the BusinessQuery, the error message describing the problem will be places on the EventInfo map for display by viewers listening for events, and all changes committed to the business model will be rolled back to the original state.

Overrides:
commit in class BaseSelectorCommand
Throws:
java.io.IOException
See Also:
BusinessQuery, BusinessModel

createAdapter

protected FindSelectorInterface createAdapter(OLAPDataSetInterface ods)

isSupported

public boolean isSupported(ActionSupportFilter actionFilter)
Returns a boolean indicating whether the command is supported for the area specified on the ActionSupportFilter argument.

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)

getFindCondition

public java.lang.String getFindCondition()
Get the find condition string

Returns:
the find condition

getFindDirection

public java.lang.String getFindDirection()
Get the find direction string

Returns:
the find direction

getFindType

public java.lang.String getFindType()
Get the find type

Returns:
the find type

getFindValue

public java.lang.String getFindValue()
Get the find value

Returns:
the find value

setFindCondition

public void setFindCondition(java.lang.String string)
Set the find condition

Parameters:
string - the find condition

setFindDirection

public void setFindDirection(java.lang.String string)
Set the find direction

Parameters:
string - the find direction

setFindType

public void setFindType(java.lang.String string)
Set the find type

Parameters:
string - the find type

setFindValue

public void setFindValue(java.lang.String string)
Set the find value

Parameters:
string - the find value

getColumnNumber

public int getColumnNumber()
Get the viewer current column number

Returns:
the column number

getRowNumber

public int getRowNumber()
Get the viewer current row number

Returns:
the row number

setColumnNumber

public void setColumnNumber(int i)
Set the viewer current column number

Parameters:
i - the column number

setRowNumber

public void setRowNumber(int i)
Set the viewer current row number

Parameters:
i - the row number

setViewerComponent

public void setViewerComponent(com.sas.beans.PropertyChangeSource vwr)
Set the viewer component.

Parameters:
vwr - the viewer component

getViewerComponent

public com.sas.beans.PropertyChangeSource getViewerComponent()
Get the viewer component

Returns:
the viewer component

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Responds to property change events from the attached viewer. This is used to keep the row and column properties in sync with the viewer so that finds start at the viewer current row and column.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener



Copyright © 2009 SAS Institute Inc. All Rights Reserved.