public class BasicActionDefinition extends AbstractEntityDefinition implements ActionDefinition, ActionCommandList
| Modifier and Type | Field and Description |
|---|---|
boolean |
concurrent |
immutable| Constructor and Description |
|---|
BasicActionDefinition(java.lang.String name) |
BasicActionDefinition(java.lang.String name,
java.lang.Class actionClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDropSource(ResourceMask resourceMask) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l) |
int |
compareTo(java.lang.Object o) |
KeyStroke |
getAccelerator()
Returns key stroke used to initiate the action in any UI.
|
java.util.List<ActionCommand> |
getCommands()
List of ActionCommands that can be requested by the source action.
|
java.util.List<ResourceMask> |
getDropSources()
Returns the drop source context masks.
|
java.lang.Integer |
getEntityType() |
GroupIdentifier |
getExecutionGroup()
Some category of actions may be applied to groups of objects.
|
java.util.concurrent.locks.ReentrantLock |
getExecutionLock()
Returns the execution lock
|
Permissions |
getPermissions()
Returns permissions required to execute action.
|
Action |
instantiate()
Creates and return an instance of the action
|
boolean |
isConcurrent()
If false, parallel execution of several action instances is not allowed
|
boolean |
isDefault()
Returns true if action is a default action in context.
|
boolean |
isEnabled()
Returns true if action execution is allowed.
|
boolean |
isHeadless()
Returns true if action supports non-interactive execution.
|
boolean |
isHidden()
Returns true if action is hidden.
|
protected void |
registerCommand(ActionCommand cmd)
Action may register several parameters (or states) designated by the RequestIdentifier The action passes through these states sequentially with no repeat.
|
protected void |
registerCommands()
Override this method to call registerCommand() only inside body of this method.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l) |
void |
setAccelerator(KeyStroke accelerator) |
void |
setConcurrent(boolean allowConcurrentExecution) |
void |
setDefault(boolean isDefault)
Sets default flag for the action.
|
void |
setDescription(java.lang.String description) |
void |
setDropSources(java.util.List<ResourceMask> dropSources) |
void |
setEnabled(boolean enabled)
Enables/disables action.
|
void |
setExecutionGroup(GroupIdentifier groupId) |
void |
setExecutionGroup(java.lang.String base) |
void |
setHelp(java.lang.String help) |
void |
setHidden(boolean hidden) |
void |
setIconId(java.lang.String iconId) |
void |
setName(java.lang.String name) |
void |
setPermissions(Permissions permissions) |
protected void |
unregisterCommand(java.lang.String id) |
getDescription, getGroup, getHelp, getIconId, getIndex, getName, getOwner, isImmutable, setGroup, setImmutable, setIndex, setOwner, toDetailedString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getGroup, getHelp, getIconId, getIndex, getName, getOwner, toDetailedStringpublic BasicActionDefinition(java.lang.String name)
public BasicActionDefinition(java.lang.String name,
java.lang.Class actionClass)
public GroupIdentifier getExecutionGroup()
ActionDefinitiongetExecutionGroup in interface ActionDefinitionpublic boolean isEnabled()
ActionDefinitionisEnabled in interface ActionDefinitionpublic boolean isHidden()
ActionDefinitionisHidden in interface ActionDefinitionpublic KeyStroke getAccelerator()
ActionDefinitiongetAccelerator in interface ActionDefinitionpublic java.util.List<ResourceMask> getDropSources()
ActionDefinitiongetDropSources in interface ActionDefinitionpublic void setIconId(java.lang.String iconId)
setIconId in class AbstractEntityDefinitionpublic void setHelp(java.lang.String help)
setHelp in class AbstractEntityDefinitionpublic void setDescription(java.lang.String description)
setDescription in class AbstractEntityDefinitionpublic void setExecutionGroup(java.lang.String base)
public void setExecutionGroup(GroupIdentifier groupId)
public void setEnabled(boolean enabled)
ActionDefinitionsetEnabled in interface ActionDefinitionpublic void setHidden(boolean hidden)
public void setAccelerator(KeyStroke accelerator)
public void setDropSources(java.util.List<ResourceMask> dropSources)
public void setName(java.lang.String name)
setName in class AbstractEntityDefinitionpublic boolean isDefault()
ActionDefinitionisDefault in interface ActionDefinitionpublic void setDefault(boolean isDefault)
ActionDefinitionsetDefault in interface ActionDefinitionpublic boolean isConcurrent()
ActionDefinitionisConcurrent in interface ActionDefinitionpublic void setConcurrent(boolean allowConcurrentExecution)
public void addDropSource(ResourceMask resourceMask)
public Action instantiate()
ActionDefinitioninstantiate in interface ActionDefinitionpublic java.util.List<ActionCommand> getCommands()
getCommands in interface ActionCommandListprotected void registerCommands()
protected void registerCommand(ActionCommand cmd)
protected void unregisterCommand(java.lang.String id)
public java.util.concurrent.locks.ReentrantLock getExecutionLock()
ActionDefinitiongetExecutionLock in interface ActionDefinitionpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public boolean isHeadless()
ActionDefinitionisHeadless in interface ActionDefinitionpublic Permissions getPermissions()
ActionDefinitiongetPermissions in interface ActionDefinitionpublic void setPermissions(Permissions permissions)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.Integer getEntityType()
getEntityType in interface EntityDefinitiongetEntityType in class AbstractEntityDefinition