Class MultipleXacmlRequestPreprocHelper<R extends DecisionRequest,​VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT,​VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT>

  • Type Parameters:
    R - type of output Individual XACML decision request from the preprocessing
    VALIDATOR_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) Object
    VALIDATOR_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".
    • Method Detail

      • process

        public final List<R> process​(Iterable<VALIDATOR_INPUT_ATTRIBUTE_CATEGORY_OBJECT> inputRequestAttributeCategoryObjects,
                                     SingleCategoryXacmlAttributesParser<VALIDATOR_OUTPUT_ATTRIBUTE_CATEGORY_OBJECT> xacmlAttrsParser,
                                     boolean isApplicablePolicyIdListReturned,
                                     boolean combinedDecision,
                                     net.sf.saxon.s9api.XPathCompiler xPathCompiler,
                                     Map<String,​String> namespaceURIsByPrefix)
                              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 none
        xacmlAttrsParser - XACML Attributes element Parser instance, used to parse each Attributes in attributesList.
        isApplicablePolicyIdListReturned - XACML Request's property returnPolicyIdList.
        combinedDecision - XACML Request's property isCombinedDecision
        xPathCompiler - xpathExpression compiler, corresponding to the XACML RequestDefaults element, or null if no RequestDefaults element.
        namespaceURIsByPrefix - namespace prefix-URI mappings (e.g. "... xmlns:prefix=uri") in the original XACML Request bound to req, used as part of the context for XPath evaluation
        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