Package org.ow2.authzforce.core.pdp.api
Interface DecisionRequestPreprocessor<INPUT_DECISION_REQUEST,OUTPUT_INDIVIDUAL_DECISION_REQUEST extends DecisionRequest>
-
- Type Parameters:
OUTPUT_INDIVIDUAL_DECISION_REQUEST
- type of output individual decision request.INPUT_DECISION_REQUEST
- type of original input decision request that may correspond to multiple individual decision requests (e.g. using XACML Multiple Decision Profile). Usually serializable, e.g. XACML-schema-derived JAXB Request for XML.
- All Known Implementing Classes:
BaseXacmlJaxbRequestPreprocessor
public interface DecisionRequestPreprocessor<INPUT_DECISION_REQUEST,OUTPUT_INDIVIDUAL_DECISION_REQUEST extends DecisionRequest>
XACML Decision Request pre-processor; applies some validation and processing of the input request prior to the policy evaluation. For example, a request preprocessor may transform an XACML Request using the Multiple Decision Profile (section 2) into multiple Individual Decision Requests; and so that the policy evaluation engine is called for each Individual Decision Request. At the end, the results (one per Individual Decision Request) may be combined by aDecisionResultPostprocessor
.PDP extensions of this type (to support new ways of pre-processing XACML decision requests) must implement the
DecisionRequestPreprocessor.Factory
classNote: this interface is meant to be generic enough to be independent of the actual original input data format (XML, JSON...).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DecisionRequestPreprocessor.Factory<IDR,OIDR extends DecisionRequest>
Factory of request preprocessors
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<INPUT_DECISION_REQUEST>
getInputRequestType()
Returns the type of input requestsClass<OUTPUT_INDIVIDUAL_DECISION_REQUEST>
getOutputRequestType()
Returns the type of output individual decision requestsList<OUTPUT_INDIVIDUAL_DECISION_REQUEST>
process(INPUT_DECISION_REQUEST req, Map<String,String> namespaceURIsByPrefix)
Pre-processes a decision request, may result in multiple individual decision requests, e.g.
-
-
-
Method Detail
-
getInputRequestType
Class<INPUT_DECISION_REQUEST> getInputRequestType()
Returns the type of input requests- Returns:
INPUT_DECISION_REQUEST
class.
-
getOutputRequestType
Class<OUTPUT_INDIVIDUAL_DECISION_REQUEST> getOutputRequestType()
Returns the type of output individual decision requests- Returns:
OUTPUT_INDIVIDUAL_DECISION_REQUEST
class.
-
process
List<OUTPUT_INDIVIDUAL_DECISION_REQUEST> process(INPUT_DECISION_REQUEST req, Map<String,String> namespaceURIsByPrefix) throws IndeterminateEvaluationException
Pre-processes a decision request, may result in multiple individual decision requests, e.g. if implementing the Multiple Decision Profile- Parameters:
req
- input RequestnamespaceURIsByPrefix
- namespace prefix-URI mappings (e.g. "... xmlns:prefix=uri") in the original XACML Request bound toreq
, used as part of the context for XPath evaluation; may be null if such mapping defined- Returns:
- individual decision requests, as defined in Multiple Decision Profile, e.g. a singleton list if no multiple decision requested or supported by this
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
-
-