org.apache.jetspeed.security
Class SecurityPolicies

java.lang.Object
  extended by org.apache.jetspeed.security.SecurityPolicies

public class SecurityPolicies
extends Object

This class is used to hold the security that will be used when applying security policies. It uses a singleton pattern to maintain state of the policies configured in the consuming engine.

Author:
David Le Strat

Field Summary
private static SecurityPolicies instance
          The singleton instance.
private  List policies
          The list of policies.
private  List usedPolicies
          The list of used policies.
private  List wrappedPolicies
          The list of wrapped policies.
 
Constructor Summary
private SecurityPolicies()
          Default contructor.
 
Method Summary
 void addPolicy(PolicyWrapper wrappedPolicy)
           Adds a policy to the list of policies to enforces.
static SecurityPolicies getInstance()
           Returns the singleton instance for SecurityPolicies.
 List getPolicies()
           Returns the security policies to enforce as list of Policy.
 List getUsedPolicies()
           Returns the security policies to be enforced as list of Policy.
 List getWrappedPolicies()
           Returns the security policies to enforce as list of PolicyWrapper.
 void removePolicy(PolicyWrapper policy)
           Removes a policy from the list of policies to enforces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static SecurityPolicies instance
The singleton instance.


wrappedPolicies

private List wrappedPolicies
The list of wrapped policies.


policies

private List policies
The list of policies.


usedPolicies

private List usedPolicies
The list of used policies.

Constructor Detail

SecurityPolicies

private SecurityPolicies()
Default contructor. Private to force singleton.

Method Detail

getInstance

public static SecurityPolicies getInstance()

Returns the singleton instance for SecurityPolicies.

Returns:
The instance of SecurityPolicies

addPolicy

public void addPolicy(PolicyWrapper wrappedPolicy)

Adds a policy to the list of policies to enforces.

Parameters:
wrappedPolicy - The PolicyWrapper to add.

getPolicies

public List getPolicies()

Returns the security policies to enforce as list of Policy.

Returns:
The policies.

getUsedPolicies

public List getUsedPolicies()

Returns the security policies to be enforced as list of Policy.

Returns:
The used policies.

getWrappedPolicies

public List getWrappedPolicies()

Returns the security policies to enforce as list of PolicyWrapper.

Returns:
The policies.

removePolicy

public void removePolicy(PolicyWrapper policy)

Removes a policy from the list of policies to enforces.

Parameters:
policy - The Policy to add.


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.