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.commands.dataselectors
Class TotalsCommand

    com.sas.commands.dataselectors.TotalsCommand

All Implemented Interfaces:
  CommandSupportedInterface, CancelInterface, ContentsChangedInterface, DataSelectorCommandInterface, DynamicAttributeCommandInterface, PendingCommandInterface, 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 TotalsCommand

implements CommandSupportedInterface

This class handles the applying of totals and subtotals in conjunction with the Totals Selector.

The command processes actions, via the Action Provider Framework, as they are initiated by the visual in response to user input. Actions include show, process, commit, and cancel. Each action causes a corresponding method on this command to be invoked.

The show action creates an instance of `TotalsSelectorInterface` to provide to the visual so that the Totals Selector can be displayed to the user.

The commit action is invoked when the user leaves the selector visual by pressing the OK button. Depending on the selected options, totals and subtotals are applied to the data model.

The cancel action is invoked when the user leaves the selector visual by pressing the Cancel button. There is no specific processing by this command for the cancel action.

The process action is not used by this command.

Since:
  3.1

Field Summary
`java.lang.String` | `columnSubtotals` Flag that indicates if the subtotals have to be applied to the columns.
`java.lang.String` | `columnTotals` Flag that indicates if the totals have to be applied to the columns.
`java.lang.String` | `expandedTotals` Flag that indicates if the totals are 'expanded'.
`java.lang.String` | `rowSubtotals` Flag that indicates if the subtotals have to be applied to the rows.
`java.lang.String` | `rowTotals` Flag that indicates if the totals have to be applied to the rows.
`static java.lang.String` | `TOTALS_SELECTOR_COMMAND_COMMITTED` String added to the fired contentsChangesEvent to let the listener know the TotalsCommand was committed.
`java.lang.String` | `totalsPosition` Indicates the totals position.
`java.lang.String` | `totalsType` Indicates the totals type.

Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
`actionClass, CANCEL_MODE, COMMIT_MODE, complete, contentsChanged, eventInfo, eventSource, modal, mode, model, PROCESS_MODE, selector, selectorModel, SHOW_MODE`

Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface
`COMMAND_NAME_PREFIX`

Constructor Summary
`TotalsCommand()` Default Constructor.
`TotalsCommand(boolean isJSP)` Constructor that accepts a command name.
`TotalsCommand(java.lang.String name)` Constructor that accepts a command name.
`TotalsCommand(java.lang.String name, java.lang.String actionClass)` Constructor that accepts a command name and an action class type.

Method Summary
`void` | `cancel()` Cancels the command.
`protected void` | `commit(java.lang.Object o)`
`java.lang.String` | `getColumnSubtotals()` Returns the flag that indicates if the sub totals have to be applied to the columns.
`java.lang.String` | `getColumnTotals()` Returns the flag that indicates if the totals have to be applied to the columns.
`java.lang.String` | `getExpandedTotals()` Returns the flag that indicates if the totals are 'expanded'.
`java.lang.String` | `getRowSubtotals()` Returns the flag that indicates if the sub totals have to be applied to the rows.
`java.lang.String` | `getRowTotals()` Returns the flag that indicates if the totals have to be applied to the rows.
`java.lang.String` | `getTotalsPosition()` Returns the totals position.
`java.lang.String` | `getTotalsType()` Returns the totals type.
`boolean` | `isSupported(ActionSupportFilter actionFilter)` Returns a boolean indicating whether the command is supported for the given area as specified by the current area information encapsulated in the ActionSupportFilter.
`void` | `setColumnSubtotals(java.lang.String value)` Sets the flag that indicates if the sub totals have to be applied to the columns.
`void` | `setColumnTotals(java.lang.String value)` Sets the flag that indicates if the totals have to be applied to the columns.
`void` | `setExpandedTotals(java.lang.String value)` Sets the flag that indicates if the totals are 'expanded'.
`void` | `setRowSubtotals(java.lang.String value)` Sets the flag that indicates if the sub totals have to be applied to the rows.
`void` | `setRowTotals(java.lang.String value)` Sets the flag that indicates if the totals have to be applied to the rows.
`void` | `setTotalsPosition(java.lang.String value)` Sets the totals position.
`void` | `setTotalsType(java.lang.String value)` Sets the totals type.
`protected void` | `show(java.lang.Object o)`

Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
`cancel, closeSelector, execute, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, process, setComplete, setModal, setMode, setModel, setSelector, setSelectorModel`

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

