org.jboss.security.microcontainer.beans
Class ApplicationPolicyBean

java.lang.Object
  extended by org.jboss.security.microcontainer.beans.ApplicationPolicyBean

public class ApplicationPolicyBean
extends Object

This class represents an application policy. An application policy describes the security requirements (authentication, authorization, role-mapping, audit, and identity-trust) for a specific security domain. Each of these requirements is described by the appropriate sub-policy.

Once this bean is started by the microcontainer it uses the information from all configured sub-policies to generate an org.jboss.security.config.ApplicationPolicy and then registers the generated policy with the security layer.

Author:
Stefan Guilhen
See Also:
BaseAuthenticationPolicy, AuthorizationPolicyBean, ACLPolicyBean, MappingPolicyBean, AuditPolicyBean, IdentityTrustPolicyBean

Field Summary
protected static org.jboss.logging.Logger logger
           
 
Constructor Summary
ApplicationPolicyBean()
           
 
Method Summary
 ACLPolicyBean getAclPolicy()
           Obtains the acl policy that has been configured as part of this application policy.
 ApplicationPolicy getApplicationPolicy()
           Creates and return an org.jboss.security.conf.ApplicationPolicy object using the information contained in this bean and in the sub-policies beans.
 org.jboss.security.audit.AuditManager getAuditManager()
           Obtains a reference to the AuditManager that enforces the audit policy.
 AuditPolicyBean getAuditPolicy()
           Obtains the audit policy that has been configured as part of this application policy.
 org.jboss.security.AuthenticationManager getAuthenticationManager()
           Obtains a reference to the AuthenticationManager that enforces the authentication policy.
 BaseAuthenticationPolicy<?> getAuthenticationPolicy()
           Obtains the authentication policy that has been configured as part of this application policy.
 org.jboss.security.AuthorizationManager getAuthorizationManager()
           Obtains a reference to the AuthorizationManager that enforces the authorization policy.
 AuthorizationPolicyBean getAuthorizationPolicy()
           Obtains the authorization policy that has been configured as part of this application policy.
 org.jboss.security.identitytrust.IdentityTrustManager getIdentityTrustManager()
           Obtains a reference to the IdentityTrustManager that enforces the identity-trust policy.
 IdentityTrustPolicyBean getIdentityTrustPolicy()
           Obtains the identity-trust policy that has been configured as part of this application policy.
 org.jboss.security.mapping.MappingManager getMappingManager()
           Obtains a reference to the MappingManager that enforces the role-mapping policy.
 MappingPolicyBean getMappingPolicy()
           Obtains the generic mapping policy that has been configured as part of this application policy.
 String getName()
           Obtains the name of the application policy.
 String getParentPolicy()
           Obtains the name of the parent policy.
 MappingPolicyBean getRoleMappingPolicy()
           Obtains the role-mapping policy that has been configured as part of this application policy.
 void setAclPolicy(ACLPolicyBean aclPolicy)
           Sets the acl policy to be used by this application policy.
 void setAuditPolicy(AuditPolicyBean auditPolicy)
           Sets the audit policy to be used by this application policy.
 void setAuthenticationPolicy(BaseAuthenticationPolicy<?> authenticationPolicy)
           Sets the authentication policy to be used by this application policy.
 void setAuthorizationPolicy(AuthorizationPolicyBean authorizationPolicy)
           Sets the authorization policy to be used by this application policy.
 void setIdentityTrustPolicy(IdentityTrustPolicyBean identityTrustPolicy)
           Sets the identity-trust policy to be used by this application policy.
 void setMappingPolicy(MappingPolicyBean mappingPolicy)
           Sets the generic mapping policy to be used by this application policy.
 void setName(String name)
           Sets the name of the application policy.
 void setParentPolicy(String parentPolicy)
           Sets the name of the parent policy.
 void setRoleMappingPolicy(MappingPolicyBean roleMappingPolicy)
           Sets the role-mapping policy to be used by this application policy.
 void setSecurityManagement(org.jboss.security.ISecurityManagement securityManagement)
           Sets the ISecurityManagement implementation that must be used by this bean to obtain the various security managers that enforce the security policies specified for the domain this bean represents.
 void start()
           Registers the application policy with the security framework once this bean has started.
 void stop()
           Unregisters the application policy from the security framework when the bean stops.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.jboss.logging.Logger logger
Constructor Detail

ApplicationPolicyBean

public ApplicationPolicyBean()
Method Detail

getName

public String getName()

Obtains the name of the application policy.

Returns:
a String representing the name of the application policy.

setName

public void setName(String name)

Sets the name of the application policy.

Parameters:
name - a String representing the name to be set.

getParentPolicy

public String getParentPolicy()

Obtains the name of the parent policy.

Returns:
a String representing the name of the parent policy.

setParentPolicy

public void setParentPolicy(String parentPolicy)

Sets the name of the parent policy.

Parameters:
parentPolicy - a String representing the name of the parent policy to be set.

getAuthenticationPolicy

public BaseAuthenticationPolicy<?> getAuthenticationPolicy()

Obtains the authentication policy that has been configured as part of this application policy.

Returns:
a BaseAuthenticationPolicy representing the configured authentication policy.

setAuthenticationPolicy

