public class Obligation extends Object
Constructor and Description |
---|
Obligation(URI id,
int fulfillOn,
List assignments)
Constructor that takes all the data associated with an obligation.
|
Modifier and Type | Method and Description |
---|---|
void |
encode(OutputStream output)
Encodes this
Obligation into its XML form and writes this
out to the provided OutputStream |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this
Obligation into its XML form and writes this
out to the provided OutputStream |
List |
getAssignments()
Returns the attribute assignment data in this obligation.
|
int |
getFulfillOn()
Returns effect that will cause this obligation to be included in a
response
|
URI |
getId()
Returns the id of this obligation
|
static Obligation |
getInstance(Node root)
Creates an instance of
Obligation based on the DOM root
node. |
public Obligation(URI id, int fulfillOn, List assignments)
Attribute
objects,
but only the fields used by the AttributeAssignmentType are used.id
- 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 URI getId()
public int getFulfillOn()
public List getAssignments()
List
contains objects of type Attribute
with only the correct attribute fields being used.public void encode(OutputStream output)
Obligation
into its XML form and writes this
out to the provided OutputStream with no indentation.
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
Obligation
into its XML form and writes this
out to the provided OutputStream with indentation.
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation stringsCopyright © 2023 JBoss by Red Hat. All rights reserved.