issrg.pba
Class SimpleObligation

java.lang.Object
  extended by issrg.pba.SimpleObligation
All Implemented Interfaces:
Obligation

public class SimpleObligation
extends java.lang.Object
implements Obligation

This class implements the Obligation Interface, and provides a way to construct Obligation Object based on a PolicyXMLNode. For details of the PolicyXMLNode, please refer to the PolicyXMLNode.java and its documents.

Author:
gansen

Field Summary
 
Fields inherited from interface issrg.pba.Obligation
AFTER, BEFORE
 
Constructor Summary
SimpleObligation()
          Create a new instance of SimpleObligation that contains no obligations.
SimpleObligation(PolicyXMLNode ObligationNode)
          Construct a SimpleObligation object based on XMLPolicyNode (the ObligationNode parameter).
 
Method Summary
 java.lang.String getChronicle()
          Retrieve the Chronicle attribute's value
 java.lang.String getObligationID()
          getObligationID is a function inherited from the Obligation Interface.
 java.lang.String toString()
          Convert the instance to a string representation.
 java.lang.String toXML()
          Convert the object to XML representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleObligation

public SimpleObligation()
Create a new instance of SimpleObligation that contains no obligations.


SimpleObligation

public SimpleObligation(PolicyXMLNode ObligationNode)
Construct a SimpleObligation object based on XMLPolicyNode (the ObligationNode parameter).

Parameters:
ObligationNode - The XMLNode that is used to construct the SimpleObligation object. This function only remembers the ObligationNode, and does not produce a copy of the node. Thus all future changes to the ObligatonNode will be reflected in the corresponding SimpleObligation instances.
Method Detail

getObligationID

public java.lang.String getObligationID()
getObligationID is a function inherited from the Obligation Interface.

Specified by:
getObligationID in interface Obligation
Returns:
the object's ObligationID attribute as specified in the XML policy.

toString

public java.lang.String toString()
Convert the instance to a string representation.

Overrides:
toString in class java.lang.Object

toXML

public java.lang.String toXML()
Convert the object to XML representation.

Specified by:
toXML in interface Obligation

getChronicle

public java.lang.String getChronicle()
Retrieve the Chronicle attribute's value

Specified by:
getChronicle in interface Obligation
Returns:
The value of the Chronicle attribute. The return value may be null if the Chronicle value is not set in the xml policy.