com.sas.commands.remotefileselector
Class FilterTypeCommand

com.sas.commands.remotefileselector.FilterTypeCommand
All Implemented Interfaces:
ContentsChangedInterface, 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

public class FilterTypeCommand
implements ContentsChangedInterface

This class provides the calls to the RemoteServerModel for changing the file type to filter views by.

Since:
3.1

Field Summary
static java.lang.String RB_KEY
          the resource key
 
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
COMMAND_NAME_PREFIX
 
Constructor Summary
FilterTypeCommand()
          Constructor
FilterTypeCommand(java.lang.String name)
          Constructor that accepts a command name
FilterTypeCommand(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 o)
          Filters the view based on the type of file selected.
 java.util.HashMap getEventInfo()
          Returns information about the command.
 java.lang.Object getEventSource()
          Returns the event source item "path".
 java.util.HashMap getFilterTypes()
          Returns the attribute value containing the map of keys to file types.
 RemoteFileServerModelInterface getModel()
          Returns the model attribute value.
 java.lang.String getPath()
          Returns the currently viewed file path attribute.
 java.lang.String getSelectedKey()
          Returns the currently selected key attribute.
 boolean isContentsChanged()
          Tests whether the contents are changed.
 void setEventSource(java.lang.Object eventSource)
          Allows setting of the event source.
 void setFilterTypes(java.util.HashMap filterTypes)
          Sets the attribute containing the map of keys to file types.
 void setModel(RemoteFileServerModelInterface model)
          Sets the model attribute value.
 void setPath(java.lang.String path)
          Sets the currently viewed file path attribute.
 void setSelectedKey(java.lang.String selectedKey)
          Sets the value of the currently selected file type key attribute.
 
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
the resource key

See Also:
Constant Field Values
Constructor Detail

FilterTypeCommand

public FilterTypeCommand()
Constructor


FilterTypeCommand

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

Parameters:
name - the command name

FilterTypeCommand

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

Parameters:
name - the command name
actionClass - the action class type
Method Detail

execute

public void execute(java.lang.Object o)
Filters the view based on the type of file selected.

Specified by:
execute in interface com.sas.util.SimpleCommand
Specified by:
execute in class BaseCommand
Parameters:
o - the object where the command is executed.

setSelectedKey

public void setSelectedKey(java.lang.String selectedKey)
Sets the value of the currently selected file type key attribute.

Parameters:
selectedKey - the key into the fileTypes map.
See Also:
getSelectedKey()

getSelectedKey

public java.lang.String getSelectedKey()
Returns the currently selected key attribute.

Returns:
the currently selected key into the fileTypes map.
See Also:
setSelectedKey(String)

setPath

public void setPath(java.lang.String path)
Sets the currently viewed file path attribute.

Parameters:
path - the current file path
See Also:
getPath()

getPath

public java.lang.String getPath()
Returns the currently viewed file path attribute.

Returns:
the current file path
See Also:
setPath(String)

setFilterTypes

public void setFilterTypes(java.util.HashMap filterTypes)
Sets the attribute containing the map of keys to file types.

Parameters:
filterTypes - a map containing the keys and file types
See Also:
getFilterTypes()

getFilterTypes

public java.util.HashMap getFilterTypes()
Returns the attribute value containing the map of keys to file types.

Returns:
a map containing keys to file types
See Also:
setFilterTypes(HashMap)

setModel

public void setModel(RemoteFileServerModelInterface model)
Sets the model attribute value.

Parameters:
model - the model used by the command
See Also:
getModel()

getModel

public RemoteFileServerModelInterface getModel()
Returns the model attribute value.

Returns:
the model used by the command
See Also:
setModel(RemoteFileServerModelInterface)

isContentsChanged

public boolean isContentsChanged()
Tests whether the contents are changed.

Specified by:
isContentsChanged in interface ContentsChangedInterface
Returns:
true = contents are changed

getEventInfo

public java.util.HashMap getEventInfo()
Returns information about the command.

Specified by:
getEventInfo in interface ContentsChangedInterface
Returns:
a HashMaP containing the path where the copy took place

getEventSource

public java.lang.Object getEventSource()
Returns the event source item "path".

Specified by:
getEventSource in interface ContentsChangedInterface
Returns:
the event source
See Also:
setEventSource(Object)

setEventSource

public void setEventSource(java.lang.Object eventSource)
Allows setting of the event source.

Parameters:
eventSource - the item to set as the event source
See Also:
getEventSource()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.