public abstract class AttributeFinderModule extends Object
AttributeFinder
modules extend. All methods have
default values to represent that the given feature isn't supported by this module, so module
writers needs only implement the methods for the features they're supporting.Constructor and Description |
---|
AttributeFinderModule() |
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
findAttribute(String contextPath,
URI attributeType,
String contextSelector,
Node root,
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.
|
String |
getIdentifier()
Returns this module's identifier.
|
Set<String> |
getSupportedCategories()
Returns a
Set of String s that represent which AttributeDesignator
categories are supported (eg, Subject, Resource, etc.), or null meaning that no particular types
are supported. |
Set |
getSupportedIds()
Returns a
Set of URI s that represent the attributeIds handled by
this module, or null if this module doesn't handle any specific attributeIds. |
void |
invalidateCache()
This is an experimental method that asks the module to invalidate any cache values it may
contain.
|
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.
|
public String getIdentifier()
public boolean isDesignatorSupported()
public boolean isSelectorSupported()
public Set<String> getSupportedCategories()
Set
of String
s that represent which AttributeDesignator
categories 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
Set
of Integer
s, or nullpublic Set getSupportedIds()
Set
of URI
s 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.Set
of URI
s, or nullpublic void invalidateCache()
This method has been introduced to see what people think of this functionality, and how they would like to use it. It may be removed in future versions, or it may be changed to a more general message-passing system (if other useful messages are identified).
public 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. This method may
need to invoke the context data to look for other attribute values, so a module writer must
take care not to create a scenario that loops forever.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 whether it is Subject, Resource or any thingcontext
- the representation of the request datapublic EvaluationResult findAttribute(String contextPath, URI attributeType, String contextSelector, 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. This method may
need to invoke the context data to look for other attribute values, so a module writer must
take care not to create a scenario that loops forever.contextPath
- the XPath expression to search againstattributeType
- the datatype of the attributes to findcontextSelector
- the selector to find the context to apply XPath expression
if this is null, applied for default content. This is only used with XACML 3.0root
- the DOM node that XPath evaluation is done. this only used by XACML 3.0
this can be null, if other XACML versions are used.context
- the representation of the request dataxpathVersion
- the XPath version to useCopyright © 2020 WSO2. All rights reserved.