Class 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 for DecisionResultPostprocessor implementations producing XACML/JSON (XACML-JSON-Profile-standard-compliant) output
    • 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 - if clientRequestErrorVerbosityLevel < 0
    • Method Detail

      • getResponseType

        public final Class<org.json.JSONObject> getResponseType()
        Specified by:
        getResponseType in interface org.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 interface org.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 interface org.ow2.authzforce.core.pdp.api.DecisionResultPostprocessor<IndividualXacmlJsonRequest,​org.json.JSONObject>