### rowTotals

    public java.lang.String rowTotals

  Flag that indicates if the totals have to be applied to the rows.

  See Also:
    `TotalsSelectorInterface.ROW_TOTALS`, `TotalsSelectorInterface.NO_ROW_TOTALS`

### rowSubtotals

    public java.lang.String rowSubtotals

  Flag that indicates if the subtotals have to be applied to the rows.

  See Also:
    `TotalsSelectorInterface.ROW_SUBTOTALS`, `TotalsSelectorInterface.NO_ROW_SUBTOTALS`

### columnTotals

    public java.lang.String columnTotals

  Flag that indicates if the totals have to be applied to the columns.

  See Also:
    `TotalsSelectorInterface.COLUMN_TOTALS`, `TotalsSelectorInterface.NO_COLUMN_TOTALS`

### columnSubtotals

    public java.lang.String columnSubtotals

  Flag that indicates if the subtotals have to be applied to the columns.

  See Also:
    `TotalsSelectorInterface.COLUMN_SUBTOTALS`, `TotalsSelectorInterface.NO_COLUMN_SUBTOTALS`

### expandedTotals

    public java.lang.String expandedTotals

  Flag that indicates if the totals are 'expanded'.

  See Also:
    `TotalsSelectorInterface.EXPANDED_TOTALS`, `TotalsSelectorInterface.NO_EXPANDED_TOTALS`

### totalsType

    public java.lang.String totalsType

  Indicates the totals type.

  See Also:
    `TotalsSelectorInterface.UNFILTERED_TOTALS`, `TotalsSelectorInterface.VISUAL_TOTALS`

### totalsPosition

    public java.lang.String totalsPosition

  Indicates the totals position.

  See Also:
    `TotalsSelectorInterface.TOP`, `TotalsSelectorInterface.BOTTOM`

### TOTALS_SELECTOR_COMMAND_COMMITTED

    public static final java.lang.String TOTALS_SELECTOR_COMMAND_COMMITTED

  String added to the fired contentsChangesEvent to let the listener know the TotalsCommand was committed.

  See Also:
    Constant Field Values

Constructor Detail

### TotalsCommand

    public TotalsCommand()

  Default Constructor.

### TotalsCommand

    public TotalsCommand(boolean isJSP)

  Constructor that accepts a command name.

  Parameters:
    `isJSP` - true if used in a JSP context; false if used in a Swing context.

### TotalsCommand

    public TotalsCommand(java.lang.String name)

  Constructor that accepts a command name.

  Parameters:
    `name` - The command name.

