Package com.iplanet.services.comm.share
Class NotificationSet
- java.lang.Object
-
- com.iplanet.services.comm.share.NotificationSet
-
public class NotificationSet extends Object
ThisNotificationSetclass represents a NotificationSet XML document. The NotificationSet DTD is defined as the following:<?xml version="1.0"> < !-- This DTD is used by PLL --> < !DOCTYPE NotificationSet [ < !ELEMENT NotificationSet(Notification)+> < !ATTLIST NotificationSet vers CDATA #REQUIRED svcid CDATA #REQUIRED notid CDATA #REQUIRED> < !ELEMENT Notification(#PCDATA)*> < !ATTLIST Notification dtdid CDATA #IMPLIED> ]>Each NotificationSet object contains a version, service ID, notification set ID, and a collection of Notification objects. The NotificationSet views each Notification object as a String. This makes it possible that the content of the Notification object can be another XML document. The PLL provides a reference Notification DTD. Please see class Notification for details on the Notification DTD. This class also provides a method to aggregate each Notification object and returns a NotificationSet XML document based on the NotificationSet DTD mentioned above.- See Also:
Notification
-
-
Constructor Summary
Constructors Constructor Description NotificationSet(String service)This constructor is used primarily at the server side to construct a NotificationSet object for a given service.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNotification(Notification notification)Adds a Notification object to this object.Vector<Notification>getNotifications()Gets the Notification objects contained in this object.StringgetServiceID()Gets the service ID of the NotificationSet request.static NotificationSetparseXML(String xml)This method is used primarily at the client side to reconstruct a NotificationSet object based on the XML document received from server.StringtoXMLString()Returns an XML NotificationSet document in String format.
-
-
-
Constructor Detail
-
NotificationSet
public NotificationSet(String service)
This constructor is used primarily at the server side to construct a NotificationSet object for a given service. Individual notification shall be added to this object by calling addNotification method.- Parameters:
service- The name of the service.
-
-
Method Detail
-
parseXML
public static NotificationSet parseXML(String xml)
This method is used primarily at the client side to reconstruct a NotificationSet object based on the XML document received from server. The DTD of this XML document is described above.- Parameters:
xml- The NotificationSet XML document String.
-
getServiceID
public String getServiceID()
Gets the service ID of the NotificationSet request.- Returns:
- The service ID of the NotificationSet request.
-
getNotifications
public Vector<Notification> getNotifications()
Gets the Notification objects contained in this object.- Returns:
- A Vector of Notification objects.
-
addNotification
public void addNotification(Notification notification)
Adds a Notification object to this object.- Parameters:
notification- A reference to a Notification object.
-
toXMLString
public String toXMLString()
Returns an XML NotificationSet document in String format. The returned String is formatted based on the NotificationSet DTD by aggregating each Notification object in this object.- Returns:
- An XML NotificationSet document in String format.
-
-