public abstract class AbstractCommand extends java.lang.Object implements Command
CATEGORY_APPLICATION_HIGH_PRIO, CATEGORY_APPLICATION_LOW_PRIO, CATEGORY_COPY, CATEGORY_DELETE, CATEGORY_DOCUMENT, CATEGORY_EDIT, CATEGORY_EXECUTE, CATEGORY_FAVORITES, CATEGORY_IMPORT_EXPORT, CATEGORY_LCM, CATEGORY_LINK, CATEGORY_MIN, CATEGORY_MISC, CATEGORY_NEW, CATEGORY_OBJECT, CATEGORY_OPEN, CATEGORY_PREFERENCES, CATEGORY_SAVE, CATEGORY_SEARCH, CATEGORY_SHOW, CATEGORY_UPDATE, CATEGORY_UPDATE_EXT, CATEGORY_VIEW, COMMAND_ACTIVATE_DEACTIVATE, COMMAND_ADD_CATEGORY, COMMAND_ADD_COPY, COMMAND_ADD_DOCUMENT, COMMAND_ADD_FOLDER, COMMAND_ADD_TO_FAVORITES, COMMAND_ADD_TO_LIST, COMMAND_ADD_TYPE, COMMAND_ADD_VERSION, COMMAND_ATTACH_WS_POLICY, COMMAND_ATTACH_WSDL, COMMAND_CHANGE_LIFEC_STATE, COMMAND_CHANGE_PROVIDING_ORG, COMMAND_CHECK_CONN, COMMAND_COMPARE, COMMAND_COPY_SHORTCUT, COMMAND_DELETE, COMMAND_DOCUMENTATION, COMMAND_DOWNLOAD, COMMAND_DOWNLOAD_BPEL, COMMAND_DOWNLOAD_WSDL, COMMAND_DOWNLOAD_XMLSCHEMA, COMMAND_EDIT_DETAILS, COMMAND_EXPORT, COMMAND_EXPORT_CONTENTS, COMMAND_EXPORT_FAVORITE, COMMAND_GENERATE_REPORT, COMMAND_IMPACT_ANALYSIS, COMMAND_IMPORT_ASSET, COMMAND_LC_CREATE_NEW_VERS, COMMAND_NOTIFY_ME, COMMAND_PERMISSIONS, COMMAND_REGISTER_AS_CONSUMER, COMMAND_REGISTER_CONS, COMMAND_REMOVE_FROM_FAVORITES, COMMAND_RENAME, COMMAND_RENAME_LIST, COMMAND_SHOW_DETAILS, COMMAND_VIRTUALIZE, rcs_id
Constructor and Description |
---|
AbstractCommand() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute command
|
abstract void |
execute(CommandContext commandContext)
Execute command for given CommandContext
|
void |
executeWrapped(CommandContext commandContext)
Execute command for given ActionContext.
|
abstract int |
getCategory()
The value returned by this command may be used for
command ordering and grouping (for example in a context menu)
|
static java.util.Comparator |
getComparator()
Comparator on basis respective command category
|
java.lang.String |
getId() |
abstract java.lang.String |
getImageURL()
Get URL of icon to be used for rendering of command.
|
java.util.Locale |
getLocale()
Obtain Locale for this command
|
abstract java.lang.String |
getName()
Get localized name of command - may be used e.g.
|
boolean |
getSelectable()
Get command selectable
|
java.util.List |
getSubCommands()
Example - if a command displayed in a context menu has sub-commands,
they will be rendered as sub-context menu
|
boolean |
isEnabled() |
boolean |
isEnabled(CommandContext context)
Is this command enabled?
|
boolean |
isSameGroup(Command other)
Check whether this command belongs to same group as other
|
boolean |
isToBeVisualized(CommandContext context)
Deprecated.
|
boolean |
isVisible() |
void |
setEnabled(boolean enabled)
Set command enabled
|
void |
setLocale(java.util.Locale lc)
Set Locale for this command
|
void |
setSelectable(boolean value)
Set command selectable
|
void |
setVisible(boolean visible)
Set whether this command is to be visualized
|
java.lang.String |
toString()
Obtain string representation of command for debugging
|
public abstract java.lang.String getName()
Command
public abstract java.lang.String getImageURL()
Command
getImageURL
in interface Command
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getId()
getId
in interface com.softwareag.cis.plugin.interfaces.Component
Component.getId()
public abstract int getCategory()
getCategory
in interface Command
public boolean isSameGroup(Command other)
isSameGroup
in interface Command
other
- public static java.util.Comparator getComparator()
public java.util.List getSubCommands()
getSubCommands
in interface Command
public void setLocale(java.util.Locale lc)
public java.util.Locale getLocale()
public boolean isEnabled(CommandContext context)
public void setEnabled(boolean enabled)
setEnabled
in interface com.softwareag.cis.plugin.interfaces.Component
enabled
- public boolean isEnabled()
isEnabled
in interface com.softwareag.cis.plugin.interfaces.Component
Component.isEnabled()
public void setSelectable(boolean value)
public boolean getSelectable()
public boolean isToBeVisualized(CommandContext context)
isVisible()
isToBeVisualized
in interface Command
context
- public boolean isVisible()
isVisible
in interface com.softwareag.cis.plugin.interfaces.Component
Component.isVisible()
public void setVisible(boolean visible)
setVisible
in interface com.softwareag.cis.plugin.interfaces.Component
visible
- true if to be visualized, otherwise falsepublic void execute()
public abstract void execute(CommandContext commandContext)
public final void executeWrapped(CommandContext commandContext)
executeWrapped
in interface Command
commandContext
- the CommandContext