org.jboss.security.xacml.locators
Class AttributeLocator

java.lang.Object
  extended by org.jboss.security.xacml.sunxacml.finder.AttributeFinderModule
      extended by org.jboss.security.xacml.locators.AttributeLocator
All Implemented Interfaces:
AbstractLocator, ContextMapOp

public class AttributeLocator
extends AttributeFinderModule
implements AbstractLocator

An attribute finder module Usage: Remember, when a policy defines an attribute and the request does not contain it, then the PDP will ask the AttributeLocator for a value. The following methods need to be overridden in your attribute locators

Since:
Mar 19, 2009
Author:
Anil.Saldhana@redhat.com
See Also:
AttributeFinderModule.findAttribute(String, org.w3c.dom.Node, URI, org.jboss.security.xacml.sunxacml.EvaluationCtx, String), AttributeFinderModule.findAttribute(URI, URI, URI, URI, org.jboss.security.xacml.sunxacml.EvaluationCtx, int)

Field Summary
 
Fields inherited from interface org.jboss.security.xacml.interfaces.AbstractLocator
ATTRIBUTE_DESIGNATOR_INTEGER_TAG, ATTRIBUTE_DESIGNATOR_SUPPORT_TAG, ATTRIBUTE_SELECTOR_SUPPORT_TAG, ATTRIBUTE_SUPPORTED_ID_TAG, IDENTIFIER_TAG, RESOURCE_CHILD_SUPPORTED_TAG, RESOURCE_DESCENDANT_SUPPORTED_TAG
 
Constructor Summary
AttributeLocator()
           
 
Method Summary
<T> T
get(String key)
          Get an element from the map
 String getIdentifier()
          Returns this module's identifier.
 Set getSupportedDesignatorTypes()
          Returns a Set of Integers that represent which AttributeDesignator types are supported (eg, Subject, Resource, etc.), or null meaning that no particular types are supported.
 Set getSupportedIds()
          Returns a Set of URIs that represent the attributeIds handled by this module, or null if this module doesn't handle any specific attributeIds.
 boolean isDesignatorSupported()
          Returns true if this module supports retrieving attributes based on the data provided in an AttributeDesignatorType.
 boolean isSelectorSupported()
          Returns true if this module supports retrieving attributes based on the data provided in an AttributeSelectorType.
<T> void
set(String key, T obj)
          Set an object on the map
 void setOptions(List<Option> options)
          Set a list of options on the locator
 
Methods inherited from class org.jboss.security.xacml.sunxacml.finder.AttributeFinderModule
findAttribute, findAttribute, invalidateCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeLocator

public AttributeLocator()
Method Detail

setOptions

public void setOptions(List<Option> options)
Description copied from interface: AbstractLocator
Set a list of options on the locator

Specified by:
setOptions in interface AbstractLocator

get

public <T> T get(String key)
Description copied from interface: ContextMapOp
Get an element from the map

Specified by:
get in interface ContextMapOp
Type Parameters:
T - object from the map
Parameters:
key - Key
Returns:
object from the map

set

public <T> void set(String key,
                    T obj)
Description copied from interface: ContextMapOp
Set an object on the map

Specified by:
set in interface ContextMapOp
Parameters:
key - Key for the map
obj - Object to be placed

getIdentifier

public String getIdentifier()
Description copied from class: AttributeFinderModule
Returns this module's identifier. A module does not need to provide a unique identifier, but it is a good idea, especially in support of management software. Common identifiers would be the full package and class name (the default if this method isn't overridden), just the class name, or some other well-known string that identifies this class.

Overrides:
getIdentifier in class AttributeFinderModule
Returns:
this module's identifier

getSupportedDesignatorTypes

public Set getSupportedDesignatorTypes()
Description copied from class: AttributeFinderModule
Returns a Set of Integers that represent which AttributeDesignator types are supported (eg, Subject, Resource, etc.), or null meaning that no particular types are supported. A return value of null can mean that this module doesn't support designator retrieval, or that it supports designators of all types. If the set is non-null, it should contain the values specified in the AttributeDesignator *_TARGET fields.

Overrides:
getSupportedDesignatorTypes in class AttributeFinderModule
Returns:
a Set of Integers, or null

getSupportedIds

public Set getSupportedIds()
Description copied from class: AttributeFinderModule
Returns a Set of URIs that represent the attributeIds handled by this module, or null if this module doesn't handle any specific attributeIds. A return value of null means that this module will try to resolve attributes of any id.

Overrides:
getSupportedIds in class AttributeFinderModule
Returns:
a Set of URIs, or null

isDesignatorSupported

public boolean isDesignatorSupported()
Description copied from class: AttributeFinderModule
Returns true if this module supports retrieving attributes based on the data provided in an AttributeDesignatorType. By default this method returns false.

Overrides:
isDesignatorSupported in class AttributeFinderModule
Returns:
true if retrieval based on designator data is supported

isSelectorSupported

public boolean isSelectorSupported()
Description copied from class: AttributeFinderModule
Returns true if this module supports retrieving attributes based on the data provided in an AttributeSelectorType. By default this method returns false.

Overrides:
isSelectorSupported in class AttributeFinderModule
Returns:
true if retrieval based on selector data is supported


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.