### TotalsCommand

    public TotalsCommand(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

### show

    protected void show(java.lang.Object o)

  Overrides:
    `show` in class `BaseSelectorCommand`

### commit

    protected void commit(java.lang.Object o)
                   throws java.io.IOException

  Overrides:
    `commit` in class `BaseSelectorCommand`
  Throws:
    `java.io.IOException`

### cancel

    public void cancel()

  Description copied from interface: `CancelInterface`
  Cancels the command.

  Common things done in this method:

  - Reset the command and/or the objects that this command holds.
  - Release objects for garbage collection

  Specified by:
    `cancel` in interface `CancelInterface`
  Overrides:
    `cancel` in class `BaseSelectorCommand`

### isSupported

    public boolean isSupported(ActionSupportFilter actionFilter)

  Description copied from interface: `CommandSupportedInterface`

  Returns a boolean indicating whether the command is supported for the given area as specified by the current area information encapsulated in the ActionSupportFilter.

  Specified by:
    `isSupported` in interface `CommandSupportedInterface`
  Parameters:
    `actionFilter` - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
  Returns:
    a boolean indicating whether the command is supported
  See Also:
    `BaseAction.setReturnStatus(int)`

### getRowTotals

    public java.lang.String getRowTotals()

  Returns the flag that indicates if the totals have to be applied to the rows.

  Returns:
    String The flag that indicates if the totals have to be applied to the rows.
  See Also:
    `TotalsSelectorInterface.ROW_TOTALS`, `TotalsSelectorInterface.NO_ROW_TOTALS`

### setRowTotals

    public void setRowTotals(java.lang.String value)

  Sets the flag that indicates if the totals have to be applied to the rows.

  Parameters:
    `value` - The flag that indicates if the totals have to be applied to the rows.
  See Also:
    `TotalsSelectorInterface.ROW_TOTALS`, `TotalsSelectorInterface.NO_ROW_TOTALS`

### getRowSubtotals

    public java.lang.String getRowSubtotals()

  Returns the flag that indicates if the sub totals have to be applied to the rows.

  Returns:
    String The flag that indicates if the sub totals have to be applied to the rows.
  See Also:
    `TotalsSelectorInterface.ROW_SUBTOTALS`, `TotalsSelectorInterface.NO_ROW_SUBTOTALS`

### setRowSubtotals

    public void setRowSubtotals(java.lang.String value)

  Sets the flag that indicates if the sub totals have to be applied to the rows.

  Parameters:
    `value` - The flag that indicates if the sub totals have to be applied to the rows.
  See Also:
    `TotalsSelectorInterface.ROW_SUBTOTALS`, `TotalsSelectorInterface.NO_ROW_SUBTOTALS`

### getColumnTotals

    public java.lang.String getColumnTotals()

  Returns the flag that indicates if the totals have to be applied to the columns.

  Returns:
    String The flag that indicates if the totals have to be applied to the columns.
  See Also:
    `TotalsSelectorInterface.COLUMN_TOTALS`, `TotalsSelectorInterface.NO_COLUMN_TOTALS`

### setColumnTotals

    public void setColumnTotals(java.lang.String value)

  Sets the flag that indicates if the totals have to be applied to the columns.

  Parameters:
    `value` - The flag that indicates if the totals have to be applied to the columns.
  See Also:
    `TotalsSelectorInterface.COLUMN_TOTALS`, `TotalsSelectorInterface.NO_COLUMN_TOTALS`

### getColumnSubtotals

    public java.lang.String getColumnSubtotals()

  Returns the flag that indicates if the sub totals have to be applied to the columns.

  Returns:
    String The flag that indicates if the sub totals have to be applied to the columns.
  See Also:
    `TotalsSelectorInterface.COLUMN_SUBTOTALS`, `TotalsSelectorInterface.NO_COLUMN_SUBTOTALS`

### setColumnSubtotals

    public void setColumnSubtotals(java.lang.String value)

  Sets the flag that indicates if the sub totals have to be applied to the columns.

  Parameters:
    `value` - The flag that indicates if the sub totals have to be applied to the columns.
  See Also:
    `TotalsSelectorInterface.COLUMN_SUBTOTALS`, `TotalsSelectorInterface.NO_COLUMN_SUBTOTALS`

### getExpandedTotals

    public java.lang.String getExpandedTotals()

  Returns the flag that indicates if the totals are 'expanded'.

  Returns:
    String The flag that indicates if the totals are 'expanded'.
  See Also:
    `TotalsSelectorInterface.EXPANDED_TOTALS`, `TotalsSelectorInterface.NO_EXPANDED_TOTALS`

### setExpandedTotals

    public void setExpandedTotals(java.lang.String value)

  Sets the flag that indicates if the totals are 'expanded'.

  Parameters:
    `value` - The flag that indicates if the totals are 'expanded'.
  See Also:
    `TotalsSelectorInterface.EXPANDED_TOTALS`, `TotalsSelectorInterface.NO_EXPANDED_TOTALS`

### getTotalsType

    public java.lang.String getTotalsType()

  Returns the totals type.

  Returns:
    String The totals type.
  See Also:
    `TotalsSelectorInterface.UNFILTERED_TOTALS`, `TotalsSelectorInterface.VISUAL_TOTALS`

### setTotalsType

    public void setTotalsType(java.lang.String value)

  Sets the totals type.

  Parameters:
    `value` - The totals type.
  See Also:
    `TotalsSelectorInterface.UNFILTERED_TOTALS`, `TotalsSelectorInterface.VISUAL_TOTALS`

### getTotalsPosition

    public java.lang.String getTotalsPosition()

  Returns the totals position.

  Returns:
    String The totals position.
  See Also:
    `TotalsSelectorInterface.TOP`, `TotalsSelectorInterface.BOTTOM`

### setTotalsPosition

    public void setTotalsPosition(java.lang.String value)

  Sets the totals position.

  Parameters:
    `value` - The totals position.
  See Also:
    `TotalsSelectorInterface.TOP`, `TotalsSelectorInterface.BOTTOM`

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.