BatchRequestContent Class
- java.
lang. Object - com.
microsoft. graph. content. BatchRequestContent
- com.
public class BatchRequestContent
Respresents the content of a JSON batch request
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| protected static final java.util.regex.Pattern |
protocolAndHostReplacementPattern
pattern to replace the protocol and host part of the request if specified |
|
java.util.List<Batch |
requests
Steps part of the batch request |
Constructor Summary
| Constructor | Description | |
|---|---|---|
| BatchRequestContent() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.lang.String |
addBatchRequestStep(IHttpRequest request, HttpMethod httpMethod, T serializableBody)
Adds a request as a step to the current batch |
| java.lang.String |
addBatchRequestStep(IHttpRequest request, HttpMethod httpMethod, T serializableBody, String[] dependsOnRequestsIds)
Adds a request as a step to the current batch |
|
Batch |
getStepById(String stepId)
Gets a step by its step id |
| java.lang.String |
addBatchRequestStep(IHttpRequest request)
Adds a request as a step to the current batch. |
| java.lang.String |
addBatchRequestStep(IHttpRequest request, HttpMethod httpMethod)
Adds a request as a step to the current batch |
| protected java.lang.String |
getNextRequestId()
Generates a randomly available request id |
| void |
removeBatchRequestStepWithId(String[] stepIds)
Removes requests from the requests to be executed by the batch. |
Methods inherited from java.lang.Object
Field Details
protocolAndHostReplacementPattern
protected static final Pattern protocolAndHostReplacementPattern
pattern to replace the protocol and host part of the request if specified
requests
public List
Steps part of the batch request
Constructor Details
BatchRequestContent
public BatchRequestContent()
Method Details
addBatchRequestStep
public String
Adds a request as a step to the current batch
Parameters:
Returns:
addBatchRequestStep
public String
Adds a request as a step to the current batch
Parameters:
Returns:
getStepById
public BatchRequestStep
Gets a step by its step id
Parameters:
Returns:
addBatchRequestStep
public String addBatchRequestStep(IHttpRequest request)
Adds a request as a step to the current batch. Defaults to GET if the HTTP method is not set in the request.
Parameters:
Returns:
addBatchRequestStep
public String addBatchRequestStep(IHttpRequest request, HttpMethod httpMethod)
Adds a request as a step to the current batch
Parameters:
Returns:
getNextRequestId
protected String getNextRequestId()
Generates a randomly available request id
Returns:
removeBatchRequestStepWithId
public void removeBatchRequestStepWithId(String[] stepIds)
Removes requests from the requests to be executed by the batch. Also removes any dependency references that might exist.
Parameters: