Interface StaticPolicyEvaluator
-
- All Superinterfaces:
Decidable
,PolicyEvaluator
,VersionFixedPolicyEvaluator
- All Known Subinterfaces:
StaticTopLevelPolicyElementEvaluator
public interface StaticPolicyEvaluator extends VersionFixedPolicyEvaluator
Statically-defined policy evaluator interface, "policy" referring to any XACML Policy* element: Policy(Set), Policy(Set)IdReference. "Static" means here that the whole policy definition is fixed once and for all at initialization time, i.e. it does not depend on the evaluation context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<PolicyRefsMetadata>
getPolicyRefsMetadata()
Get (static/context-independent) metadata about policy references within the evaluated policy.default Optional<PolicyRefsMetadata>
getPolicyRefsMetadata(EvaluationContext context, Optional<EvaluationContext> mdpContext)
Get metadata about the child policy references of the evaluated policy, present iff there is any (e.g.-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.policy.PolicyEvaluator
evaluate, getEnclosedPolicies, getPolicyElementType, getPolicyId, isApplicableByTarget
-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.policy.VersionFixedPolicyEvaluator
getPolicyVersion, getPolicyVersion
-
-
-
-
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, Optional<EvaluationContext> mdpContext)
Description copied from interface:PolicyEvaluator
Get metadata about the child policy references of the evaluated policy, present iff there is any (e.g. not 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-dependentPolicyProvider
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 andEvaluationContext.getOther(String)
to retrieve it later.- Specified by:
getPolicyRefsMetadata
in interfacePolicyEvaluator
- Parameters:
context
- Individual Decision request evaluation contextmdpContext
- the context of the Multiple Decision request that thecontext
belongs to if the Multiple Decision Profile is used.- Returns:
- child policy references metadata of the evaluated policy
-
-