Class BatchResponseDsml
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.response.BatchResponseDsml
-
public class BatchResponseDsml extends Object
This class represents the Batch Response. It can be used to generate an the XML String of a BatchResponse.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description BatchResponseDsml()
Creates a new instance of BatchResponseDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addResponse(DsmlDecorator<? extends Response> response)
Adds a request to the Batch Response DSML.DsmlDecorator<? extends Response>
getCurrentResponse()
Gets the current responseint
getRequestID()
Gets the ID of the responseList<DsmlDecorator<? extends Response>>
getResponses()
Gets the List of all the responsesboolean
removeResponse(DsmlDecorator<Response> response)
Removes a request from the Batch Response DSML.void
setRequestID(int requestID)
Sets the ID of the responseString
toDsml()
Converts this Batch Response to its XML representation in the DSMLv2 format.String
toDsml(boolean prettyPrint)
Converts this Batch Response to its XML representation in the DSMLv2 format.
-
-
-
Constructor Detail
-
BatchResponseDsml
public BatchResponseDsml()
Creates a new instance of BatchResponseDsml.
-
-
Method Detail
-
getCurrentResponse
public DsmlDecorator<? extends Response> getCurrentResponse()
Gets the current response- Returns:
- the current response
-
addResponse
public boolean addResponse(DsmlDecorator<? extends Response> response)
Adds a request to the Batch Response DSML.- Parameters:
response
- the request to add- Returns:
- true (as per the general contract of the Collection.add method).
-
removeResponse
public boolean removeResponse(DsmlDecorator<Response> response)
Removes a request from the Batch Response DSML.- Parameters:
response
- the request to remove- Returns:
- true if this list contained the specified element.
-
getRequestID
public int getRequestID()
Gets the ID of the response- Returns:
- the ID of the response
-
setRequestID
public void setRequestID(int requestID)
Sets the ID of the response- Parameters:
requestID
- the ID to set
-
getResponses
public List<DsmlDecorator<? extends Response>> getResponses()
Gets the List of all the responses- Returns:
- the List of all the responses
-
toDsml
public String toDsml()
Converts this Batch Response to its XML representation in the DSMLv2 format. The XML document will be formatted for pretty printing by default.- Returns:
- the XML representation in DSMLv2 format
-
-