Class BatchRequestDsml
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.request.BatchRequestDsml
-
public class BatchRequestDsml extends Object
This class represents the Batch Request. It can be used to generate an the XML String of a BatchRequest.- Author:
- Apache Directory Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BatchRequestDsml.OnError
This enum represents the different types of on error handling for a BatchRequeststatic class
BatchRequestDsml.Processing
This enum represents the different types of processing for a Batch Requeststatic class
BatchRequestDsml.ResponseOrder
This enum represents the different types of response order for a Batch Request
-
Constructor Summary
Constructors Constructor Description BatchRequestDsml()
Creates a new instance of BatchResponseDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addRequest(DsmlDecorator<? extends Request> request)
Adds a request to the Batch Request DSML.DsmlDecorator<? extends Request>
getCurrentRequest()
Gets the current requestBatchRequestDsml.OnError
getOnError()
Gets the on error handling type of the requestBatchRequestDsml.Processing
getProcessing()
Gets the processing type of the requestint
getRequestID()
Gets the ID of the requestList<DsmlDecorator<? extends Request>>
getRequests()
Gets the List of all the requests in the Batch RequestBatchRequestDsml.ResponseOrder
getResponseOrder()
Gets the response order type of the requestboolean
isStoringRequests()
boolean
removeRequest(DsmlDecorator<? extends Request> request)
Removes a request from the Batch Request DSML.void
setOnError(BatchRequestDsml.OnError onError)
Sets the on error handling type of the requestvoid
setProcessing(BatchRequestDsml.Processing processing)
Sets the processing type of the requestvoid
setRequestID(int requestID)
Sets the ID of the requestvoid
setResponseOrder(BatchRequestDsml.ResponseOrder responseOrder)
Sets the response order type of the requestvoid
setStoreReq(boolean storeReq)
set the storeReq flag to turn on/off storing of request objects Note: it is better to set this flag to false while processing large DSML batch requestsString
toDsml()
Converts this Batch Request to its XML representation in the DSMLv2 format.String
toString()
-
-
-
Constructor Detail
-
BatchRequestDsml
public BatchRequestDsml()
Creates a new instance of BatchResponseDsml.
-
-
Method Detail
-
getCurrentRequest
public DsmlDecorator<? extends Request> getCurrentRequest()
Gets the current request- Returns:
- the current request
-
addRequest
public boolean addRequest(DsmlDecorator<? extends Request> request)
Adds a request to the Batch Request DSML.- Parameters:
request
- the request to add- Returns:
- true (as per the general contract of the Collection.add method).
-
removeRequest
public boolean removeRequest(DsmlDecorator<? extends Request> request)
Removes a request from the Batch Request DSML.- Parameters:
request
- the request to remove- Returns:
- true if this list contained the specified element.
-
getRequestID
public int getRequestID()
Gets the ID of the request- Returns:
- the ID of the request
-
setRequestID
public void setRequestID(int requestID)
Sets the ID of the request- Parameters:
requestID
- the ID to set
-
getProcessing
public BatchRequestDsml.Processing getProcessing()
Gets the processing type of the request- Returns:
- the processing type of the request
-
setProcessing
public void setProcessing(BatchRequestDsml.Processing processing)
Sets the processing type of the request- Parameters:
processing
- the processing type to set
-
getOnError
public BatchRequestDsml.OnError getOnError()
Gets the on error handling type of the request- Returns:
- the on error handling type of the request
-
setOnError
public void setOnError(BatchRequestDsml.OnError onError)
Sets the on error handling type of the request- Parameters:
onError
- the on error handling type to set
-
getResponseOrder
public BatchRequestDsml.ResponseOrder getResponseOrder()
Gets the response order type of the request- Returns:
- the response order type of the request
-
setResponseOrder
public void setResponseOrder(BatchRequestDsml.ResponseOrder responseOrder)
Sets the response order type of the request- Parameters:
responseOrder
- the response order type to set
-
getRequests
public List<DsmlDecorator<? extends Request>> getRequests()
Gets the List of all the requests in the Batch Request- Returns:
- the List of all the requests in the Batch Request
-
toDsml
public String toDsml()
Converts this Batch Request to its XML representation in the DSMLv2 format.- Returns:
- the XML representation in DSMLv2 format
-
isStoringRequests
public boolean isStoringRequests()
- Returns:
- true if the request objects are stored, false otherwise
-
setStoreReq
public void setStoreReq(boolean storeReq)
set the storeReq flag to turn on/off storing of request objects Note: it is better to set this flag to false while processing large DSML batch requests- Parameters:
storeReq
- Tells if the request objects must be stored or not
-
-