org.wso2.balana.xacml3
Class Obligation

java.lang.Object
  extended by org.wso2.balana.xacml3.Obligation
All Implemented Interfaces:
ObligationResult

public class Obligation
extends Object
implements ObligationResult

Represents the ObligationType XML type found in the context scheme in XACML 3.0


Constructor Summary
Obligation(List<AttributeAssignment> assignments, URI obligationId)
          Constructor that creates a new Obligation based on the given elements.
 
Method Summary
 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
 List<AttributeAssignment> getAssignments()
          Returns the attribute assignment data in this obligation.
static Obligation getInstance(Node root)
          creates a Obligation based on its DOM node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Obligation

public Obligation(List<AttributeAssignment> assignments,
                  URI obligationId)
Constructor that creates a new Obligation based on the given elements.

Parameters:
assignments - List of AttributeAssignment
obligationId - Identifier that uniquely identify the Obligation
Method Detail

getInstance

public static Obligation getInstance(Node root)
                              throws ParsingException
creates a Obligation based on its DOM node.

Parameters:
root - the DOM root of the ObligationType XML type
Returns:
an instance of an obligation
Throws:
ParsingException - if the structure isn't valid

encode

public void encode(StringBuilder builder)
Encodes this Obligation into its XML form and writes this out to the provided StringBuilder

Specified by:
encode in interface ObligationResult
Parameters:
builder - string stream into which the XML-encoded data is written

getAssignments

public List<AttributeAssignment> getAssignments()
Returns the attribute assignment data in this obligation. The List contains objects of type Attribute with only the correct attribute fields being used.

Returns:
the assignments

encode

public String encode()
Encodes this Obligation into its XML form

Specified by:
encode in interface ObligationResult
Returns:
String


Copyright © 2015 WSO2. All rights reserved.