com.sas.actionprovider.strategies.remotefile2
Class SelectFileStrategy

com.sas.actionprovider.strategies.remotefile2.SelectFileStrategy
All Implemented Interfaces:
ActionStatusKeysInterface, ActionStrategyInterface

public class SelectFileStrategy


Field Summary
 
Fields inherited from class com.sas.actionprovider.strategies.remotefile2.BaseDataCellStrategy
FULLY_QUALIFIED_LOCATION, IS_FOLDER, MODEL, NODE, SORT_MODEL
 
Fields inherited from class com.sas.actionprovider.strategies.remotefile2.BaseRemoteFileStrategy
VIEWER
 
Fields inherited from class com.sas.actionprovider.strategies.BaseActionStrategy
TEMPLATE_DELIMITER
 
Fields inherited from interface com.sas.actionprovider.ActionStatusKeysInterface
AREA_DISABLED, DISABLED, ENABLED, IS_CURRENT_STATE_DISABLED, MODEL_MEMBER_DISABLED, MODEL_STATE_DISABLED, MODEL_TYPE_DISABLED, UNSUPPORTED, VIEWER_DISABLED
 
Constructor Summary
SelectFileStrategy()
          Default constructor.
SelectFileStrategy(boolean swing, RemoteFileActionUtil util)
          Constructor for specifying type ( swing/http ) of strategy object.
 
Method Summary
 int getActionStatus(BaseAction action, ActionSupportFilter filter)
          Returns a status value indicating whether the Action is enabled for a specific area as described by various filter attributes.
protected  java.lang.Object getDynamicValue(java.lang.String valueName, ActionSupportFilter filter, java.lang.Object defaultValue)
           Returns the value of the Action.SMALL_ICON_NAME
protected  void initialize()
           Initialize this strategy object.
protected  void initializeActionAttributes(BaseAction action, java.lang.String areaType, java.util.Locale locale)
           Initializes the Action with all its default attributes, default AttributeDescriptor property settings and default values for non-locale-dependent attributes.
 void setLocaleDependentDefaultAttributes(BaseAction action, java.lang.String areaType, java.util.Locale locale)
           Sets the Action's default locale dependent attribute values.
 
Methods inherited from class com.sas.actionprovider.strategies.remotefile2.BaseRemoteFileStrategy
addDynamicValueInfo, setUtilObject
 
Methods inherited from class com.sas.actionprovider.strategies.BaseActionStrategy
addDynamicValueInfo, addDynamicValueInfo, getCustomAttributeValue, getUtilObject, initializeAction, isSwing, setActionAttributes, setSwing
 

Constructor Detail

SelectFileStrategy

public SelectFileStrategy()
Default constructor. Calls the other constructor for specifying strategy type.


SelectFileStrategy

public SelectFileStrategy(boolean swing,
                          RemoteFileActionUtil util)
Constructor for specifying type ( swing/http ) of strategy object.

Parameters:
swing - boolean indicating whether the strategy will be used in a swing environment. If false, the strategy is http type.
Method Detail

initializeActionAttributes

protected void initializeActionAttributes(BaseAction action,
                                          java.lang.String areaType,
                                          java.util.Locale locale)

Initializes the Action with all its default attributes, default AttributeDescriptor property settings and default values for non-locale-dependent attributes. values.

Overrides:
initializeActionAttributes in class BaseDataCellStrategy
Parameters:
action - The instance of the Action to be initialized.
areaType - The areaType of the Viewer where the Action will be presented.
locale - The locale

setLocaleDependentDefaultAttributes

public void setLocaleDependentDefaultAttributes(BaseAction action,
                                                java.lang.String areaType,
                                                java.util.Locale locale)

Sets the Action's default locale dependent attribute values.

Specified by:
setLocaleDependentDefaultAttributes in interface ActionStrategyInterface
Overrides:
setLocaleDependentDefaultAttributes in class BaseActionStrategy
Parameters:
action - The instance of the Action to be initialized.
locale - The locale
areaType - The areaType of the Viewer where the Action will be presented.

initialize

protected void initialize()

Initialize this strategy object.

Via the BaseRemoteFileStrategy.addDynamicValueInfo(java.lang.String, java.lang.String, java.lang.String) method, this method registers the information for dynamic values that are available in all OLAP areas:

Overrides:
initialize in class BaseDataCellStrategy
See Also:
#setReturnStatus

getDynamicValue

protected java.lang.Object getDynamicValue(java.lang.String valueName,
                                           ActionSupportFilter filter,
                                           java.lang.Object defaultValue)

Returns the value of the Action.SMALL_ICON_NAME

Overrides:
getDynamicValue in class BaseActionStrategy
Parameters:
valueName - The name of the Action attribute.
filter - The ActionSupportFilter that contains area-specific information relating to where the Action will be used.
defaultValue - The current value of this attribute on the default Action.
Returns:
the value of a dynamic Action attribute.
See Also:
com.sas.actionprovider.DynamicValueInfo#setValueObject, com.sas.actionprovider.DynamicValueInfo#setValueMethod, BaseRemoteFileStrategy.addDynamicValueInfo(java.lang.String, java.lang.String, java.lang.String)

getActionStatus

public int getActionStatus(BaseAction action,
                           ActionSupportFilter filter)
Returns a status value indicating whether the Action is enabled for a specific area as described by various filter attributes.

If enabled, the value is: ActionStatusKeysInterface.ENABLED

If disabled, the value may be one of the following values which indicate why the Action is disabled.

The status of an Action with a CommandSupportedInterface command whose isSupported() method returns false will have the ActionStatusKeysInterface.UNSUPPORTED status bit set.

The status of an Action with a CommandStatusInterface command will have the status bit value returned by the command's getCommandStatus() method.

The Action's status may also be set with bit values that are determined by the support class in addition to a command.

Specified by:
getActionStatus in interface ActionStrategyInterface
Overrides:
getActionStatus in class BaseActionStrategy
Parameters:
action - The action for which status is to be determined.
filter - The ActionSupportFilter that encapsulates all information describing the specific area.
Returns:
the boolean indicating whether the Action is enabled
See Also:
CommandSupportedInterface, CommandStatusInterface



Copyright © 2009 SAS Institute Inc. All Rights Reserved.