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