All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

- For general information on the ActionProvider Framework, including an overview of how the primary classes of the framework work together, refer to the ``com.sas.actionprovider`` package documentation.

- For examples demonstrating how to use the ActionProvider Framework, including how to override default Actions or add new custom Actions, refer to the Samples Site.

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,

  - A sort command may be MODEL_TYPE_DISABLED if the model to which the viewer is currently attached does not implement the `SortableInterface`

  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,

  - A commit command may be MODEL_STATE_DISABLED if a lock can not be acquired.

  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,

  - A drill down action may be MODEL_MEMBER_DISABLED if a particular node on the model is a leaf-node.

  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,

  - A sort command for a column may be IS_CURRENT_STATE_DISABLED if that particular column is already sorted.

  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.

  - ``MODEL_TYPE_DISABLED``
  - ``MODEL_STATE_DISABLED``
  - ``MODEL_MEMBER_DISABLED``
  - ``IS_CURRENT_STATE_DISABLED``
  - ``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)`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.