org.openpermis.editor.policy.command
Class IncludeRoleCommand

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

public class IncludeRoleCommand
extends AbstractRoleCommand

Given a parent role, include a role among its children.

Since:
0.3.0

Constructor Summary
IncludeRoleCommand(String name, String parentRoleName, String roleName, org.openpermis.policy.bean.RoleHierarchyBean roleHierarchyBean)
          Creates a IncludeRoleCommand.
 
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.AbstractRoleCommand
getRoleHierarchyBean, getRoleName
 
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

IncludeRoleCommand

public IncludeRoleCommand(String name,
                          String parentRoleName,
                          String roleName,
                          org.openpermis.policy.bean.RoleHierarchyBean roleHierarchyBean)
Creates a IncludeRoleCommand.

Since:
0.3.0
Method Detail

execute

public 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
Specified by:
execute in class AbstractCommand
Parameters:
policy - the policy to execute the command on.
Throws:
Exception
Since:
0.3.0

undo

public 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
Specified by:
undo in class AbstractCommand
Parameters:
policy - the policy to revert.
Throws:
Exception
Since:
0.3.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG