Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.finder.impl
Class SelectorModule  view SelectorModule download SelectorModule.java

java.lang.Object
  extended bycom.sun.xacml.finder.AttributeFinderModule
      extended bycom.sun.xacml.finder.impl.SelectorModule

public class SelectorModule
extends com.sun.xacml.finder.AttributeFinderModule

This module implements the basic behavior of the AttributeSelectorType, looking for attribute values in the physical request document using the given XPath expression. This is implemented as a separate module (instead of being implemented directly in AttributeSelector so that programmers can remove this functionality if they want (it's optional in the spec), so they can replace this code with more efficient, specific code as needed, and so they can easily swap in different XPath libraries.

Note that if no matches are found, this module will return an empty bag (unless some error occurred). The AttributeSelector is still deciding what to return to the policy based on the MustBePresent attribute.

This module uses the Xalan XPath implementation, and supports only version 1.0 of XPath. It is a fully functional, correct implementation of XACML's AttributeSelector functionality, but is not designed for environments that make significant use of XPath queries. Developers for any such environment should consider implementing their own module.

Since:
1.0

Constructor Summary
SelectorModule()
           
 
Method Summary
private  com.sun.xacml.cond.EvaluationResult createProcessingError(java.lang.String msg)
          Private helper to create a new processing error status result
 com.sun.xacml.cond.EvaluationResult findAttribute(java.lang.String path, org.w3c.dom.Node namespaceNode, java.net.URI type, com.sun.xacml.EvaluationCtx context, java.lang.String xpathVersion)
          Tries to find attribute values based on the given selector data.
 boolean isSelectorSupported()
          Returns true since this module supports retrieving attributes based on the data provided in an AttributeSelectorType.
 
Methods inherited from class com.sun.xacml.finder.AttributeFinderModule
findAttribute, getIdentifier, getSupportedDesignatorTypes, getSupportedIds, invalidateCache, isDesignatorSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorModule

public SelectorModule()
Method Detail

isSelectorSupported

public boolean isSelectorSupported()
Returns true since this module supports retrieving attributes based on the data provided in an AttributeSelectorType.


createProcessingError

private com.sun.xacml.cond.EvaluationResult createProcessingError(java.lang.String msg)
Private helper to create a new processing error status result


findAttribute

public com.sun.xacml.cond.EvaluationResult findAttribute(java.lang.String path,
                                                         org.w3c.dom.Node namespaceNode,
                                                         java.net.URI type,
                                                         com.sun.xacml.EvaluationCtx context,
                                                         java.lang.String xpathVersion)
Tries to find attribute values based on the given selector data. The result, if successful, always contains a BagAttribute, even if only one value was found. If no values were found, but no other error occurred, an empty bag is returned.