|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.command.CommandManager
public class CommandManager
Basic implementation of a command dispatcher.
Constructor Summary | |
---|---|
CommandManager(org.openpermis.policy.bean.PolicyBean policy)
Creates a new command dispatcher for the specified policy. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Registers the specified property change listener. |
void |
execute(Command command)
Executes the specified command and pushes it on the undo stack. |
String |
getRedoName()
Returns the name of the first command on the redo stack. |
String |
getUndoName()
Returns the name of the first command on the undo stack. |
boolean |
isRedoAvailable()
Check if there is at least one command to undo. |
boolean |
isUndoAvailable()
Check if there is at least one command to undo. |
boolean |
redo()
Executes the last command that was undone again. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified property change listener. |
protected void |
sureFirePropertyChange(String property,
boolean oldValue,
boolean newValue)
Support for reporting bound property changes for Object properties. |
boolean |
undo()
Performs an undo of the last command executed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandManager(org.openpermis.policy.bean.PolicyBean policy)
policy
- the policy the dispatcher operates on.Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to register.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to remove.protected void sureFirePropertyChange(String property, boolean oldValue, boolean newValue)
Use this method to inform registered property change listeners of a change in a bound property.
This method will not throw any exceptions.
property
- the property whose value has changed.oldValue
- the previous value of the property.newValue
- the new value of the property.public boolean isUndoAvailable()
true
if there is a command to undo.public String getUndoName()
null
if there is none.public boolean undo()
true
if a command was executed successfully.public boolean isRedoAvailable()
true
if there is a command to undo.public String getRedoName()
null
if there is none.public boolean redo()
true
if a command was executed successfully.public void execute(Command command)
CommandDispatcher
Flushes the contents of the redo stack.
execute
in interface CommandDispatcher
command
- the command to process.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG