SunTM's XACML Implementation for JavaTM

com.sun.xacml
Class Obligation

java.lang.Object
  extended bycom.sun.xacml.Obligation

public class Obligation
extends Object

Represents the ObligationType XML type in XACML. This also stores all the AttriubteAssignmentType XML types.

Since:
1.0

Constructor Summary
Obligation(URI id, int fulfillOn, List assignments)
          Constructor that takes all the data associated with an obligation.
 
Method Summary
 void encode(OutputStream output)
          Encodes this Obligation into its XML form and writes this out to the provided OutputStream with no indentation.
 void encode(OutputStream output, Indenter indenter)
          Encodes this Obligation into its XML form and writes this out to the provided OutputStream with indentation.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Obligation

public Obligation(URI id,
                  int fulfillOn,
                  List assignments)
Constructor that takes all the data associated with an obligation. The attribute assignment list contains Attribute objects, but only the fields used by the AttributeAssignmentType are used.

Parameters:
id - the obligation's id
fulfillOn - the effect denoting when to fulfill this obligation
assignments - a List of Attributes
Method Detail

getInstance

public static Obligation getInstance(Node root)
                              throws ParsingException
Creates an instance of Obligation based on the DOM root 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

getId

public URI getId()
Returns the id of this obligation

Returns:
the id

getFulfillOn

public int getFulfillOn()
Returns effect that will cause this obligation to be included in a response

Returns:
the fulfillOn effect

getAssignments

public List 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 void encode(OutputStream output)
Encodes this Obligation into its XML form and writes this out to the provided OutputStream with no indentation.

Parameters:
output - a stream into which the XML-encoded data is written

encode

public void encode(OutputStream output,
                   Indenter indenter)
Encodes this Obligation into its XML form and writes this out to the provided OutputStream with indentation.

Parameters:
output - a stream into which the XML-encoded data is written
indenter - an object that creates indentation strings

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.