Interface VersionFixedPolicyEvaluator

    • Method Detail

      • getPolicyVersion

        PolicyVersion getPolicyVersion()
        Get policy version. This is declared in the XACML Policy(Set) itself, therefore does not depend on the evaluation context.
        Returns:
        evaluated policy(Set) Version
      • getPolicyVersion

        default PolicyVersion getPolicyVersion​(EvaluationContext evaluationCtx,
                                               Optional<EvaluationContext> mdpContext)
                                        throws IndeterminateEvaluationException
        Description copied from interface: PolicyEvaluator
        Get policy version, e.g. for auditing. This may depend on the evaluation context in case of a Policy(Set)IdReference evaluator when using dynamic aka context-dependent PolicyProvider that resolve policy references at evaluation time based on the context, especially if the policy reference does not specify the version or use non-literal version match rules (with wildcards).

        Implementations must still guarantee that the result - once computed in a given request context - remains constant over the lifetime of this request context. This is required for consistent evaluation. The result may only change from one request to the other. For that purpose, implementations may use EvaluationContext.putOther(String, Object) to cache the result in the request context and EvaluationContext.getOther(String) to retrieve it later.

        Specified by:
        getPolicyVersion in interface PolicyEvaluator
        Parameters:
        evaluationCtx - Individual Decision request evaluation context
        mdpContext - the context of the Multiple Decision request that the context belongs to if the Multiple Decision Profile is used.
        Returns:
        extra metadata of the evaluated policy
        Throws:
        IndeterminateEvaluationException - if the policy version could not be determined in evaluationCtx