com.ibm.sec.authz.jaccplus

Class ApplicationAttributes

  1. java.lang.Object
  2. extended bycom.ibm.sec.authz.jaccplus.ApplicationAttributes

  1. public class ApplicationAttributes
  2. extends java.lang.Object

Manages the instances of IAttributesHandler for a particular section of a request, such as Subject or Resource. Each instance can have any number of handlers registered.

See Also:
EvaluationContext

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
ATTR_ACTION_KEY
The context key for getting or registering an AttributesHandler for Action attributes.
  1. static
  2. java.lang.String
ATTR_ENVIRONMENT_KEY
The context key for getting or registering an AttributesHandler for Environment attributes.
  1. static
  2. java.lang.String
ATTR_RESOURCE_KEY
The context key for getting or registering an AttributesHandler for Resource attributes.
  1. static
  2. java.lang.String
ATTR_SUBJECT_KEY
The context key for getting or registering an AttributesHandler for Subject attributes.

Constructor Summary

Constructor and Description
ApplicationAttributes()

Method Summary

Modifier and Type Method and Description
  1. java.util.List<java.lang.Object>
getAttributes(java.lang.String attributeId,EvaluationContext evalCtx)
Gets all the values of the specified attribute identifier by calling all registered instances of IAttributesHandler and collating the results.
  1. java.util.Set<java.lang.String>
getSupportedAttributes()
Method used to retrieve all of the attribute identifiers that all registered IAttributesHandler implementations can retrieve.
  1. void
registerHandler(IAttributesHandler handler)
Method used to register an IAttributesHandler to retrieve all attributes it supports.
  1. void
registerHandler(java.lang.String attributeId,IAttributesHandler handler)
Method used to register a particular IAttributesHandler to retrieve a specific attribute identifier.
  1. boolean
supports(java.lang.String attributeId)
Method used to determine if an attribute identifier can be retrieved from any registered handlers.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ATTR_SUBJECT_KEY

  1. public static final java.lang.String ATTR_SUBJECT_KEY
The context key for getting or registering an AttributesHandler for Subject attributes.
See Also:

ATTR_RESOURCE_KEY

  1. public static final java.lang.String ATTR_RESOURCE_KEY
The context key for getting or registering an AttributesHandler for Resource attributes.
See Also:

ATTR_ACTION_KEY

  1. public static final java.lang.String ATTR_ACTION_KEY
The context key for getting or registering an AttributesHandler for Action attributes.
See Also:

ATTR_ENVIRONMENT_KEY

  1. public static final java.lang.String ATTR_ENVIRONMENT_KEY
The context key for getting or registering an AttributesHandler for Environment attributes.
See Also:

Constructor Detail

ApplicationAttributes

  1. public ApplicationAttributes()

Method Detail

getAttributes

  1. public java.util.List<java.lang.Object> getAttributes( java.lang.String attributeId,
  2. EvaluationContext evalCtx)
  3. throws PolicyContextException
Gets all the values of the specified attribute identifier by calling all registered instances of IAttributesHandler and collating the results.
Parameters:
attributeId - The String identifier of the attribute to retrieve.
evalCtx - The EvaluationContext of the authorization decision in progress.
Returns:
a list of attribute values
Throws:
PolicyContextException - if an error occurs during attribute retrieval.

getSupportedAttributes

  1. public java.util.Set<java.lang.String> getSupportedAttributes( )
  2. throws PolicyContextException
Method used to retrieve all of the attribute identifiers that all registered IAttributesHandler implementations can retrieve.
Returns:
a set of supported attribute identifiers.
Throws:
PolicyContextException - if an error occurs.

registerHandler

  1. public void registerHandler(java.lang.String attributeId,
  2. IAttributesHandler handler)

Method used to register a particular IAttributesHandler to retrieve a specific attribute identifier.

Implementations of IAttributesHandler can support multiple attribute identifiers. This method ensures it is only invoked for the specific attribute identifier passed.

Parameters:
attributeId - The String identifier of the attribute to register.
handler - The handler to be registered against the specified key.

registerHandler

  1. public void registerHandler(IAttributesHandler handler)

Method used to register an IAttributesHandler to retrieve all attributes it supports.

Implementations of IAttributesHandler can support multiple attribute identifiers. This method ensures it is invoked for every attribute it can retrieve.

Parameters:
handler - The handler to be registered.

supports

  1. public boolean supports(java.lang.String attributeId)
Method used to determine if an attribute identifier can be retrieved from any registered handlers.
Parameters:
attributeId - The String identifier of the attribute to look up.
Returns:
true if the attribute is supported, false otherwise.