AV
- AttributeDesignator evaluation result value's primitive datatypepublic final class GenericAttributeProviderBasedAttributeDesignatorExpression<AV extends AttributeValue> extends Object implements AttributeDesignatorExpression<AV>
AttributeProvider
to retrieve the attribute value not only from the request but also possibly from extra Attribute Provider
modules (so-called XACML PIPs) (PDP extensions)Constructor and Description |
---|
GenericAttributeProviderBasedAttributeDesignatorExpression(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType attrDesignator,
BagDatatype<AV> resultDatatype,
AttributeProvider attrProvider)
Return an instance of an AttributeDesignator based on an AttributeDesignatorType
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Equal iff the Attribute Category/Issuer/Id are equal
|
Bag<AV> |
evaluate(EvaluationContext context)
Evaluates the expression using the given context.
|
AttributeFqn |
getAttributeFQN()
Get Attribute Category/Issuer/Id
|
Datatype<Bag<AV>> |
getReturnType()
Gets the expected return type of the expression if evaluated.
|
Optional<Bag<AV>> |
getValue()
Get the constant value of this expression if it has a constant value, i.e.
|
int |
hashCode() |
boolean |
isNonEmptyBagRequired()
Indicates whether the attribute's presence is required, i.e.
|
String |
toString() |
public GenericAttributeProviderBasedAttributeDesignatorExpression(oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType attrDesignator, BagDatatype<AV> resultDatatype, AttributeProvider attrProvider)
attrDesignator
- the AttributeDesignatorType we want to convertresultDatatype
- expected datatype of the result of evaluating this AttributeDesignator ( AV is the expected type of every element in the bag
)attrProvider
- Attribute Provider responsible for finding the attribute designated by this in a given evaluation context at runtimeIllegalArgumentException
- if attrDesignator.getCategory() == null || attrDesignator.getAttributeId() == null
public Optional<Bag<AV>> getValue()
Expression.evaluate(EvaluationContext)
with context == null
. This enables expression consumers to do optimizations, e.g. functions may pre-compile/pre-evaluate parts of
their inputs knowing some are constant values.getValue
in interface Expression<Bag<AV extends AttributeValue>>
public AttributeFqn getAttributeFQN()
AttributeDesignatorExpression
getAttributeFQN
in interface AttributeDesignatorExpression<AV extends AttributeValue>
public boolean isNonEmptyBagRequired()
AttributeDesignatorExpression
isNonEmptyBagRequired
in interface AttributeDesignatorExpression<AV extends AttributeValue>
public Bag<AV> evaluate(EvaluationContext context) throws IndeterminateEvaluationException
evaluate
in interface Expression<Bag<AV extends AttributeValue>>
context
- the representation of the requestIndeterminateEvaluationException
- if evaluation is "Indeterminate" (see XACML core specification)public Datatype<Bag<AV>> getReturnType()
getReturnType
in interface Expression<Bag<AV extends AttributeValue>>
Copyright © 2012–2020. All rights reserved.