Class BaseXacmlJaxbResultPostprocessor
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.io.BaseXacmlJaxbResultPostprocessor
-
- All Implemented Interfaces:
DecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
public class BaseXacmlJaxbResultPostprocessor extends Object implements DecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
Convenient base class forDecisionResultPostprocessor
implementations supporting core XACML-schema-defined XML output handled by JAXB framework
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseXacmlJaxbResultPostprocessor.Factory
Convenient base class forDecisionResultPostprocessor.Factory
implementations supporting core XACML-schema-defined XML output handled by JAXB framework-
Nested classes/interfaces inherited from interface org.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor
DecisionResultPostprocessor.Features
-
-
Constructor Summary
Constructors Constructor Description BaseXacmlJaxbResultPostprocessor(int clientRequestErrorVerbosityLevel)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static oasis.names.tc.xacml._3_0.core.schema.wd_17.Result
convert(IndividualXacmlJaxbRequest request, DecisionResult result)
Convert AuthzForce-specificDecisionResult
to XACMLResult
Class<IndividualXacmlJaxbRequest>
getRequestType()
Gets the class of supported individual decision request objectsClass<oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
getResponseType()
Gets the class of output decision responseoasis.names.tc.xacml._3_0.core.schema.wd_17.Response
process(Collection<Map.Entry<IndividualXacmlJaxbRequest,? extends DecisionResult>> resultsByRequest)
Process multiple individual decision results (e.g.oasis.names.tc.xacml._3_0.core.schema.wd_17.Response
processClientError(IndeterminateEvaluationException error)
Process an indeterminate result, i.e.oasis.names.tc.xacml._3_0.core.schema.wd_17.Response
processInternalError(IndeterminateEvaluationException error)
Process an indeterminate result, i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor
getFeatures
-
-
-
-
Constructor Detail
-
BaseXacmlJaxbResultPostprocessor
public BaseXacmlJaxbResultPostprocessor(int clientRequestErrorVerbosityLevel) throws IllegalArgumentException
Constructor- Parameters:
clientRequestErrorVerbosityLevel
- Level of verbosity of the error message trace returned in case of client request errors, e.g. invalid requests. Increasing this value usually helps the clients better pinpoint the issue with their Requests. This result postprocessor returns all error messages in the Java stacktrace up to the same level as this parameter's value if the stacktrace is bigger, else the full stacktrace.- Throws:
IllegalArgumentException
- ifclientRequestErrorVerbosityLevel < 0
-
-
Method Detail
-
convert
public static oasis.names.tc.xacml._3_0.core.schema.wd_17.Result convert(IndividualXacmlJaxbRequest request, DecisionResult result)
Convert AuthzForce-specificDecisionResult
to XACMLResult
- Parameters:
request
- request corresponding to result; iff null, some content from it, esp. the list ofAttributes
, is included inresult
result
- native policy decision result- Returns:
- XACML Result
-
getRequestType
public final Class<IndividualXacmlJaxbRequest> getRequestType()
Description copied from interface:DecisionResultPostprocessor
Gets the class of supported individual decision request objects- Specified by:
getRequestType
in interfaceDecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
- Returns:
- (individual decision) request type parameter
-
getResponseType
public final Class<oasis.names.tc.xacml._3_0.core.schema.wd_17.Response> getResponseType()
Description copied from interface:DecisionResultPostprocessor
Gets the class of output decision response- Specified by:
getResponseType
in interfaceDecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
- Returns:
- result type parameter
-
process
public oasis.names.tc.xacml._3_0.core.schema.wd_17.Response process(Collection<Map.Entry<IndividualXacmlJaxbRequest,? extends DecisionResult>> resultsByRequest)
Description copied from interface:DecisionResultPostprocessor
Process multiple individual decision results (e.g. combine them if CombinedDecision=true)- Specified by:
process
in interfaceDecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
- Parameters:
resultsByRequest
- results mapped to corresponding individual decision requests for correlation- Returns:
- output response
-
processClientError
public oasis.names.tc.xacml._3_0.core.schema.wd_17.Response processClientError(IndeterminateEvaluationException error)
Description copied from interface:DecisionResultPostprocessor
Process an indeterminate result, i.e. evaluation error, in case of client request error.- Specified by:
processClientError
in interfaceDecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
- Parameters:
error
- client request error- Returns:
- error result
-
processInternalError
public oasis.names.tc.xacml._3_0.core.schema.wd_17.Response processInternalError(IndeterminateEvaluationException error)
Description copied from interface:DecisionResultPostprocessor
Process an indeterminate result, i.e. evaluation error, in case of PDP engine's internal error, as opposed to client request errors.For security reasons, error details should not be included in this case as they may disclose PDP internal issues (e.g. bad configuration) to clients.
- Specified by:
processInternalError
in interfaceDecisionResultPostprocessor<IndividualXacmlJaxbRequest,oasis.names.tc.xacml._3_0.core.schema.wd_17.Response>
- Parameters:
error
- internal error- Returns:
- error Result
-
-