org.jboss.security.config
Class ApplicationPolicy

java.lang.Object
  extended by org.jboss.security.config.ApplicationPolicy

public class ApplicationPolicy
extends Object

Application Policy Information Holder - Authentication - Authorization - Audit - Mapping

Since:
Jun 9, 2006
Version:
$Revision: 86122 $
Author:
Anil Saldhana

Constructor Summary
ApplicationPolicy(String theName)
           
ApplicationPolicy(String theName, AuthorizationInfo info)
           
ApplicationPolicy(String theName, BaseAuthenticationInfo info)
           
ApplicationPolicy(String theName, BaseAuthenticationInfo info, AuthorizationInfo info2)
           
 
Method Summary
 ACLInfo getAclInfo()
           
 AuditInfo getAuditInfo()
           
 BaseAuthenticationInfo getAuthenticationInfo()
           
 AuthorizationInfo getAuthorizationInfo()
           
 String getBaseApplicationPolicyName()
           
 IdentityTrustInfo getIdentityTrustInfo()
           
<T> MappingInfo
getMappingInfo(Class<T> t)
          Deprecated. use getMappingInfo(String) instead.
 MappingInfo getMappingInfo(String mappingType)
           Gets the MappingInfo instance that can perform the mappings of the specified type.
 String getName()
           
 PolicyConfig getPolicyConfig()
           
 MappingInfo getPrincipalMappingInfo()
          Deprecated. use ApplicationPolicy#getMappingInfo("principal") instead.
 MappingInfo getRoleMappingInfo()
          Deprecated. use ApplicationPolicy#getMappingInfo("role") instead.
 void setAclInfo(ACLInfo aclInfo)
           
 void setAuditInfo(AuditInfo auditInfo)
           
 void setAuthenticationInfo(BaseAuthenticationInfo authenticationInfo)
           
 void setAuthorizationInfo(AuthorizationInfo authorizationInfo)
           
 void setBaseApplicationPolicyName(String baseApplicationPolicy)
           
 void setIdentityTrustInfo(IdentityTrustInfo identityTrustInfo)
           
 void setMappingInfo(String mappingType, MappingInfo info)
           Sets the MappingInfo that must be used to perform the mappings of the specified type.
 void setPolicyConfig(PolicyConfig policyConfig)
           
 void setPrincipalMappingInfo(MappingInfo principalMappingInfo)
          Deprecated. use ApplicationPolicy#setMappingInfo("principal", MappingInfo) instead.
 void setRoleMappingInfo(MappingInfo roleMappingInfo)
          Deprecated. use ApplicationPolicy#setMappingInfo("role", MappingInfo) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationPolicy

public ApplicationPolicy(String theName)

ApplicationPolicy

public ApplicationPolicy(String theName,
                         BaseAuthenticationInfo info)

ApplicationPolicy

public ApplicationPolicy(String theName,
                         AuthorizationInfo info)

ApplicationPolicy

public ApplicationPolicy(String theName,
                         BaseAuthenticationInfo info,
                         AuthorizationInfo info2)
Method Detail

getAclInfo

public ACLInfo getAclInfo()

setAclInfo

public void setAclInfo(ACLInfo aclInfo)

getAuthenticationInfo

public BaseAuthenticationInfo getAuthenticationInfo()

setAuthenticationInfo

public void setAuthenticationInfo(BaseAuthenticationInfo authenticationInfo)

getAuthorizationInfo

public AuthorizationInfo getAuthorizationInfo()

setAuthorizationInfo

public void setAuthorizationInfo(AuthorizationInfo authorizationInfo)

getRoleMappingInfo

@Deprecated
public MappingInfo getRoleMappingInfo()
Deprecated. use ApplicationPolicy#getMappingInfo("role") instead.

Gets the MappingInfo object that contains the entries that will be used to map roles.

Returns:
the MappingInfo that must be used when mapping roles.

setRoleMappingInfo

@Deprecated
public void setRoleMappingInfo(MappingInfo roleMappingInfo)
Deprecated. use ApplicationPolicy#setMappingInfo("role", MappingInfo) instead.

Sets the MappingInfo object that must be used when mapping roles.

Parameters:
roleMappingInfo - the MappingInfo instance to be set.

getPrincipalMappingInfo

@Deprecated
public MappingInfo getPrincipalMappingInfo()
Deprecated. use ApplicationPolicy#getMappingInfo("principal") instead.

Gets the MappingInfo object that contains the entries that will be used to map principals.

Returns:
the MappingInfo that must be used when mapping principals.

setPrincipalMappingInfo

@Deprecated
public void setPrincipalMappingInfo(MappingInfo principalMappingInfo)
Deprecated. use ApplicationPolicy#setMappingInfo("principal", MappingInfo) instead.

Sets the MappingInfo object that must be used when mapping principals.

Parameters:
roleMappingInfo - the MappingInfo instance to be set.

getMappingInfo

@Deprecated
public <T> MappingInfo getMappingInfo(Class<T> t)
Deprecated. use getMappingInfo(String) instead.

Gets the MappingInfo instance that can map objects of the specified class.

Parameters:
t - the class of the objects that are to be mapped.
Returns:
the MappingInfo instance that must be used to map objects of the specified class.

getMappingInfo

public MappingInfo getMappingInfo(String mappingType)

Gets the MappingInfo instance that can perform the mappings of the specified type.

Parameters:
mappingType - a String representing the type of the mappings that are to be performed. This String must match the value of the type attribute of the mapping-module that has been configured in the application policy. For example, consider the following mapping policy:
 <application-policy name="test">
    <authentication>
    ...
    </authentication>
    <mapping>
       <mapping-module code = "org.jboss.test.mapping.MappingModule1" type="role">
          <module-option name = "option1">value1</module-option>
       </mapping-module>
       <mapping-module code = "org.jboss.test.mapping.MappingModule2" type="principal">
          <module-option name = "option2">value2</module-option>
       </mapping-module>
    </mapping> while a
 </application-policy>
 
Executing this method with "role" as parameter would return a MappingInfo that is capable of mapping roles using the MappingModule1. Likewise, executing this method with "principal" as parameter would return a MappingInfo that can map principals using the MappingModule2.
Returns:
the MappingInfo instance that can perform the mappings of the specified type, or null if no suitable MappingInfo can be found.

setMappingInfo

public void setMappingInfo(String mappingType,
                           MappingInfo info)

Sets the MappingInfo that must be used to perform the mappings of the specified type.

Parameters:
mappingType - the type of mappings that can be performed by the MappingInfo.
info - a reference to the MappingInfo instance to be set.

getAuditInfo

public AuditInfo getAuditInfo()

setAuditInfo

public void setAuditInfo(AuditInfo auditInfo)

getIdentityTrustInfo

public IdentityTrustInfo getIdentityTrustInfo()

setIdentityTrustInfo

public void setIdentityTrustInfo(IdentityTrustInfo identityTrustInfo)

getBaseApplicationPolicyName

public String getBaseApplicationPolicyName()

setBaseApplicationPolicyName

public void setBaseApplicationPolicyName(String baseApplicationPolicy)

getName

public String getName()

getPolicyConfig

public PolicyConfig getPolicyConfig()

setPolicyConfig

public void setPolicyConfig(PolicyConfig policyConfig)


Copyright © 2009 JBoss Inc.. All Rights Reserved.