public class BoxDefaultRequestObject extends Object implements IBoxRequestObject
| Constructor and Description |
|---|
BoxDefaultRequestObject()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BoxDefaultRequestObject |
addField(String field)
Add a field in the request, these fields (Please check "Fields" part in developer doc will end up as fields
query parameter in the url.
|
BoxDefaultRequestObject |
addFields(List<String> fields)
Add fields in the request, these fields (Please check "Fields" part in developer doc will end up as fields
query parameter in the url.
|
BoxDefaultRequestObject |
addHeader(String key,
String value)
Add a header.
|
BoxDefaultRequestObject |
addQueryParam(String key,
String value)
Add a query parameter.
|
Object |
get(String key)
Get value.
|
org.apache.http.HttpEntity |
getEntity()
Get entity, which will be put into request body.
|
List<String> |
getFields()
Get fields, these fields (Please check "Fields" part in developer doc will end up as fields query parameter
in the url.
|
Map<String,String> |
getHeaders()
Headers.
|
MapJSONStringEntity |
getJSONEntity()
Get JSON entity.
|
IBoxJSONParser |
getJSONParser() |
Map<String,String> |
getQueryParams()
Query parameters.
|
IBoxJSONStringEntity |
put(String key,
IBoxJSONStringEntity value)
Add a key value pair to the request body.
|
String |
put(String key,
String value)
Add a key value string pair to the request body.
|
String[] |
put(String key,
String[] value)
Add a key value string pair to the request body.
|
void |
setJSONParser(IBoxJSONParser parser) |
BoxDefaultRequestObject |
setPage(int limit,
int offset) |
public IBoxJSONParser getJSONParser()
public void setJSONParser(IBoxJSONParser parser)
public org.apache.http.HttpEntity getEntity()
throws BoxRestException
IBoxRequestObjectgetEntity in interface IBoxRequestObjectBoxRestExceptionpublic MapJSONStringEntity getJSONEntity()
public List<String> getFields()
IBoxRequestObjectgetFields in interface IBoxRequestObjectpublic BoxDefaultRequestObject addField(String field)
field - field to add. Currently supported fields are the Strings defined in com.box.boxjavalibv2.dao, for example:
BoxCollaboration.FIELD_ROLE, BoxCollaboration.FIELD_CREATED_BY...public BoxDefaultRequestObject addFields(List<String> fields)
fields - fields to add. Currently supported fields are the Strings defined in com.box.boxjavalibv2.dao, for example:
BoxCollaboration.FIELD_ROLE, BoxCollaboration.FIELD_CREATED_BY...public BoxDefaultRequestObject addQueryParam(String key, String value)
key - keyvalue - valuepublic BoxDefaultRequestObject addHeader(String key, String value)
key - keyvalue - valuepublic Map<String,String> getHeaders()
IBoxRequestObjectgetHeaders in interface IBoxRequestObjectpublic Map<String,String> getQueryParams()
IBoxRequestObjectgetQueryParams in interface IBoxRequestObjectpublic IBoxJSONStringEntity put(String key, IBoxJSONStringEntity value)
key - keyvalue - valuepublic String put(String key, String value)
key - keyvalue - valuepublic String[] put(String key, String[] value)
key - keyvalue - valuepublic BoxDefaultRequestObject setPage(int limit, int offset)
limit - the number of items to return. default is 100, max is 1000.offset - the item at which to begin the response, default is 0.Copyright © 2014. All Rights Reserved.