org.openpermis.editor.policy.command
Class AbstractCommand

java.lang.Object
  extended by org.openpermis.editor.policy.command.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AbstractRoleCommand, CollectionChangeCommand, CompositeCommand, EditPartCommand, PartRemoveCommand, PoolChangeCommand, PropertyChangeCommand

public abstract class AbstractCommand
extends Object
implements Command

Abstract command implementation.

Since:
0.1.0

Constructor Summary
protected AbstractCommand(String name)
          Creates an abstract command with the specified name.
 
Method Summary
abstract  void execute(org.openpermis.policy.bean.PolicyBean policy)
          Executes the command and stores necessary information to undo any changes.
 String getName()
          Returns the name of the command suitable for display in the user interface.
abstract  void undo(org.openpermis.policy.bean.PolicyBean policy)
          Reverts any changes performed in Command.execute(org.openpermis.policy.bean.PolicyBean).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommand

protected AbstractCommand(String name)
Creates an abstract command with the specified name.

Parameters:
name - the name of this command.
Since:
0.1.0
Method Detail

getName

public final String getName()
Description copied from interface: Command
Returns the name of the command suitable for display in the user interface.

Specified by:
getName in interface Command
Returns:
the name of the command suitable for display in the user interface.
Since:
0.1.0

execute

public abstract void execute(org.openpermis.policy.bean.PolicyBean policy)
                      throws Exception
Description copied from interface: Command
Executes the command and stores necessary information to undo any changes.

Specified by:
execute in interface Command
Parameters:
policy - the policy to execute the command on.
Throws:
Exception
Since:
0.1.0

undo

public abstract void undo(org.openpermis.policy.bean.PolicyBean policy)
                   throws Exception
Description copied from interface: Command
Reverts any changes performed in Command.execute(org.openpermis.policy.bean.PolicyBean).

Specified by:
undo in interface Command
Parameters:
policy - the policy to revert.
Throws:
Exception
Since:
0.1.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG