com.sas.servlet.util
Class CommandProcessor

com.sas.servlet.util.CommandProcessor
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, CommandProcessorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

Deprecated. As of Version 3.0 this class has been replaced by com.sas.servlet.util.commandprocessor.CommandProcessor.

public class CommandProcessor
implements CommandProcessorInterface

See Also:
Serialized Form

Field Summary
protected  com.sas.collection.AssociationList commandDefinitions
          Deprecated. Command Defintions
protected  com.sas.collection.AssociationList executedCommands
          Deprecated. Executed Commands
protected  CommandProcessorCommandInterface lastCommand
          Deprecated. Last executed command
protected  javax.servlet.http.HttpServletRequest request
          Deprecated. request object
protected  javax.servlet.http.HttpServletResponse response
          Deprecated. reponse object
 
Constructor Summary
CommandProcessor()
          Deprecated.  
 
Method Summary
 boolean addStoredCommand(CommandProcessorViewInterface viewer, CommandProcessorCommandInterface cmd)
          Deprecated. Adds a stored command to the list.
 void addViewer(CommandProcessorViewInterface vi)
          Deprecated. Adds a viewer to the list of views sending commands to the commandProcessor.
 void executeCommand(CommandProcessorCommandInterface cmd, java.lang.Object obj)
          Deprecated. Executes the command passed and writes the appropriate component to the output stream.
 boolean executedCommandExists(java.lang.String cmdName)
          Deprecated. Checks to see if a command with the given name has been previously executed.
 CommandProcessorCommandInterface findStoredCommand(java.lang.String commandName)
          Deprecated.  
protected  CommandProcessorCommandInterface getCommand()
          Deprecated. Internal use only
 CommandDefinition[] getCommandDefinitions()
          Deprecated. Returns all registered command definitions.
 CommandProcessorCommandInterface[] getExecutedCommands()
          Deprecated. Returns all previously executedCommands
 CommandProcessorCommandInterface getLastExecutedCommand()
          Deprecated. Returns the most recently executed command.
 java.util.Locale getLocale()
          Deprecated. Get the locale
 java.lang.String getName()
          Deprecated. Returns the name of the CommandProcessor
 CommandProcessorCommandInterface getStoredCommand(java.lang.String cmdName)
          Deprecated. Returns a stored command with a given name.
protected  CommandProcessorCommandInterface getStreamContentCommand(GetStreamInterface gsi, java.lang.String contentType, java.lang.String servletURL)
          Deprecated. Internal use only
 CommandProcessorViewInterface[] getViewers()
          Deprecated. Returns views for which the CommandProcessor is processing commands.
 CommandProcessorCommandInterface processCommand(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated.  
 void registerCommand(CommandDefinition def)
          Deprecated. Registers a command.
 void removeAllStoredCommands()
          Deprecated. Remove all stored commands from the list.
 void removeAllStoredCommands(CommandProcessorViewInterface viewer)
          Deprecated. Remove the stored commands for a particular viewer.
 void removeStoredCommand(java.lang.String cmdName)
          Deprecated. Removes the first command with the given name.
 boolean removeViewer(CommandProcessorViewInterface vi)
          Deprecated. Removes a viewer from the list of views sending commands to the commandProcessor
 void setLocale(java.util.Locale loc)
          Deprecated. Set the locale
 void setName(java.lang.String name)
          Deprecated. Sets the name of the CommandProcessor
 boolean storedCommandExists(java.lang.String cmdName)
          Deprecated. Checks for the existance of a storedCommand
 void unregisterCommand(CommandDefinition def)
          Deprecated. Unregisters a command
 void unregisterCommand(java.lang.String commandPrefix)
          Deprecated. Unregisters a command, using the command's prefix to identify the commandDefinition.
 

Field Detail

executedCommands

protected com.sas.collection.AssociationList executedCommands
Deprecated. 
Executed Commands


commandDefinitions

protected com.sas.collection.AssociationList commandDefinitions
Deprecated. 
Command Defintions


lastCommand

protected CommandProcessorCommandInterface lastCommand
Deprecated. 
Last executed command


response

protected javax.servlet.http.HttpServletResponse response
Deprecated. 
reponse object


request

protected javax.servlet.http.HttpServletRequest request
Deprecated. 
request object

Constructor Detail

CommandProcessor

public CommandProcessor()
Deprecated. 
Method Detail

getName

public java.lang.String getName()
Deprecated. 
Returns the name of the CommandProcessor

Returns:
name of the CommandProcessor

setName

public void setName(java.lang.String name)
Deprecated. 
Sets the name of the CommandProcessor

Parameters:
name - name of the CommandProcessor

addStoredCommand

public boolean addStoredCommand(CommandProcessorViewInterface viewer,
                                CommandProcessorCommandInterface cmd)
Deprecated. 
Adds a stored command to the list. Typically these are navigation commands that are created as the table representation of the multidimensional table is built.

Specified by:
addStoredCommand in interface CommandProcessorInterface
Parameters:
viewer - viewer associated with this command.
cmd - command object

getStoredCommand

public CommandProcessorCommandInterface getStoredCommand(java.lang.String cmdName)
Deprecated. 
Returns a stored command with a given name. If the name does not exist a null is returned.

Specified by:
getStoredCommand in interface CommandProcessorInterface
Parameters:
cmdName - name of the desired command.

removeStoredCommand

public void removeStoredCommand(java.lang.String cmdName)
Deprecated. 
Removes the first command with the given name.

Specified by:
removeStoredCommand in interface CommandProcessorInterface
Parameters:
cmdName - command name to remove.

storedCommandExists

public boolean storedCommandExists(java.lang.String cmdName)
Deprecated. 
Checks for the existance of a storedCommand

Specified by:
storedCommandExists in interface CommandProcessorInterface
Parameters:
cmdName - name of stored command

removeAllStoredCommands

public void removeAllStoredCommands()
Deprecated. 
Remove all stored commands from the list. If multiple viewers are attached the commands for all viewers are removed.

Specified by:
removeAllStoredCommands in interface CommandProcessorInterface

removeAllStoredCommands

public void removeAllStoredCommands(CommandProcessorViewInterface viewer)
Deprecated. 
Remove the stored commands for a particular viewer.

Specified by:
removeAllStoredCommands in interface CommandProcessorInterface

executedCommandExists

public boolean executedCommandExists(java.lang.String cmdName)
Deprecated. 
Checks to see if a command with the given name has been previously executed.

Specified by:
executedCommandExists in interface CommandProcessorInterface
Parameters:
cmdName - name of stored command

processCommand

public CommandProcessorCommandInterface processCommand(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws java.io.IOException
Deprecated. 
Specified by:
processCommand in interface CommandProcessorInterface
Throws:
java.io.IOException

findStoredCommand

public CommandProcessorCommandInterface findStoredCommand(java.lang.String commandName)
Deprecated. 
Specified by:
findStoredCommand in interface CommandProcessorInterface

executeCommand

public void executeCommand(CommandProcessorCommandInterface cmd,
                           java.lang.Object obj)
                    throws java.io.IOException
Deprecated. 
Executes the command passed and writes the appropriate component to the output stream.

Specified by:
executeCommand in interface CommandProcessorInterface
Parameters:
cmd - command to be executed
out - output stream to write table/graph etc to.
Throws:
java.io.IOException

getLastExecutedCommand

public CommandProcessorCommandInterface getLastExecutedCommand()
Deprecated. 
Returns the most recently executed command.

Specified by:
getLastExecutedCommand in interface CommandProcessorInterface
Returns:
an object that implements the MDTableCommandInterface.

addViewer

public void addViewer(CommandProcessorViewInterface vi)
Deprecated. 
Adds a viewer to the list of views sending commands to the commandProcessor.

Specified by:
addViewer in interface CommandProcessorInterface
Parameters:
object - implementing the CommandProcessorViewIterface.

removeViewer

public boolean removeViewer(CommandProcessorViewInterface vi)
Deprecated. 
Removes a viewer from the list of views sending commands to the commandProcessor

Specified by:
removeViewer in interface CommandProcessorInterface
Parameters:
vi - the view to remove.
Returns:
True if item removed, false if not.

getViewers

public CommandProcessorViewInterface[] getViewers()
Deprecated. 
Returns views for which the CommandProcessor is processing commands.

Specified by:
getViewers in interface CommandProcessorInterface
Returns:
list of views.

setLocale

public void setLocale(java.util.Locale loc)
Deprecated. 
Set the locale

Specified by:
setLocale in interface CommandProcessorInterface
Parameters:
locale -

getLocale

public java.util.Locale getLocale()
Deprecated. 
Get the locale

Specified by:
getLocale in interface CommandProcessorInterface
Returns:
locale

registerCommand

public void registerCommand(CommandDefinition def)
Deprecated. 
Registers a command. All commands to be processed by the command processor must be registered.

Specified by:
registerCommand in interface CommandProcessorInterface
See Also:
CommandDefinition

unregisterCommand

public void unregisterCommand(CommandDefinition def)
Deprecated. 
Unregisters a command

Specified by:
unregisterCommand in interface CommandProcessorInterface

unregisterCommand

public void unregisterCommand(java.lang.String commandPrefix)
Deprecated. 
Unregisters a command, using the command's prefix to identify the commandDefinition.

Specified by:
unregisterCommand in interface CommandProcessorInterface

getCommandDefinitions

public CommandDefinition[] getCommandDefinitions()
Deprecated. 
Returns all registered command definitions.

Specified by:
getCommandDefinitions in interface CommandProcessorInterface
Returns:
command definitions.

getStreamContentCommand

protected CommandProcessorCommandInterface getStreamContentCommand(GetStreamInterface gsi,
                                                                   java.lang.String contentType,
                                                                   java.lang.String servletURL)
Deprecated. 
Internal use only


getCommand

protected CommandProcessorCommandInterface getCommand()
                                               throws java.io.IOException
Deprecated. 
Internal use only

Throws:
java.io.IOException

getExecutedCommands

public CommandProcessorCommandInterface[] getExecutedCommands()
Deprecated. 
Returns all previously executedCommands

Specified by:
getExecutedCommands in interface CommandProcessorInterface
Returns:
previously executedCommands



Copyright © 2009 SAS Institute Inc. All Rights Reserved.