Package org.jboss.security.config
Class ApplicationPolicy
- java.lang.Object
-
- org.jboss.security.config.ApplicationPolicy
-
public class ApplicationPolicy extends Object
Application Policy Information Holder - Authentication - Authorization - Audit - Mapping- Since:
- Jun 9, 2006
- Version:
- $Revision$
- Author:
- Anil Saldhana, Marcus Moyses
-
-
Constructor Summary
Constructors Constructor Description ApplicationPolicy(String theName)
ApplicationPolicy(String theName, BaseAuthenticationInfo info)
ApplicationPolicy(String theName, BaseAuthenticationInfo info, AuthorizationInfo info2)
ApplicationPolicy(String theName, AuthorizationInfo info)
-
Method Summary
-
-
-
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.usegetMappingInfo(String)
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.usesetMappingInfo(String, MappingInfo)
instead.Sets the
MappingInfo
object that must be used when mapping roles.- Parameters:
roleMappingInfo
- theMappingInfo
instance to be set.
-
getPrincipalMappingInfo
@Deprecated public MappingInfo getPrincipalMappingInfo()
Deprecated.usegetMappingInfo(String)
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.usesetMappingInfo(String, MappingInfo)
instead.Sets the
MappingInfo
object that must be used when mapping principals.- Parameters:
principalMappingInfo
- theMappingInfo
instance to be set.
-
getMappingInfo
@Deprecated public <T> MappingInfo getMappingInfo(Class<T> t)
Deprecated.usegetMappingInfo(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
- aString
representing the type of the mappings that are to be performed. ThisString
must match the value of thetype
attribute of themapping-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 aMappingInfo
that is capable of mapping roles using theMappingModule1
. Likewise, executing this method with"principal"
as parameter would return aMappingInfo
that can map principals using theMappingModule2
.- Returns:
- the
MappingInfo
instance that can perform the mappings of the specified type, ornull
if no suitableMappingInfo
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 theMappingInfo
.info
- a reference to theMappingInfo
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)
-
writeContent
public void writeContent(XMLStreamWriter writer) throws XMLStreamException
Write element content.- Parameters:
writer
-- Throws:
XMLStreamException
-
-