public class Obligation extends AbstractObligation implements ObligationResult
AbstractObligation
and implements
the ObligationResult
fulfillOn, obligationId
Constructor and Description |
---|
Obligation(URI obligationId,
int fulfillOn,
List<Attribute> assignments)
Constructor that takes all the data associated with an obligation.
|
Modifier and Type | Method and Description |
---|---|
String |
encode()
Encodes this
Obligation into its XML form |
void |
encode(StringBuilder builder)
Encodes this
Obligation into its XML form and writes this out to the provided
StringBuilder |
ObligationResult |
evaluate(EvaluationCtx ctx)
Evaluates obligation and creates the results
|
List<Attribute> |
getAssignments()
Returns the attribute assignment data in this obligation.
|
static Obligation |
getInstance(Node root)
Creates an instance of
Obligation based on the DOM root node. |
getFulfillOn, getId
public Obligation(URI obligationId, int fulfillOn, List<Attribute> assignments)
Attribute
objects, but only the fields used by the
AttributeAssignmentType are used.obligationId
- the obligation's idfulfillOn
- the effect denoting when to fulfill this obligationassignments
- a List
of Attribute
spublic static Obligation getInstance(Node root) throws ParsingException
Obligation
based on the DOM root node.root
- the DOM root of the ObligationType XML typeParsingException
- if the structure isn't validpublic ObligationResult evaluate(EvaluationCtx ctx)
AbstractObligation
evaluate
in class AbstractObligation
ctx
- EvaluationCtx
ObligationResult
public List<Attribute> getAssignments()
List
contains
objects of type Attribute
with only the correct attribute fields being used.public String encode()
Obligation
into its XML formencode
in interface ObligationResult
String
public void encode(StringBuilder builder)
Obligation
into its XML form and writes this out to the provided
StringBuilder
encode
in interface ObligationResult
encode
in class AbstractObligation
builder
- string stream into which the XML-encoded data is writtenCopyright © 2016 WSO2. All rights reserved.