Interface PolicyRefsMetadata


  • public interface PolicyRefsMetadata
    Metadata meant to be associated to a policy (XACML PolicySet) element, that gives metadata about Policy(Set)IdReferences within this policy. These metadata may depend on the evaluation context, e.g. if the Policy Provider(s) use(s) data from the request context to resolve policy references.
    • Method Detail

      • getRefPolicies

        Set<PrimaryPolicyMetadata> getRefPolicies()
        Get the <Policy>s referenced - directly or indirectly - from the policy element which these are metadata of. This is useful to know all the policies applicable by a top-level policy evaluator.
        Returns:
        the direct/indirect policy references; empty if the policy does not have any policy reference at all. (Null result is not allowed.)

        Result must be immutable (can be made so with Collections.unmodifiableMap(Map)).

      • getLongestPolicyRefChain

        List<String> getLongestPolicyRefChain()
        Get the longest chain of Policy reference (via Policy(Set)IdReference) starting from the policy which these are metadata of, in order to limit the length of such chain. Note that in the current XACML 3.0 model, it is safe to ignore Policy elements; since they cannot have references. However, we consider that Policy and PolicySet types could be merged into one Policy type on the long-term. That's why we define this method at the interface level on top of both Policy and PolicySet evaluator classes. Indeed, this interface represents the common behavior of the two.
        Returns:
        longest policy reference chain in this policy; empty list if the policy does not have any policy reference. (Null result is not allowed.)

        Result must be immutable (can be made so with Collections.unmodifiableList(java.util.List)).