public class BaseRequestItem extends Object implements RequestItem
| Modifier and Type | Field and Description |
|---|---|
protected SecurityToken |
token |
APP_ID, APP_SUBSTITUTION_TOKEN, COUNT, DEFAULT_COUNT, DEFAULT_START_INDEX, FIELDS, FILTER_BY, FILTER_OPERATION, FILTER_VALUE, SORT_BY, SORT_ORDER, START_INDEX| Constructor and Description |
|---|
BaseRequestItem(org.json.JSONObject parameters,
Map<String,FormDataItem> formItems,
SecurityToken token,
BeanConverter converter,
BeanJsonConverter jsonConverter) |
BaseRequestItem(Map<String,String[]> parameters,
SecurityToken token,
BeanConverter converter,
BeanJsonConverter jsonConverter) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAppId()
Gets the Opensocial App ID for this request
|
Object |
getAttribute(String val)
Gets an attribute for this request.
|
int |
getCount()
Gets the value of the count parameter
|
Set<String> |
getFields()
Gets the unique set of fields from the request
|
Set<String> |
getFields(Set<String> defaultValue)
Get the unique set of fields from the request with defaults
|
String |
getFilterBy()
Gets the value of the filterBy parameter
|
FilterOperation |
getFilterOperation()
Gets the value of the filterOperation parameter
|
String |
getFilterValue()
Gets the value of the filterValue parameter
|
FormDataItem |
getFormMimePart(String partName)
Returns MIME content data for multipart/mixed form submissions
|
List<String> |
getListParameter(String paramName)
Tries to get a list of values for a specified parameter.
|
String |
getParameter(String paramName)
Gets the specified parameter as a string
|
String |
getParameter(String paramName,
String defaultValue)
Gets the specified parameter as a string, with a default value
|
String |
getSortBy()
Gets the value of the sortBy parameter
|
SortOrder |
getSortOrder()
Gets the value of the sortOrder parameter
|
int |
getStartIndex()
Gets the value of the startIndex parameter
|
SecurityToken |
getToken()
Returns the security token of this request
|
<T> T |
getTypedParameter(String parameterName,
Class<T> dataTypeClass)
Converts a parameter into an object using a converter
|
<T> T |
getTypedRequest(Class<T> dataTypeClass)
Assume that all the parameters in the request belong to single aggregate
type and convert to it.
|
Date |
getUpdatedSince()
Gets the value of the updatedSince parameter
|
void |
setAttribute(String val,
Object obj)
Sets an attribute on this request object
|
void |
setParameter(String paramName,
Object paramValue) |
protected final SecurityToken token
public BaseRequestItem(Map<String,String[]> parameters, SecurityToken token, BeanConverter converter, BeanJsonConverter jsonConverter)
public BaseRequestItem(org.json.JSONObject parameters,
Map<String,FormDataItem> formItems,
SecurityToken token,
BeanConverter converter,
BeanJsonConverter jsonConverter)
public String getAppId()
RequestItemgetAppId in interface RequestItempublic Date getUpdatedSince()
RequestItemgetUpdatedSince in interface RequestItempublic String getSortBy()
RequestItemgetSortBy in interface RequestItempublic SortOrder getSortOrder()
RequestItemgetSortOrder in interface RequestItempublic String getFilterBy()
RequestItemgetFilterBy in interface RequestItempublic int getStartIndex()
RequestItemgetStartIndex in interface RequestItempublic int getCount()
RequestItemgetCount in interface RequestItempublic FilterOperation getFilterOperation()
RequestItemgetFilterOperation in interface RequestItempublic String getFilterValue()
RequestItemgetFilterValue in interface RequestItempublic Set<String> getFields()
RequestItemgetFields in interface RequestItempublic Set<String> getFields(Set<String> defaultValue)
RequestItemgetFields in interface RequestItemdefaultValue - returned if no fields are specified in the request.public SecurityToken getToken()
RequestItemgetToken in interface RequestItempublic <T> T getTypedParameter(String parameterName, Class<T> dataTypeClass)
RequestItemgetTypedParameter in interface RequestItemT - The type of this objectparameterName - the name of the parameter with data to convertdataTypeClass - The class to makepublic <T> T getTypedRequest(Class<T> dataTypeClass)
RequestItemgetTypedRequest in interface RequestItemdataTypeClass - the class to convert topublic String getParameter(String paramName)
RequestItemgetParameter in interface RequestItemparamName - the param name to getpublic String getParameter(String paramName, String defaultValue)
RequestItemgetParameter in interface RequestItemparamName - the param name to getdefaultValue - the default value of the parameterpublic List<String> getListParameter(String paramName)
RequestItemgetListParameter in interface RequestItemparamName - The parameterpublic FormDataItem getFormMimePart(String partName)
RequestItemgetFormMimePart in interface RequestItempartName - the part name to retrievepublic Object getAttribute(String val)
RequestItemgetAttribute in interface RequestItemval - the localized string variable for this requestpublic void setAttribute(String val, Object obj)
RequestItemsetAttribute in interface RequestItemval - string valueobj - an objectCopyright © 2007-2012. All Rights Reserved.