Class SingleCategoryAttributes<AV_BAG extends Iterable<? extends AttributeValue>,RETURNED_ATTRIBUTE_CATEGORY>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.io.SingleCategoryAttributes<AV_BAG,RETURNED_ATTRIBUTE_CATEGORY>
-
- Type Parameters:
AV_BAG
- type of bag of attribute valuesRETURNED_ATTRIBUTE_CATEGORY
- type of corresponding attribute Category output containing only the subset of this category-specific attributes that had IncludeInResult = 'true' in the XACML request
- All Implemented Interfaces:
Iterable<Map.Entry<AttributeFqn,AttributeBag<?>>>
public final class SingleCategoryAttributes<AV_BAG extends Iterable<? extends AttributeValue>,RETURNED_ATTRIBUTE_CATEGORY> extends Object implements Iterable<Map.Entry<AttributeFqn,AttributeBag<?>>>
Internal equivalent of XACML Attributes element, i.e. attributes specific to a single category
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SingleCategoryAttributes.NamedAttributeIteratorConverter<V_BAG extends Iterable<? extends AttributeValue>>
Named Attribute Iterator converter
-
Field Summary
Fields Modifier and Type Field Description static SingleCategoryAttributes.NamedAttributeIteratorConverter<AttributeBag<?>>
IDENTITY_ATTRIBUTE_ITERATOR_CONVERTER
"Identity" Attribute Iterator Converter, i.e.static SingleCategoryAttributes.NamedAttributeIteratorConverter<MutableAttributeBag<?>>
MUTABLE_TO_CONSTANT_ATTRIBUTE_ITERATOR_CONVERTER
Attribute Iterator Converter forMutableAttributeBag
-
Constructor Summary
Constructors Constructor Description SingleCategoryAttributes(String categoryId, Set<Map.Entry<AttributeFqn,AV_BAG>> namedAttributes, SingleCategoryAttributes.NamedAttributeIteratorConverter<AV_BAG> namedAttributeIteratorConverter, RETURNED_ATTRIBUTE_CATEGORY returnedAttributeCategory, net.sf.saxon.s9api.XdmNode extraContent)
Instantiates this class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RETURNED_ATTRIBUTE_CATEGORY
getAttributesToIncludeInResult()
Get corresponding attribute Category output containing only the subset of this category-specific attributes that had IncludeInResult = 'true' in the XACML requestString
getCategoryId()
Gets the category IDnet.sf.saxon.s9api.XdmNode
getExtraContent()
Gets the Content parsed into XPath data model for XPath evaluation; or null if no ContentIterator<Map.Entry<AttributeFqn,AttributeBag<?>>>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
MUTABLE_TO_CONSTANT_ATTRIBUTE_ITERATOR_CONVERTER
public static final SingleCategoryAttributes.NamedAttributeIteratorConverter<MutableAttributeBag<?>> MUTABLE_TO_CONSTANT_ATTRIBUTE_ITERATOR_CONVERTER
Attribute Iterator Converter forMutableAttributeBag
-
IDENTITY_ATTRIBUTE_ITERATOR_CONVERTER
public static final SingleCategoryAttributes.NamedAttributeIteratorConverter<AttributeBag<?>> IDENTITY_ATTRIBUTE_ITERATOR_CONVERTER
"Identity" Attribute Iterator Converter, i.e. returns the iterator in argument as is ("identity" as in mathematical definition of identity function/transformation)
-
-
Constructor Detail
-
SingleCategoryAttributes
public SingleCategoryAttributes(String categoryId, Set<Map.Entry<AttributeFqn,AV_BAG>> namedAttributes, SingleCategoryAttributes.NamedAttributeIteratorConverter<AV_BAG> namedAttributeIteratorConverter, RETURNED_ATTRIBUTE_CATEGORY returnedAttributeCategory, net.sf.saxon.s9api.XdmNode extraContent) throws IllegalArgumentException
Instantiates this class- Parameters:
categoryId
- category IDnamedAttributes
- Named attributes (in the XACML sense) where each entry consists of the identifier of the attribute and its value bagnamedAttributeIteratorConverter
- converts the iterator ofnamedAttributes
into constant-valued attribute iteratorreturnedAttributeCategory
- corresponding attribute Category output containing only the subset of this category-specific attributes that had IncludeInResult = 'true' in the XACML requestextraContent
- Attributes/Content parsed into XPath data model for XPath evaluation- Throws:
IllegalArgumentException
- iffnamedAttributes != null && !namedAttributes.isEmpty() && namedAttributeIteratorConverter == null
(namedAttributeIteratorConverter required if namedAttributes not null/empty)
-
-
Method Detail
-
getCategoryId
public String getCategoryId()
Gets the category ID- Returns:
- category ID
-
getExtraContent
public net.sf.saxon.s9api.XdmNode getExtraContent()
Gets the Content parsed into XPath data model for XPath evaluation; or null if no Content- Returns:
- the Content in XPath data model
-
getAttributesToIncludeInResult
public RETURNED_ATTRIBUTE_CATEGORY getAttributesToIncludeInResult()
Get corresponding attribute Category output containing only the subset of this category-specific attributes that had IncludeInResult = 'true' in the XACML request- Returns:
- the attributes to include in the final Result; null if nothing to include
-
iterator
public Iterator<Map.Entry<AttributeFqn,AttributeBag<?>>> iterator()
- Specified by:
iterator
in interfaceIterable<AV_BAG extends Iterable<? extends AttributeValue>>
-
-