public interface VersionFixedPolicyEvaluator extends PolicyEvaluator
StaticPolicyEvaluator
and TopLevelPolicyElementEvaluator
for evaluators of policies with a fixed version (e.g. not dynamic policy references with version match
patterns).Modifier and Type | Method and Description |
---|---|
PolicyVersion |
getPolicyVersion()
Get policy version.
|
default PolicyVersion |
getPolicyVersion(EvaluationContext evaluationCtx)
Get policy version, e.g.
|
evaluate, getEnclosedPolicies, getPolicyElementType, getPolicyId, getPolicyRefsMetadata, isApplicableByTarget
PolicyVersion getPolicyVersion()
default PolicyVersion getPolicyVersion(EvaluationContext evaluationCtx) throws IndeterminateEvaluationException
PolicyEvaluator
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.
getPolicyVersion
in interface PolicyEvaluator
evaluationCtx
- request evaluation contextIndeterminateEvaluationException
- if the policy version could not be determined in evaluationCtx
Copyright © 2012–2020. All rights reserved.