public class AdviceExpression extends Object
| Constructor and Description |
|---|
AdviceExpression(URI adviceId,
int appliesTo,
List<AttributeAssignmentExpression> attributeAssignmentExpressions)
Constructor that takes all the data associated with an AdviceExpression
.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(StringBuilder builder)
Encodes this
ObligationExpression into its XML form and writes this out to the provided
StringBuilder |
Advice |
evaluate(EvaluationCtx ctx)
return evaluation result of the advice expression
|
URI |
getAdviceId()
returns advice id
|
int |
getAppliesTo()
returns whether this is applied for permit or deny
|
static AdviceExpression |
getInstance(Node root,
PolicyMetaData metaData)
Creates an instance of
AdviceExpression based on the DOM root node. |
public AdviceExpression(URI adviceId, int appliesTo, List<AttributeAssignmentExpression> attributeAssignmentExpressions)
adviceId - the advice's idappliesTo - the effect for which this advice must be providedattributeAssignmentExpressions - a List of AttributeAssignmentExpressionspublic static AdviceExpression getInstance(Node root, PolicyMetaData metaData) throws ParsingException
AdviceExpression based on the DOM root node.root - the DOM root of the AdviceExpressionType XML typemetaData - policy meta dataAdviceExpressionParsingException - if the structure isn't validpublic int getAppliesTo()
public URI getAdviceId()
public Advice evaluate(EvaluationCtx ctx)
ctx - EvaluationCtxAdvice Objectpublic void encode(StringBuilder builder)
ObligationExpression into its XML form and writes this out to the provided
StringBuilderbuilder - string stream into which the XML-encoded data is writtenCopyright © 2021 WSO2. All rights reserved.