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
Class BaseCommand

    com.sas.commands.BaseCommand

All Implemented Interfaces:
  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

Direct Known Subclasses:
  AddFolderCommand, AddFolderCommand, AddRowCommand, BaseEditCommand, com.sas.commands.olap.BaseOLAPCommand, BaseOLAPExportCommand, BaseRelationalExportCommand, BaseScrollCommand, BaseSelectorCommand, CancelRowInsertCommand, ClearCommand, ClearSortCommand, CommitInsertedRowCommand, CopyCommand, CopyCommand, CutCommand, CutCommand, DeleteCommand, DeleteCommand, DeleteRowCommand, DisplaySearchResultsCommand, DisplaySearchResultsCommand, ExportToExcelCommand, FilterTypeCommand, FindCommand, GoBackCommand, HideColumnCommand, HoldColumnCommand, HoldRowCommand, HttpSearchCommand, InsertRowCommand, MapBaseCommand, MapExportToExcelCommand, MapFilterSelectionsCommand, MapIdentifyCommand, MapReportLinkingCommand, MapSetMeasureCommand, MoveColumnCommand, OpenFolderCommand, OpenFolderCommand, PasteCommand, PasteCommand, PasteCommand, ReleaseAllColumnsCommand, ReleaseAllRowsCommand, ReleaseColumnCommand, ReleaseRowCommand, RenameCommand, RenameCommand, com.sas.actionprovider.support.graphics.ResizeCommand, ShowAllColumnsCommand, ShowColumnCommand, ShowColumnHeaderCommand, ShowRowHeaderCommand, SortCommand, StartSearchCommand, UpOneLevelCommand

    public abstract class BaseCommand

implements DynamicAttributeCommandInterface

BaseCommand is the base class for all commands.

The logic to perform the operation is implemented in the execute() method.

Since:
  3.0
See Also:
  `execute(java.lang.Object)`

Field Summary

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

Constructor Summary
`BaseCommand()` Default constructor
`BaseCommand(java.lang.String name)` Name Constructor

Method Summary
`abstract void` | `execute(java.lang.Object o)` Executes this command.
`java.util.Locale` | `getLocale()` Returns the command's locale
`java.lang.String` | `getName()` Returns the name of the command.
`static java.lang.String` | `getNextCommandName()` Returns a unique command name.
`java.lang.String` | `getText()` Placeholder to satisy interface requirements.
`boolean` | `isExecutable()` Returns the boolean indicating whether the command is in a state that it can be executed.
`boolean` | `isUndoable()` Returns the boolean indicating whether the last operation this command executed can be undone ( rolled back ).
`void` | `setLocale(java.util.Locale loc)` Sets the command's locale
`void` | `setName(java.lang.String name)` Sets the name of the command.
`void` | `setText(java.lang.String text)` Placeholder to satisy interface requirements.
`void` | `undo()` Tells the command to undo its previous operation.

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`

Constructor Detail

### BaseCommand

    public BaseCommand()

  Default constructor

### BaseCommand

    public BaseCommand(java.lang.String name)

  Name Constructor

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of the command.

  Specified by:
    `getName` in interface `DynamicAttributeCommandInterface`
  Returns:
    name of the command
  See Also:
    `setName(java.lang.String)`

### setName

    public void setName(java.lang.String name)

  Sets the name of the command.

  To ensure unique command names use the `getNextCommandName()` method.

  Specified by:
    `setName` in interface `DynamicAttributeCommandInterface`
  Parameters:
    `name` - unique name of the command.
  See Also:
    `getName()`

### setLocale

    public void setLocale(java.util.Locale loc)

  Sets the command's locale

  Parameters:
    `loc` - the locale
  See Also:
    `getLocale()`

### getLocale

    public java.util.Locale getLocale()

  Returns the command's locale

  Returns:
    locale
  See Also:
    `setLocale(java.util.Locale)`

### getNextCommandName

    public static java.lang.String getNextCommandName()

  Returns a unique command name.

  Convenience method for ensuring commands are given unique names.

  Returns:
    a unique name for a command.
  See Also:
    `setName(java.lang.String)`

### undo

    public void undo()

  Tells the command to undo its previous operation.

  Default operation does nothing.

  Specified by:
    `undo` in interface `com.sas.util.Command`
  See Also:
    `isUndoable()`

### isUndoable

    public boolean isUndoable()

  Returns the boolean indicating whether the last operation this command executed can be undone ( rolled back ).

  Default value is false

  Specified by:
    `isUndoable` in interface `com.sas.util.Command`
  Returns:
    the boolean indicating whether the last operation this command executed can be undone ( rolled back ).
  See Also:
    `undo()`

### isExecutable

    public boolean isExecutable()

  Returns the boolean indicating whether the command is in a state that it can be executed.

  Default value is true

  Specified by:
    `isExecutable` in interface `com.sas.util.Command`
  Returns:
    boolean indicating whether the command is in a state that it can be executed.

### setText

    public void setText(java.lang.String text)

  Placeholder to satisy interface requirements.

  Does nothing

  Specified by:
    `setText` in interface `com.sas.lang.StringDataInterface`
  Parameters:
    `text` - the command's text
  See Also:
    `getText()`

### getText

    public java.lang.String getText()

  Placeholder to satisy interface requirements.

  Specified by:
    `getText` in interface `com.sas.lang.StringDataInterface`
  Returns:
    null
  See Also:
    `setText(java.lang.String)`

### execute

    public abstract void execute(java.lang.Object o)

  Executes this command.

  Specified by:
    `execute` in interface `com.sas.util.SimpleCommand`
  Parameters:
    `o` - The output stream to which the results of this command should be written.

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.