Package org.ow2.authzforce.core.pdp.api
Class IndeterminateEvaluationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
-
- All Implemented Interfaces:
Serializable
public class IndeterminateEvaluationException extends Exception
Exception wrapper for XACML Indeterminate/error caused by evaluationTODO: although we consider Exceptions as a good solution (from a Java standpoint) to propagate error information with a full traceable stacktrace, from a functional/logical point of view, we could improve performance by using return codes instead, whenever possible, especially where we don't lose any useful error info by doing so: cf. Performance Effects of Exceptions in Java
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IndeterminateEvaluationException(String message, String xacmlStatusCode)
Instantiates with error message and XACML StatusCode (e.g.IndeterminateEvaluationException(String message, String xacmlStatusCode, Throwable cause)
Instantiates with error message and XACML StatusCode (e.g.IndeterminateEvaluationException(String message, oasis.names.tc.xacml._3_0.core.schema.wd_17.MissingAttributeDetail missingAttributeDetail, Optional<String> customStatusCode)
Instantiates with a missing-attribute error status with standard status code - unless a custom status code is defined - and a XACMLMissingAttributeDetail
IndeterminateEvaluationException(String message, IndeterminateEvaluationException cause)
Instantiates with error message and causeIndeterminateEvaluationException(ImmutableXacmlStatus status)
Creates exception with message and XACML StatusCode (e.g.IndeterminateEvaluationException(ImmutableXacmlStatus status, Throwable cause)
Instantiates with error message and XACML StatusCode (e.g.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ImmutableXacmlStatus>
getOverridingTopLevelStatus()
Get Status to be returned as top-level Status in the final Result regardless of any other Status in the error stack trace.ImmutableXacmlStatus
getStatus()
Get status corresponding to this exception (last occurred)ImmutableXacmlStatus
getTopLevelStatus()
Get top-level status, i.e.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(ImmutableXacmlStatus status, Throwable cause)
Instantiates with error message and XACML StatusCode (e.g.XacmlStatusCode.PROCESSING_ERROR
), and internal cause for error.When the
cause
is itself anIndeterminateEvaluationException
, use theIndeterminateEvaluationException(String, IndeterminateEvaluationException)
.- Parameters:
status
- XACML status, StatusCode value must be a valid xs:anyURI (used as XACML StatusCode Value)cause
- internal cause of error
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(ImmutableXacmlStatus status)
Creates exception with message and XACML StatusCode (e.g.XacmlStatusCode.PROCESSING_ERROR
)- Parameters:
status
- XACML status, StatusCode value must be a valid xs:anyURI (used as XACML StatusCode Value)
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(String message, String xacmlStatusCode, Throwable cause)
Instantiates with error message and XACML StatusCode (e.g.XacmlStatusCode.PROCESSING_ERROR
)- Parameters:
message
- error message XACML status, StatusCode value must be a valid xs:anyURI (used as XACML StatusCode Value)xacmlStatusCode
- XACML StatusCode valuecause
- internal cause of error
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(String message, IndeterminateEvaluationException cause)
Instantiates with error message and cause- Parameters:
message
- error message XACML status, StatusCode value must be a valid xs:anyURI (used as XACML StatusCode Value)cause
- internal cause of error
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(String message, String xacmlStatusCode)
Instantiates with error message and XACML StatusCode (e.g.XacmlStatusCode.PROCESSING_ERROR
)- Parameters:
message
- error message XACML status, StatusCode value must be a valid xs:anyURI (used as XACML StatusCode Value)xacmlStatusCode
- XACML StatusCode value
-
IndeterminateEvaluationException
public IndeterminateEvaluationException(String message, oasis.names.tc.xacml._3_0.core.schema.wd_17.MissingAttributeDetail missingAttributeDetail, Optional<String> customStatusCode)
Instantiates with a missing-attribute error status with standard status code - unless a custom status code is defined - and a XACMLMissingAttributeDetail
- Parameters:
message
- error message XACML statusmissingAttributeDetail
- missing attribute detailcustomStatusCode
- overrides standard missing-attribute status codeXacmlStatusCode.MISSING_ATTRIBUTE
, must be a valid xs:anyURI (used as XACML StatusCode Value)
-
-
Method Detail
-
getStatus
public ImmutableXacmlStatus getStatus()
Get status corresponding to this exception (last occurred)- Returns:
- status (always non-null)
-
getOverridingTopLevelStatus
public Optional<ImmutableXacmlStatus> getOverridingTopLevelStatus()
Get Status to be returned as top-level Status in the final Result regardless of any other Status in the error stack trace.- Returns:
- status
-
getTopLevelStatus
public ImmutableXacmlStatus getTopLevelStatus()
Get top-level status, i.e.getOverridingTopLevelStatus()
if present, elsegetStatus()
- Returns:
- status top-level status for final result
-
-