public void setAuthenticationPolicy(BaseAuthenticationPolicy<?> authenticationPolicy)

Sets the authentication policy to be used by this application policy.

Parameters:
authenticationPolicy - a BaseAuthenticationPolicy representing the policy to be set.

getAuthorizationPolicy

public AuthorizationPolicyBean getAuthorizationPolicy()

Obtains the authorization policy that has been configured as part of this application policy.

Returns:
an AuthorizationPolicyBean representing the configured authorization policy.

setAuthorizationPolicy

public void setAuthorizationPolicy(AuthorizationPolicyBean authorizationPolicy)

Sets the authorization policy to be used by this application policy.

Parameters:
authorizationPolicy - an AuthorizationPolicyBean representing the policy to be set.

getAclPolicy

public ACLPolicyBean getAclPolicy()

Obtains the acl policy that has been configured as part of this application policy.

Returns:
an ACLPolicyBean representing the configured acl policy.

setAclPolicy

public void setAclPolicy(ACLPolicyBean aclPolicy)

Sets the acl policy to be used by this application policy.

Parameters:
aclPolicy - an ACLPolicyBean representing the policy to be set.

getRoleMappingPolicy

public MappingPolicyBean getRoleMappingPolicy()

Obtains the role-mapping policy that has been configured as part of this application policy.

Returns:
a MappingPolicyBean representing the configured role-mapping policy.

setRoleMappingPolicy

public void setRoleMappingPolicy(MappingPolicyBean roleMappingPolicy)

Sets the role-mapping policy to be used by this application policy.

Parameters:
roleMappingPolicy - a MappingPolicyBean representing the policy to be set.

getMappingPolicy

public MappingPolicyBean getMappingPolicy()

Obtains the generic mapping policy that has been configured as part of this application policy.

Returns:
a MappingPolicyBean representing the configured mapping policy.

setMappingPolicy

public void setMappingPolicy(MappingPolicyBean mappingPolicy)

Sets the generic mapping policy to be used by this application policy.

Parameters:
mappingPolicy - a MappingPolicyBean representing the policy to be set.

getAuditPolicy

public AuditPolicyBean getAuditPolicy()

Obtains the audit policy that has been configured as part of this application policy.

Returns:
an AuditPolicyBean representing the configured audit policy.

setAuditPolicy

public void setAuditPolicy(AuditPolicyBean auditPolicy)

Sets the audit policy to be used by this application policy.

Parameters:
auditPolicy - an AuditPolicyBean representing the policy to be set.

getIdentityTrustPolicy

public IdentityTrustPolicyBean getIdentityTrustPolicy()

Obtains the identity-trust policy that has been configured as part of this application policy.

Returns:
an IdentityTrustPolicyBean representing the configured identity-trust policy.

setIdentityTrustPolicy

public void setIdentityTrustPolicy(IdentityTrustPolicyBean identityTrustPolicy)

Sets the identity-trust policy to be used by this application policy.

Parameters:
identityTrustPolicy - an IdentityTrustPolicyBean representing the policy to be set.

setSecurityManagement

public void setSecurityManagement(org.jboss.security.ISecurityManagement securityManagement)

Sets the ISecurityManagement implementation that must be used by this bean to obtain the various security managers that enforce the security policies specified for the domain this bean represents.

Parameters:
securityManagement - an implementation of the ISecurityManagement interface.

getAuthenticationManager

public org.jboss.security.AuthenticationManager getAuthenticationManager()

Obtains a reference to the AuthenticationManager that enforces the authentication policy.

Returns:
the AuthenticationManager that authenticates users according to the specified policy, or null if no AuthenticationManager is available.

getAuthorizationManager

public org.jboss.security.AuthorizationManager getAuthorizationManager()

Obtains a reference to the AuthorizationManager that enforces the authorization policy.

Returns:
the AuthorizationManager that authorizes access to resources according to the specified policy, or null if no AuthorizationManager is available.

getMappingManager

public org.jboss.security.mapping.MappingManager getMappingManager()

Obtains a reference to the MappingManager that enforces the role-mapping policy.

Returns:
the MappingManager that maps roles and identities according to the specified policy, or null if no MappingManager is available.

getAuditManager

public org.jboss.security.audit.AuditManager getAuditManager()

Obtains a reference to the AuditManager that enforces the audit policy.

Returns:
the AuditManager that records security events according to the specified policy, or null if no AuditManager is available.

getIdentityTrustManager

public org.jboss.security.identitytrust.IdentityTrustManager getIdentityTrustManager()

Obtains a reference to the IdentityTrustManager that enforces the identity-trust policy.

Returns:
the IdentityTrustManager implementation to be used, or null if no IdentityTrustManager is available.

start

public void start()
           throws Exception

Registers the application policy with the security framework once this bean has started.

Throws:
Exception - if an error occurs while registering the application policy.

stop

public void stop()
          throws Exception

Unregisters the application policy from the security framework when the bean stops.

Throws:
Exception - if an error occurs while unregistering the application policy.

getApplicationPolicy

public ApplicationPolicy getApplicationPolicy()

Creates and return an org.jboss.security.conf.ApplicationPolicy object using the information contained in this bean and in the sub-policies beans.

Returns:
a reference to the constructed ApplicationPolicy object.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 JBoss Inc.. All Rights Reserved.