E - type of BoxJsonObject that is returned in the response.R - type of BoxRequest being created.public abstract class BoxRequestItem<E extends BoxJsonObject,R extends BoxRequest<E,R>> extends BoxRequest<E,R>
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods, BoxRequest.TLSSSLSocketFactory| Modifier and Type | Field and Description |
|---|---|
protected java.lang.StringBuffer |
mHintHeader |
protected java.lang.String |
mId |
protected static java.lang.String |
QUERY_FIELDS |
JSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Modifier | Constructor and Description |
|---|---|
protected |
BoxRequestItem(BoxRequestItem r) |
|
BoxRequestItem(java.lang.Class<E> clazz,
java.lang.String id,
java.lang.String requestUrl,
BoxSession session)
Constructs a BoxRequestItem with the default parameters.
|
| Modifier and Type | Method and Description |
|---|---|
R |
addRepresentationHintGroup(java.lang.String... hints)
Include a representation hint group into this request.
|
protected void |
createHeaderMap() |
java.lang.String |
getId()
Returns the id of the Box item being modified.
|
protected void |
onSendCompleted(BoxResponse<E> response)
Post action that will be performed after a successful send occurs.
|
R |
setFields(java.lang.String... fields)
Sets the fields to return in the response.
|
buildUrl, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSend, parseHashMapEntry, parseJsonObject, send, sendRequest, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskprotected static java.lang.String QUERY_FIELDS
protected java.lang.String mId
protected java.lang.StringBuffer mHintHeader
public BoxRequestItem(java.lang.Class<E> clazz, java.lang.String id, java.lang.String requestUrl, BoxSession session)
clazz - class of the object returned in the response.id - id of the object.requestUrl - URL of the endpoint for the request.session - the authenticated session that will be used to make the request with.protected BoxRequestItem(BoxRequestItem r)
public R setFields(java.lang.String... fields)
fields - fields to return in the response.public R addRepresentationHintGroup(java.lang.String... hints)
hints - string list with all the representation hintsprotected void createHeaderMap()
createHeaderMap in class BoxRequest<E extends BoxJsonObject,R extends BoxRequest<E,R>>public java.lang.String getId()
protected void onSendCompleted(BoxResponse<E> response) throws BoxException
BoxRequestonSendCompleted in class BoxRequest<E extends BoxJsonObject,R extends BoxRequest<E,R>>response - response of the BoxRequestBoxException - thrown if there was a problem with handling the request.