Class BaseXacmlJsonResultPostprocessor
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.io.xacml.json.BaseXacmlJsonResultPostprocessor
-
- All Implemented Interfaces:
org.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
public class BaseXacmlJsonResultPostprocessor extends Object implements org.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
Convenient base class forDecisionResultPostprocessor
implementations producing XACML/JSON (XACML-JSON-Profile-standard-compliant) output
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseXacmlJsonResultPostprocessor.DefaultFactory
Default factory creating instances ofBaseXacmlJsonResultPostprocessor
static class
BaseXacmlJsonResultPostprocessor.Factory
Convenient base class forDecisionResultPostprocessor.Factory
implementations supporting XACML/JSON output (JSON Profile of XACML)
-
Constructor Summary
Constructors Constructor Description BaseXacmlJsonResultPostprocessor(int clientRequestErrorVerbosityLevel)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<IndividualXacmlJsonRequest>
getRequestType()
Class<org.json.JSONObject>
getResponseType()
org.json.JSONObject
process(Collection<Map.Entry<IndividualXacmlJsonRequest,? extends org.ow2.authzforce.core.pdp.api.DecisionResult>> resultsByRequest)
org.json.JSONObject
processClientError(org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException error)
org.json.JSONObject
processInternalError(org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException error)
-
-
-
Constructor Detail
-
BaseXacmlJsonResultPostprocessor
public BaseXacmlJsonResultPostprocessor(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
-
getRequestType
public final Class<IndividualXacmlJsonRequest> getRequestType()
- Specified by:
getRequestType
in interfaceorg.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
-
getResponseType
public final Class<org.json.JSONObject> getResponseType()
- Specified by:
getResponseType
in interfaceorg.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
-
process
public org.json.JSONObject process(Collection<Map.Entry<IndividualXacmlJsonRequest,? extends org.ow2.authzforce.core.pdp.api.DecisionResult>> resultsByRequest)
- Specified by:
process
in interfaceorg.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
-
processInternalError
public org.json.JSONObject processInternalError(org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException error)
- Specified by:
processInternalError
in interfaceorg.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
-
processClientError
public org.json.JSONObject processClientError(org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException error)
- Specified by:
processClientError
in interfaceorg.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,org.json.JSONObject>
-
-