public class AttributeFinder extends Object
AttributeDesignators or AttributeSelector
s. Because the modules in this
finder may themselves need attribute data to search for attribute data, it's possible that the
modules will look for values in the EvaluationCtx
, which may in turn result in the
invocation of this finder again, so module writers need to be careful about how they build their
modules.
Note that unlike the PolicyFinder, this class doesn't always need to use every module it has to
find a value. The ordering is maintained, however, so it will always start with the first module,
and proceed in order until it finds a value or runs out of modules.
Constructor and Description |
---|
AttributeFinder()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
findAttribute(String contextPath,
String contextSelector,
URI attributeType,
Node root,
EvaluationCtx context,
String xpathVersion)
Tries to find attribute values based on the given selector data.
|
EvaluationResult |
findAttribute(String contextPath,
URI attributeType,
EvaluationCtx context,
String xpathVersion)
Tries to find attribute values based on the given selector data.
|
EvaluationResult |
findAttribute(URI attributeType,
URI attributeId,
String issuer,
URI category,
EvaluationCtx context)
Tries to find attribute values based on the given designator data.
|
List<AttributeFinderModule> |
getModules()
Returns the ordered
List of AttributeFinderModule s used by this
class to find attribute values. |
void |
setModules(List<AttributeFinderModule> modules)
Sets the ordered
List of AttributeFinderModule s used by this class
to find attribute values. |
public List<AttributeFinderModule> getModules()
List
of AttributeFinderModule
s used by this
class to find attribute values.List
of AttributeFinderModule
spublic void setModules(List<AttributeFinderModule> modules)
List
of AttributeFinderModule
s used by this class
to find attribute values. The ordering will be maintained.modules
- a List
of AttributeFinderModule
spublic EvaluationResult findAttribute(URI attributeType, URI attributeId, String issuer, URI category, EvaluationCtx context)
BagAttribute
, even if only one value was found. If no
values were found, but no other error occurred, an empty bag is returned.attributeType
- the datatype of the attributes to findattributeId
- the identifier of the attributes to findissuer
- the issuer of the attributes, or null if unspecifiedcategory
- the category of the attribute if the designatorType is SUBJECT_TARGET,
otherwise nullcontext
- the representation of the request datapublic EvaluationResult findAttribute(String contextPath, URI attributeType, EvaluationCtx context, String xpathVersion)
BagAttribute
, even if only one value was found. If no
values were found, but no other error occurred, an empty bag is returned.contextPath
- the XPath expression to search againstattributeType
- the datatype of the attributes to findcontext
- the representation of the request dataxpathVersion
- the XPath version to usepublic EvaluationResult findAttribute(String contextPath, String contextSelector, URI attributeType, Node root, EvaluationCtx context, String xpathVersion)
BagAttribute
, even if only one value was found. If no
values were found, but no other error occurred, an empty bag is returned.contextPath
- the XPath expression to search againstcontextSelector
- select the context to evaluateattributeType
- the datatype of the attributes to findroot
- root XML nodecontext
- the representation of the request dataxpathVersion
- the XPath version to useCopyright © 2016 WSO2. All rights reserved.