Interface StaticPolicyEvaluator

    • Method Detail

      • getPolicyRefsMetadata

        Optional<PolicyRefsMetadata> getPolicyRefsMetadata()
        Get (static/context-independent) metadata about policy references within the evaluated policy. Always return the same result.
        Returns:
        metadata about policy references within the evaluated policy. Not present if there is no such reference, e.g. the evaluated policy is a XACML Policy element.
      • getPolicyRefsMetadata

        default Optional<PolicyRefsMetadata> getPolicyRefsMetadata​(EvaluationContext context)
        Description copied from interface: PolicyEvaluator
        Get metadata about the child policy references of the evaluated policy, present iff there is any (e.g. no the case for a XACML Policy element). These metadata 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:
        getPolicyRefsMetadata in interface PolicyEvaluator
        Parameters:
        context - request evaluation context
        Returns:
        child policy references metadata of the evaluated policy