com.ibm.sec.authz.jaccplus.internal
Class GenericRoleRefPermissionConverter

java.lang.Object
  extended by com.ibm.sec.authz.jaccplus.internal.AbstractPermissionTransformer
      extended by com.ibm.sec.authz.jaccplus.internal.GenericRoleRefPermissionConverter
All Implemented Interfaces:
IPermissionTransformer

public class GenericRoleRefPermissionConverter
extends AbstractPermissionTransformer

This class is used to convert a GenericRoleRefPermission into XACML format.


Field Summary
protected static java.lang.String ATTR_ACTION_ID
           
protected static java.lang.String ATTR_SUBJECT_ROLE
           
protected static java.net.URI VALUE_HAS_ROLE
           
 
Constructor Summary
GenericRoleRefPermissionConverter(com.ibm.sec.authz.xacml.config.XACMLPolicyFactory factory, com.ibm.sec.authz.xacml.provider.XACMLRequestFactory reqFactory)
           
 
Method Summary
 void addPermissionToRequest(java.security.Permission p, com.ibm.sec.authz.xacml.provider.Request r)
          Convert the passed Permission object into XACML format by adding appropriate attributes to the XACML4J request object.
 com.ibm.sec.authz.xacml.policy.Rule convertPermissionToRule(java.security.Permission p)
          This method is used to convert the passed Permission object into an XACML rule.
 java.security.Permission createPermission(com.ibm.sec.authz.xacml.provider.Entitlement entitlement)
          Create a instance of a Permission object, based on an XACML4J entitlement.
 java.lang.Object getConstantValue(com.ibm.sec.authz.xacml.policy.AttributeDesignator designator)
          If the passed AttributeDesignator has a constant value, return it.
 com.ibm.sec.authz.xacml.policy.AttributeDesignator[] getVocabulary()
          Get the set of AttributeDesignators that this IPermissionTransformer uses to represent this Permission class.
 boolean supportsEntitlements()
          If true, this permission transformer supports the conversion back from XACML4J entitlements into Permission objects.
 
Methods inherited from class com.ibm.sec.authz.jaccplus.internal.AbstractPermissionTransformer
getAttributeValues, getSingleAttributeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_SUBJECT_ROLE

protected static final java.lang.String ATTR_SUBJECT_ROLE
See Also:
Constant Field Values

ATTR_ACTION_ID

protected static final java.lang.String ATTR_ACTION_ID
See Also:
Constant Field Values

VALUE_HAS_ROLE

protected static final java.net.URI VALUE_HAS_ROLE
Constructor Detail

GenericRoleRefPermissionConverter

public GenericRoleRefPermissionConverter(com.ibm.sec.authz.xacml.config.XACMLPolicyFactory factory,
                                         com.ibm.sec.authz.xacml.provider.XACMLRequestFactory reqFactory)
Method Detail

addPermissionToRequest

public void addPermissionToRequest(java.security.Permission p,
                                   com.ibm.sec.authz.xacml.provider.Request r)
Description copied from interface: IPermissionTransformer
Convert the passed Permission object into XACML format by adding appropriate attributes to the XACML4J request object.

Parameters:
p - The Permission to convert
r - The XACML request to update

convertPermissionToRule

public com.ibm.sec.authz.xacml.policy.Rule convertPermissionToRule(java.security.Permission p)
                                                            throws com.ibm.sec.authz.xacml.config.XACMLConfigurationException
Description copied from interface: IPermissionTransformer
This method is used to convert the passed Permission object into an XACML rule.

Parameters:
p - The Permission object to convert
Returns:
Rule
Throws:
com.ibm.sec.authz.xacml.config.XACMLConfigurationException

getVocabulary

public com.ibm.sec.authz.xacml.policy.AttributeDesignator[] getVocabulary()
Description copied from interface: IPermissionTransformer
Get the set of AttributeDesignators that this IPermissionTransformer uses to represent this Permission class.

Returns:

getConstantValue

public java.lang.Object getConstantValue(com.ibm.sec.authz.xacml.policy.AttributeDesignator designator)
Description copied from interface: IPermissionTransformer
If the passed AttributeDesignator has a constant value, return it. Otherwise, return null.

Returns:

createPermission

public java.security.Permission createPermission(com.ibm.sec.authz.xacml.provider.Entitlement entitlement)
Description copied from interface: IPermissionTransformer
Create a instance of a Permission object, based on an XACML4J entitlement.

Returns:

supportsEntitlements

public boolean supportsEntitlements()
Description copied from interface: IPermissionTransformer
If true, this permission transformer supports the conversion back from XACML4J entitlements into Permission objects.

Returns:
True if entitlement conversions are supported


Copyright © 2009 IBM Corp. All Rights Reserved.