org.jboss.security.microcontainer.beans.metadata
Class ApplicationPolicyMetaDataFactory

java.lang.Object
  extended by org.jboss.security.microcontainer.beans.metadata.ApplicationPolicyMetaDataFactory
All Implemented Interfaces:
org.jboss.beans.metadata.spi.BeanMetaDataFactory

public class ApplicationPolicyMetaDataFactory
extends Object
implements org.jboss.beans.metadata.spi.BeanMetaDataFactory

This class represents the <application-policy> element in a security configuration. It is also a BeanMetaDataFactory implementation that uses all the metadata created during the XB parse to build an instance of ApplicationPolicyBean.

An example of <application-policy> configuration is as follows:

 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
    <application-policy xmlns="urn:jboss:security-beans:1.0" name="TestPolicy1">
       <authentication>
          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
             <module-option name="usersProperties">jboss-users.properties</module-option>
             <module-option name="rolesProperties">jboss-roles.properties</module-option>
          </login-module>
       </authentication>
    </application-policy>
    ...
 </deployment>
 
The information parsed from an <application-policy> configuration is used to create a graph of metadata classes that has this class as root. Being a BeanMetaDataFactory, this class uses the metadata graph to create an instance of ApplicationPolicyBean and all correlated beans, registering them with the microcontainer.

Author:
Stefan Guilhen
See Also:
ApplicationPolicyBean

Field Summary
protected static org.jboss.logging.Logger logger
           
 
Constructor Summary
ApplicationPolicyMetaDataFactory()
           
 
Method Summary
 List<org.jboss.beans.metadata.spi.BeanMetaData> getBeans()
           
 void setAcl(ACLMetaData aclMetaData)
           Sets the metadata generated as a result of parsing the <acl> element in an application policy configuration.
 void setAudit(AuditMetaData auditMetaData)
           Sets the metadata generated as a result of parsing the <audit> element in an application policy configuration.
 void setAuthentication(AuthenticationMetaData authMetaData)
           Sets the metadata generated as a result of parsing the <authentication> element in an application policy configuration.
 void setAuthorization(AuthorizationMetaData authzMetaData)
           Sets the metadata generated as a result of parsing the <authorization> element in an application policy configuration.
 void setIdentityTrust(IdentityTrustMetaData trustMetaData)
           Sets the metadata generated as a result of parsing the <identity-trust> element in an application policy configuration.
 void setJaspiAuthentication(JASPIAuthenticationMetaData jaspiMetaData)
           Sets the metadata generated as a result of parsing the <authentication-jaspi> element in an application policy configuration.
 void setMapping(MappingMetaData mappingMetaData)
           Sets the metadata generated as a result of parsing the <mapping> element in an application policy configuration.
 void setParentPolicy(String parentPolicy)
           Sets the name of the parent application policy, if applicable.
 void setPolicyName(String policyName)
           Sets the name of the application policy.
 void setRoleMapping(MappingMetaData mappingMetaData)
           Sets the metadata generated as a result of parsing the <rolemapping> element in an application policy configuration.
 void setSecurityManagement(String securityManagement)
           Sets the name of the security management bean that must be injected into the policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

ApplicationPolicyMetaDataFactory

public ApplicationPolicyMetaDataFactory()
Method Detail

setPolicyName

public void setPolicyName(String policyName)

Sets the name of the application policy.

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

setParentPolicy

public void setParentPolicy(String parentPolicy)

Sets the name of the parent application policy, if applicable.

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

setSecurityManagement

public void setSecurityManagement(String securityManagement)

Sets the name of the security management bean that must be injected into the policy.

Parameters:
securityManagement - a String representing the name of the management bean.

setAuthentication

public void setAuthentication(AuthenticationMetaData authMetaData)

Sets the metadata generated as a result of parsing the <authentication> element in an application policy configuration.

Parameters:
authMetaData - a reference to the generated AuthenticationMetaData.

setJaspiAuthentication

public void setJaspiAuthentication(JASPIAuthenticationMetaData jaspiMetaData)

Sets the metadata generated as a result of parsing the <authentication-jaspi> element in an application policy configuration.

Parameters:
jaspiMetaData - a reference to the generated JASPIAuthenticationMetaData.

setAuthorization

public void setAuthorization(AuthorizationMetaData authzMetaData)

Sets the metadata generated as a result of parsing the <authorization> element in an application policy configuration.

Parameters:
authzMetaData - a reference to the generated AuthorizationMetaData.

setAcl

public void setAcl(ACLMetaData aclMetaData)

Sets the metadata generated as a result of parsing the <acl> element in an application policy configuration.

Parameters:
aclMetaData - a reference to the generated ACLMetaData.

setRoleMapping

public void setRoleMapping(MappingMetaData mappingMetaData)

Sets the metadata generated as a result of parsing the <rolemapping> element in an application policy configuration.

Parameters:
mappingMetaData - a reference to the generated MappingMetaData.

setMapping

public void setMapping(MappingMetaData mappingMetaData)

Sets the metadata generated as a result of parsing the <mapping> element in an application policy configuration.

Parameters:
mappingMetaData - a reference to the generated MappingMetaData.

setAudit

public void setAudit(AuditMetaData auditMetaData)

Sets the metadata generated as a result of parsing the <audit> element in an application policy configuration.

Parameters:
auditMetaData - a reference to the generated AuditMetaData.

setIdentityTrust

public void setIdentityTrust(IdentityTrustMetaData trustMetaData)

Sets the metadata generated as a result of parsing the <identity-trust> element in an application policy configuration.

Parameters:
trustMetaData - a reference to the generated IdentityTrustMetaData.

getBeans

public List<org.jboss.beans.metadata.spi.BeanMetaData> getBeans()
Specified by:
getBeans in interface org.jboss.beans.metadata.spi.BeanMetaDataFactory


Copyright © 2009 JBoss Inc.. All Rights Reserved.