Class MultipleXacmlRequestPreprocHelper<R extends DecisionRequest,VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT,VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.io.MultipleXacmlRequestPreprocHelper<R,VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT,VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT>
-
- Type Parameters:
R
- type of output Individual XACML decision request from the preprocessingVALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT
- raw input object representing category-specific XACML attributes, e.g. from XACML/XML Attributes element, or equivalent XACML/JSON (JSON Profile) ObjectVALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT
- type of properly-validated XACML attribute category object representation. For example, when parsing raw JSON array from XACML request's Attribute value formatted according to JSON profile of XACML, the type of each element in the array, as returned by a generic JSON parser, is a generic supertype of all JSON value types (String, JSONObject, JSONArray...); but after passing each element through proper validation, we should get a JSONObject-specific representation type as expected from the JSON Profile specification.
public abstract class MultipleXacmlRequestPreprocHelper<R extends DecisionRequest,VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT,VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> extends Object
Multiple Decision Request preprocessing helper, for supporting the Multiple Decision Profile scheme "Repeated attribute categories".
-
-
Constructor Summary
Constructors Constructor Description MultipleXacmlRequestPreprocHelper(IndividualXacmlRequestFactory<R,VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> individualXacmlRequestFactory)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<R>
process(Iterable<VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT> inputRequestAttributeCategoryObjects, SingleCategoryXacmlAttributesParser<VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> xacmlAttrsParser, boolean isApplicablePolicyIdListReturned, Optional<XPathCompilerProxy> xPathCompiler)
Pre-processes (validates and/or transforms) a Request, may result in multiple individual decision requests, e.g.protected abstract VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT
validate(VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT inputRawAttributeCategoryObject)
-
-
-
Constructor Detail
-
MultipleXacmlRequestPreprocHelper
public MultipleXacmlRequestPreprocHelper(IndividualXacmlRequestFactory<R,VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> individualXacmlRequestFactory)
Constructor- Parameters:
individualXacmlRequestFactory
- individual XACML request factory
-
-
Method Detail
-
validate
protected abstract VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT validate(VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT inputRawAttributeCategoryObject) throws IndeterminateEvaluationException
- Throws:
IndeterminateEvaluationException
-
process
public final List<R> process(Iterable<VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT> inputRequestAttributeCategoryObjects, SingleCategoryXacmlAttributesParser<VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> xacmlAttrsParser, boolean isApplicablePolicyIdListReturned, Optional<XPathCompilerProxy> xPathCompiler) throws IndeterminateEvaluationException
Pre-processes (validates and/or transforms) a Request, may result in multiple individual decision requests, e.g. if implementing the Multiple Decision Profile or Hierarchical Resource profile- Parameters:
inputRequestAttributeCategoryObjects
- XACML Attribute Category objects (e.g. XACML/XML Attributes elements or XACML/JSON objects from 'Attribute' array), null if nonexacmlAttrsParser
- XACML Attributes element Parser instance, used to parse each Attributes inattributesList
.isApplicablePolicyIdListReturned
- XACML Request's propertyreturnPolicyIdList
.xPathCompiler
- xpathExpression compiler, corresponding to the XACML RequestDefaults element, or undefined if no RequestDefaults element or XPath support disabled by PDP configuration.- Returns:
- individual decision requests, as defined in Multiple Decision Profile, e.g. a singleton list if no multiple decision requested or supported by the pre-processor
Return a Collection and not array to make it easy for the implementer to create a defensive copy with Collections#unmodifiableList() and alike.
- Throws:
IndeterminateEvaluationException
- if some feature requested in the Request is not supported by this pre-processor
-
-