com.bea.ales.management
Class AuthorizationPolicy

java.lang.Object
  |
  +--com.bea.ales.management.AbstractPolicy
        |
        +--com.bea.ales.management.AuthorizationPolicy

public final class AuthorizationPolicy
extends com.bea.ales.management.AbstractPolicy

This class represents an authorization policy. It is managed by PoliciesManager. Changes to objects of this class will be saved to store automatically.


Method Summary
 void addAction(Action action)
          Add an action to the authorization policy.
 void addActions(java.util.List actions)
          Add actions to the policy.
 java.util.List getActions()
          Get all actions of the policy.
 void removeAction(Action action)
          Remove an action from the authorization policy.
 void removeActions(java.util.List actions)
          Remove all actions in the actions from the policy.
 void setActions(java.util.List actions)
          Set actions of the authorization policy.
 java.lang.String toString()
          Convert the authorization policy to a string representation.
static AuthorizationPolicy valueOf(PoliciesManager policiesManager, java.lang.String ruleText)
          Construct an authorization policy from a string representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getActions

public java.util.List getActions()
Get all actions of the policy.

Returns:
list of actions as Action.

setActions

public void setActions(java.util.List actions)
                throws java.lang.IllegalArgumentException,
                       ManagementException
Set actions of the authorization policy. All existing actions will be removed.

Parameters:
actions - list of actions as Action.
Throws:
java.lang.IllegalArgumentException - if actions is null or empty.
ManagementException - if the operation fails.

addActions

public void addActions(java.util.List actions)
                throws java.lang.IllegalArgumentException,
                       ManagementException
Add actions to the policy.

Parameters:
actions - actions to be added as Action.
Throws:
java.lang.IllegalArgumentException - if actions is null or empty, or its element type is not Action.
ManagementException - if the operation fails.

removeActions

public void removeActions(java.util.List actions)
                   throws java.lang.IllegalArgumentException,
                          ManagementException
Remove all actions in the actions from the policy.

Parameters:
actions - actions to be removed as Action.
Throws:
java.lang.IllegalArgumentException - if the actions is null or empty, or its element type is not Action.
ManagementException - if the operation fails.

addAction

public void addAction(Action action)
               throws java.lang.IllegalArgumentException,
                      ManagementException
Add an action to the authorization policy.

Parameters:
action - the action to be added.
Throws:
java.lang.IllegalArgumentException - if action is null.
ManagementException - if the operation fails.

removeAction

public void removeAction(Action action)
                  throws java.lang.IllegalArgumentException,
                         ManagementException
Remove an action from the authorization policy.

Parameters:
action - the action to be removed.
Throws:
java.lang.IllegalArgumentException - if action is null, or the policy does not contain the action, or it's the only action in the policy.
ManagementException - if the operation fails.

toString

public java.lang.String toString()
                          throws java.lang.IllegalStateException
Convert the authorization policy to a string representation.

Throws:
java.lang.IllegalStateException - if the policy is not in a valid state.
Overrides:
toString in class com.bea.ales.management.AbstractPolicy

valueOf

public static AuthorizationPolicy valueOf(PoliciesManager policiesManager,
                                          java.lang.String ruleText)
                                   throws ManagementException
Construct an authorization policy from a string representation.

Parameters:
policiesManager - the policies manager.
ruleText - string representation of the policy.
Returns:
the created AuthorizatinPolicy instance.
Throws:
ManagementException - if the operation fails.


Copyright © 2006 BEA Systems Inc. All Rights Reserved.