Package org.ow2.authzforce.core.pdp.api
Class AttributeSelectorId
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.AttributeSelectorId
-
- All Implemented Interfaces:
Comparable<AttributeSelectorId>
public final class AttributeSelectorId extends Object implements Comparable<AttributeSelectorId>
AttributeSelector identifier (category, contextSelectorId, path). Why not use AttributeSelector directly? Because we don't care about MustBePresent or Datatype for lookup here. This is used for example as key in a map to retrieve corresponding AttributeValue when it has already been evaluated.WARNING: java.net.URI cannot be used here for XACML category and ContextSelectorId, because not equivalent to XML schema anyURI type. Spaces are allowed in XSD anyURI [1], not in java.net.URI.
[1] http://www.w3.org/TR/xmlschema-2/#anyURI That's why we use String instead.
-
-
Constructor Summary
Constructors Constructor Description AttributeSelectorId(String category, String xpath, Optional<String> contextSelectorId)
Creates instance from scratchAttributeSelectorId(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeSelectorType attrSelector)
Creates instance from XACML AttributeSelector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AttributeSelectorId other)
Compares using lexicographical ordering on Category, then Path, then finally the ContextSelectorId.boolean
equals(Object obj)
String
getCategory()
Optional<String>
getContextSelectorId()
String
getPath()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
AttributeSelectorId
public AttributeSelectorId(String category, String xpath, Optional<String> contextSelectorId)
Creates instance from scratch- Parameters:
category
- AttributeSelector's Categoryxpath
- * AttributeSelector's Path
-
AttributeSelectorId
public AttributeSelectorId(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeSelectorType attrSelector)
Creates instance from XACML AttributeSelector- Parameters:
attrSelector
- attribute selector
-
-
Method Detail
-
getCategory
public String getCategory()
- Returns:
- AttributeSelector Category
-
getPath
public String getPath()
- Returns:
- AttributeSelector Path
-
getContextSelectorId
public Optional<String> getContextSelectorId()
- Returns:
- AttributeSelector ContextSelectorId
-
compareTo
public int compareTo(AttributeSelectorId other)
Compares using lexicographical ordering on Category, then Path, then finally the ContextSelectorId.- Specified by:
compareTo
in interfaceComparable<AttributeSelectorId>
-
-