Interface VersionFixedPolicyEvaluator
-
- All Superinterfaces:
Decidable
,PolicyEvaluator
- All Known Subinterfaces:
StaticPolicyEvaluator
,StaticTopLevelPolicyElementEvaluator
,TopLevelPolicyElementEvaluator
public interface VersionFixedPolicyEvaluator extends PolicyEvaluator
Common interface toStaticPolicyEvaluator
andTopLevelPolicyElementEvaluator
for evaluators of policies with a fixed version (e.g. not dynamic policy references with version match patterns).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PolicyVersion
getPolicyVersion()
Get policy version.default PolicyVersion
getPolicyVersion(EvaluationContext evaluationCtx, Optional<EvaluationContext> mdpContext)
Get policy version, e.g.-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.policy.PolicyEvaluator
evaluate, getEnclosedPolicies, getPolicyElementType, getPolicyId, getPolicyRefsMetadata, isApplicableByTarget
-
-
-
-
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-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:
getPolicyVersion
in interfacePolicyEvaluator
- Parameters:
evaluationCtx
- Individual Decision request evaluation contextmdpContext
- the context of the Multiple Decision request that thecontext
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 inevaluationCtx
-
-