org.openpermis.editor.policy.command
Class PropertyChangeCommand

java.lang.Object
  extended by org.openpermis.editor.policy.command.AbstractCommand
      extended by org.openpermis.editor.policy.command.PropertyChangeCommand
All Implemented Interfaces:
Command

public class PropertyChangeCommand
extends AbstractCommand

Command that performs a property change.

Since:
0.1.0

Constructor Summary
PropertyChangeCommand(Object bean, String property, Object value)
          Creates a property change command for the specified bean and property.
 
Method Summary
 void execute(org.openpermis.policy.bean.PolicyBean policy)
          Executes the command and stores necessary information to undo any changes.
 void undo(org.openpermis.policy.bean.PolicyBean policy)
          Reverts any changes performed in Command.execute(org.openpermis.policy.bean.PolicyBean).
 
Methods inherited from class org.openpermis.editor.policy.command.AbstractCommand
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyChangeCommand

public PropertyChangeCommand(Object bean,
                             String property,
                             Object value)
Creates a property change command for the specified bean and property.

Parameters:
bean - the bean to modify, must not be null.
property - the property to set, must not be null or empty.
value - the value to set at the property.
Since:
0.1.0
Method Detail

execute

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

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

undo

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

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


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG