com.sas.actionprovider
Interface CommandStatusInterface

All Known Implementing Classes:
AdvancedFilterSelectorCommand, AdvancedFilterSelectorCommandFacade, com.sas.commands.olap.BaseOLAPCommand, com.sas.commands.olap.BaseTupleElementCommand, ClearCommand, ClearSortCommand, com.sas.commands.olap.CollapseCommand, CopyCommand, CutCommand, com.sas.commands.olap.DrillDownCommand, com.sas.commands.olap.DrillUpCommand, com.sas.commands.olap.ExpandCommand, ExportToExcelCommand, FilterAndRankSelectorCommand, FormatSelectorCommand, HideColumnCommand, MapClearSelectionsCommand, MapCollapseCommand, MapDrillDownCommand, MapDrillUpCommand, MapExpandCommand, MapExportToExcelCommand, MapFilterSelectionsCommand, MapResizeCommand, MemberPropertiesCommand, MoveColumnCommand, OLAPSortSelectorCommand, OLAPTimeBasedFilterCommand, PasteCommand, PercentCalculationsCommand, com.sas.actionprovider.support.graphics.ResizeCommand, SimpleCalculatedItemSelectorCommand, SortCommand, SortCommand, SortFoldersFirstCommand, SortFoldersFirstCommand

public interface CommandStatusInterface

This interface is implemented by commands that may not enabled under certain conditions and whose users need to know this status prior to command execution or Action rendering.

In the context of the ActionProvider Framework ( APF ), a command's status is inherited by the Action to which it is associated. An Action that is disabled is not returned to a requesting viewer unless the Action's returnStatus attribute is set to allow its return.

If there are varying conditions for which a command may not be enabled, it is beneficial if the command returns different disabled status values for each of these conditions. Doing so allows the Actions that use this command to have more control over when a disabled action should be surfaced to the viewer.

A basic understanding of the ActionProvider Framework, of which this class is a part, is recommended before attempting to use this class.



Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

Since:
3.0
See Also:
BaseAction.setReturnStatus(int)

Field Summary
static int DISABLED
           Return value from getCommandStatus method if the command is disabled for an unspecified reason.
static int ENABLED
           Return value of getCommandStatus() if command is enabled.
static int IS_CURRENT_STATE_DISABLED
          Return value of getCommandStatus method if command is disabled given that the intended state of the operation already exists.
static int MODEL_MEMBER_DISABLED
          Return value of getCommandStatus method if command is disabled for a particular member of the model.
static int MODEL_STATE_DISABLED
          Return value of getCommandStatus method if command is disabled due to some state of the model.
static int MODEL_TYPE_DISABLED
          Return value of getCommandStatus method if command is disabled for a particular type of model.
 
Method Summary
 int getCommandStatus(ActionSupportFilter filter)
          Returns a status value indicating whether the command is enabled for a specific area as described by various filter attributes.
 

Field Detail

ENABLED

static final int ENABLED

Return value of getCommandStatus() if command is enabled.

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values

MODEL_TYPE_DISABLED

static final int MODEL_TYPE_DISABLED
Return value of getCommandStatus method if command is disabled for a particular type of model.

For example,

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values

MODEL_STATE_DISABLED

static final int MODEL_STATE_DISABLED
Return value of getCommandStatus method if command is disabled due to some state of the model.

For example,

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values

MODEL_MEMBER_DISABLED

static final int MODEL_MEMBER_DISABLED
Return value of getCommandStatus method if command is disabled for a particular member of the model.

For example,

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values

IS_CURRENT_STATE_DISABLED

static final int IS_CURRENT_STATE_DISABLED
Return value of getCommandStatus method if command is disabled given that the intended state of the operation already exists.

For example,

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values

DISABLED

static final int DISABLED

Return value from getCommandStatus method if the command is disabled for an unspecified reason.

See Also:
getCommandStatus(com.sas.actionprovider.ActionSupportFilter), BaseAction.setReturnStatus(int), Constant Field Values
Method Detail

getCommandStatus

int getCommandStatus(ActionSupportFilter filter)
Returns a status value indicating whether the command is enabled for a specific area as described by various filter attributes.

If enabled, the value is: ENABLED

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

Parameters:
filter - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
Returns:
an int value indicating whether the command is enabled and, if not, why.
See Also:
BaseAction.setReturnStatus(int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.