com.sas.commands.relational
Class BaseScrollCommand

com.sas.commands.relational.BaseScrollCommand
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:
GotoColumnCommand, GotoRowCommand, ScrollFirstColumnCommand, ScrollFirstRowCommand, ScrollLastColumnCommand, ScrollLastRowCommand, ScrollNextColumnCommand, ScrollNextColumnPageCommand, ScrollNextRowCommand, ScrollNextRowPageCommand, ScrollPreviousColumnCommand, ScrollPreviousColumnPageCommand, ScrollPreviousRowCommand, ScrollPreviousRowPageCommand

public abstract class BaseScrollCommand
implements CommandSupportedInterface

This class implements the basic functionality for a scroll command.


Field Summary
 
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
COMMAND_NAME_PREFIX
 
Constructor Summary
BaseScrollCommand()
          Default constructor
BaseScrollCommand(java.lang.String name)
          Constructor that accepts a command name
BaseScrollCommand(java.lang.String name, java.lang.String actionClass)
          Constructor that accepts a command name and an action class type
 
Method Summary
 void execute(java.lang.Object out)
          This method implements the execute method on the CommandInterface.
 BaseNavigationInterface getModel()
          Gets the model of the viewer 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 scrollExecute(java.lang.Object out)
          This method should be overridden by subclasses to actually execute the scroll operation.
 void setModel(BaseNavigationInterface model)
          Sets the model of the viewer associated with this command.
 
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
 

Constructor Detail

BaseScrollCommand

public BaseScrollCommand()
Default constructor


BaseScrollCommand

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

Parameters:
name - the name of this command

BaseScrollCommand

public BaseScrollCommand(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

execute

public void execute(java.lang.Object out)
This method implements the execute method on the CommandInterface. It executes the scroll command of the subclass and catches any UnsupportedOperationExceptions. UnsupportedOperationExceptions are ignored since they are typically caused by clicking an element on a page multiple times before a response has been returned.

Specified by:
execute in interface com.sas.util.SimpleCommand
Specified by:
execute in class BaseCommand
Parameters:
out - The output stream to which the results of this command should be written.

scrollExecute

public void scrollExecute(java.lang.Object out)
This method should be overridden by subclasses to actually execute the scroll operation.

Parameters:
out - The output stream to which the results of this command should be written.

setModel

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

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

getModel

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

Returns:
the model of the viewer associated with this command

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.