Package org.ow2.authzforce.core.pdp.api
Interface SingleNamedAttributeProvider<AV extends AttributeValue>
-
public interface SingleNamedAttributeProvider<AV extends AttributeValue>
"Named" Attribute Provider, similar toNamedAttributeProvider
but provides one and only one named attribute, used for AttributeDesignator/AttributeSelector (ContextSelectorId) evaluation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
beginMultipleDecisionRequest(EvaluationContext mdpContext)
When the Multiple Decision Profile is used, the PDP engine calls this method before evaluating the Individual Decision Requests of a given Multiple Decision request.AttributeBag<AV>
get(EvaluationContext individualDecisionContext, Optional<EvaluationContext> mdpContext)
Provides values of the attribute matching the given designator data.oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType
getProvidedAttribute()
Returns the non-nullAttributeDesignator
s provided/supported by this provider.
-
-
-
Method Detail
-
getProvidedAttribute
oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType getProvidedAttribute()
Returns the non-nullAttributeDesignator
s provided/supported by this provider.- Returns:
- the non-null supported
AttributeDesignatorType
-
beginMultipleDecisionRequest
default void beginMultipleDecisionRequest(EvaluationContext mdpContext)
When the Multiple Decision Profile is used, the PDP engine calls this method before evaluating the Individual Decision Requests of a given Multiple Decision request. This enables the attribute provider to set attributes and/or variables in the scope of the Multiple Decision Request, therefore reuse the same values in all its Individual Decision Requests. A typical use case is an AttributeProvider providing the current date/time which should be the same for all Individual Decision requests within the same Multiple Decision request in order to be consistent (e.g. AuthzForce built-in StandardEnvironmentAttributeProvider configured with override=true). In this case, the AttributeProvider may set the current date/time once and for all on themdpContext
for a given Multiple Decision request, and reuse it later for each Individual Decision context inget(EvaluationContext, Optional)
.- Parameters:
mdpContext
- context of a Multiple Decision request evaluation, will be passed on asmdpContext
argument ofget(EvaluationContext, Optional)
when Individual Decision requests are evaluated.
-
get
AttributeBag<AV> get(EvaluationContext individualDecisionContext, Optional<EvaluationContext> mdpContext) throws IndeterminateEvaluationException
Provides values of the attribute matching the given designator data. If no value found, but no other error occurred, an empty bag is returned.- Parameters:
individualDecisionContext
- the (Individual Decision) request contextmdpContext
- * the context of the Multiple Decision request that theindividualDecisionContext
belongs to if the Multiple Decision Profile is used; same as themdpContext
parameter ofbeginMultipleDecisionRequest(EvaluationContext)
.- Throws:
UnsupportedOperationException
-attributeFQN
orreturnDatatype
are not supported (the PDP engine should try another attribute provider if any)IndeterminateEvaluationException
-attributeFQN
orreturnDatatype
are supported but some error occurred while trying to resolve the attribute value(s)
-
-