T1 - The raw response class returned by the service.T2 - The class of the collection page.public abstract class BaseCollectionRequest<T1,T2> extends java.lang.Object implements IHttpRequest
| Constructor and Description |
|---|
BaseCollectionRequest(java.lang.String requestUrl,
IOneDriveClient client,
java.util.List<Option> options,
java.lang.Class<T1> responseClass,
java.lang.Class<T2> collectionPageClass)
Create the collection request.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(java.lang.String header,
java.lang.String value)
Adds a header to this request.
|
void |
addQueryOption(QueryOption option)
Adds a query option.
|
protected BaseRequest |
getBaseRequest()
Gets the base request for this collection request.
|
java.lang.Class<T2> |
getCollectionPageClass()
Gets the class for the collection page.
|
java.util.List<HeaderOption> |
getHeaders()
Gets the headers.
|
HttpMethod |
getHttpMethod()
Gets the http method.
|
java.util.List<Option> |
getOptions()
Gets the full list of options for this request.
|
java.net.URL |
getRequestUrl()
Gets the request url.
|
protected T1 |
send()
Send this request.
|
public BaseCollectionRequest(java.lang.String requestUrl,
IOneDriveClient client,
java.util.List<Option> options,
java.lang.Class<T1> responseClass,
java.lang.Class<T2> collectionPageClass)
requestUrl - The url to make the request against.client - The client which can issue the request.options - The options for this request.responseClass - The class for the response.collectionPageClass - The class for the collection page.protected T1 send() throws ClientException
ClientException - An exception occurs if there was an error while the request was sent.public java.net.URL getRequestUrl()
getRequestUrl in interface IHttpRequestpublic HttpMethod getHttpMethod()
getHttpMethod in interface IHttpRequestpublic java.util.List<HeaderOption> getHeaders()
getHeaders in interface IHttpRequestpublic void addHeader(java.lang.String header,
java.lang.String value)
addHeader in interface IHttpRequestheader - The name of the header.value - The value of the header.public java.util.List<Option> getOptions()
getOptions in interface IHttpRequestpublic void addQueryOption(QueryOption option)
option - The query option to add.protected BaseRequest getBaseRequest()
public java.lang.Class<T2> getCollectionPageClass()