com.ibm.sec.authz.jaccplus
Class ApplicationAttributes
- java.lang.Object
com.ibm.sec.authz.jaccplus.ApplicationAttributes
- public class ApplicationAttributes
- 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:
Field Summary
Modifier and Type | Field and Description |
---|---|
|
ATTR_ACTION_KEY
The context key for getting or registering an AttributesHandler for Action attributes.
|
|
ATTR_ENVIRONMENT_KEY
The context key for getting or registering an AttributesHandler for Environment attributes.
|
|
ATTR_RESOURCE_KEY
The context key for getting or registering an AttributesHandler for Resource attributes.
|
|
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 |
---|---|
|
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.
|
|
getSupportedAttributes()
Method used to retrieve all of the attribute identifiers that all registered
IAttributesHandler implementations can retrieve.
|
|
registerHandler(IAttributesHandler handler)
Method used to register an
IAttributesHandler to retrieve all
attributes it supports.
|
|
registerHandler(java.lang.String attributeId,IAttributesHandler handler)
Method used to register a particular
IAttributesHandler to retrieve
a specific attribute identifier.
|
|
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
- 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
- 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
- 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
- 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
- public ApplicationAttributes()
Method Detail
getAttributes
- public java.util.List<java.lang.Object> getAttributes( java.lang.String attributeId,
- EvaluationContext evalCtx)
- 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
- public java.util.Set<java.lang.String> getSupportedAttributes( )
- 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
- public void registerHandler(java.lang.String attributeId,
- 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
- 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
- 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.