public class AttributeFinder extends Object
AttributeDesignator
s 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,
Node namespaceNode,
URI attributeType,
EvaluationCtx context,
String xpathVersion)
Tries to find attribute values based on the given selector data.
|
EvaluationResult |
findAttribute(URI attributeType,
URI attributeId,
URI issuer,
URI subjectCategory,
EvaluationCtx context,
int designatorType)
Tries to find attribute values based on the given designator data.
|
List |
getModules()
Returns the ordered list of
AttributeFinderModule s used by this class to find
attribute values. |
void |
setModules(List modules)
Sets the ordered list of
AttributeFinderModule s used by this class to find
attribute values. |
public List getModules()
AttributeFinderModule
s used by this class to find
attribute values.AttributeFinderModule
spublic void setModules(List modules)
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, URI issuer, URI subjectCategory, EvaluationCtx context, int designatorType)
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 unspecifiedsubjectCategory
- the category of the attribute if the
designatorType is AttributeDesignator.SUBJECT_TARGET
, otherwise nullcontext
- the representation of the request datadesignatorType
- the type of designator as named by the *_TARGET
fields in AttributeDesignator
public EvaluationResult findAttribute(String contextPath, Node namespaceNode, 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 againstnamespaceNode
- the DOM node defining namespace mappings to use,
or null if mappings come from the context rootattributeType
- the datatype of the attributes to findcontext
- the representation of the request dataxpathVersion
- the XPath version to useCopyright © 2023 JBoss by Red Hat. All rights reserved.