public static class BoxRequestsSearch.Search extends BoxRequest<BoxListItems,BoxRequestsSearch.Search>
| Modifier and Type | Class and Description |
|---|---|
static class |
BoxRequestsSearch.Search.Scope |
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONTENT_TYPE_COMMENTS
Only search in comments.
|
static java.lang.String |
CONTENT_TYPE_DESCRIPTION
Only search in descriptions.
|
static java.lang.String |
CONTENT_TYPE_FILE_CONTENTS
Only search in file contents.
|
static java.lang.String |
CONTENT_TYPE_NAME
Only search in names.
|
static java.lang.String |
CONTENT_TYPE_TAGS
Only search in tags.
|
protected static java.lang.String |
FIELD_ANCESTOR_FOLDER_IDS
Field for setting the ancestor folder ids.
|
protected static java.lang.String |
FIELD_CONTENT_TYPES
Field for setting the content types: name, description, file_content, comments, or tags.
|
protected static java.lang.String |
FIELD_CREATED_AT_RANGE
Field for setting the created at range.
|
protected static java.lang.String |
FIELD_FILE_EXTENSIONS
Field for setting the file extensions.
|
protected static java.lang.String |
FIELD_LIMIT
Field for setting number of search results to return (default=30, max =200)
|
protected static java.lang.String |
FIELD_OFFSET
The search result at which to start the response.
|
protected static java.lang.String |
FIELD_OWNER_USER_IDS
Field for setting the owner user ids.
|
protected static java.lang.String |
FIELD_QUERY
Field for setting the search query.
|
protected static java.lang.String |
FIELD_SCOPE
Field for setting the scope for admins only.
|
protected static java.lang.String |
FIELD_SIZE_RANGE
Field for setting the size range.
|
protected static java.lang.String |
FIELD_TYPE
Field for setting return type: file, folder, or web_link.
|
protected static java.lang.String |
FIELD_UPDATED_AT_RANGE
Field for setting the updated at range.
|
JSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mSession| Constructor and Description |
|---|
Search(java.lang.String query,
java.lang.String requestUrl,
BoxSession session)
Creates a search request with the default parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getAncestorFolderIds() |
java.lang.String[] |
getContentTypes() |
java.util.Date |
getCreatedAtDateRangeFrom() |
java.util.Date |
getCreatedAtDateRangeTo() |
java.lang.String[] |
getFileExtensions() |
java.util.Date |
getLastUpdatedAtDateRangeFrom() |
java.util.Date |
getLastUpdatedAtDateRangeTo() |
java.lang.Integer |
getLimit() |
java.lang.Integer |
getOffset() |
java.lang.String[] |
getOwnerUserIds() |
java.lang.String |
getQuery() |
java.lang.String |
getScope() |
java.lang.Long |
getSizeRangeFrom() |
java.lang.Long |
getSizeRangeTo() |
java.lang.String |
getType() |
BoxRequestsSearch.Search |
limitAncestorFolderIds(java.lang.String[] folderIds)
Limit searches to specific ancestor folders.
|
BoxRequestsSearch.Search |
limitContentTypes(java.lang.String[] contentTypes)
Limit search to certain content types.
|
BoxRequestsSearch.Search |
limitCreationTime(java.util.Date fromDate,
java.util.Date toDate)
Limit the search to creation time between fromDate to toDate.
|
BoxRequestsSearch.Search |
limitFileExtensions(java.lang.String[] extensions)
limit file search to given file extensions.
|
BoxRequestsSearch.Search |
limitLastUpdateTime(java.util.Date fromDate,
java.util.Date toDate)
Limit the search to last update time between fromDate to toDate.
|
BoxRequestsSearch.Search |
limitOwnerUserIds(java.lang.String[] userIds)
limit the search to items owned by given users.
|
BoxRequestsSearch.Search |
limitSearchScope(BoxRequestsSearch.Search.Scope scope)
limit search scope.
|
BoxRequestsSearch.Search |
limitSizeRange(long minSize,
long maxSize)
Limit the search to file size greater than minSize in bytes and less than maxSize in bytes.
|
BoxRequestsSearch.Search |
limitType(java.lang.String type)
The type you want to return in your search.
|
BoxRequestsSearch.Search |
limitValueForKey(java.lang.String key,
java.lang.String value)
limit key to certain value.
|
BoxRequestsSearch.Search |
setLimit(int limit)
Sets the limit of items that should be returned
|
BoxRequestsSearch.Search |
setOffset(int offset)
Sets the offset of the items that should be returned
|
buildUrl, createHttpRequest, createQuery, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getStringBody, importRequestContentMapsFrom, logDebug, logRequest, parseHashMapEntry, parseJsonObject, send, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic static java.lang.String CONTENT_TYPE_NAME
public static java.lang.String CONTENT_TYPE_DESCRIPTION
public static java.lang.String CONTENT_TYPE_COMMENTS
public static java.lang.String CONTENT_TYPE_FILE_CONTENTS
public static java.lang.String CONTENT_TYPE_TAGS
protected static final java.lang.String FIELD_QUERY
protected static final java.lang.String FIELD_SCOPE
protected static final java.lang.String FIELD_FILE_EXTENSIONS
protected static final java.lang.String FIELD_CREATED_AT_RANGE
protected static final java.lang.String FIELD_UPDATED_AT_RANGE
protected static final java.lang.String FIELD_SIZE_RANGE
protected static final java.lang.String FIELD_OWNER_USER_IDS
protected static final java.lang.String FIELD_ANCESTOR_FOLDER_IDS
protected static final java.lang.String FIELD_CONTENT_TYPES
protected static final java.lang.String FIELD_TYPE
protected static final java.lang.String FIELD_LIMIT
protected static final java.lang.String FIELD_OFFSET
public Search(java.lang.String query,
java.lang.String requestUrl,
BoxSession session)
query - query to search for.requestUrl - URL of the search endpoint.session - the authenticated session that will be used to make the request withpublic BoxRequestsSearch.Search limitValueForKey(java.lang.String key, java.lang.String value)
public BoxRequestsSearch.Search limitSearchScope(BoxRequestsSearch.Search.Scope scope)
public BoxRequestsSearch.Search limitFileExtensions(java.lang.String[] extensions)
public BoxRequestsSearch.Search limitCreationTime(java.util.Date fromDate, java.util.Date toDate)
fromDate - can use null if you don't want to restrict this.toDate - can use null if you don't want to restrict this.public BoxRequestsSearch.Search limitLastUpdateTime(java.util.Date fromDate, java.util.Date toDate)
fromDate - can use null if you don't want to restrict this.toDate - can use null if you don't want to restrict this.public BoxRequestsSearch.Search limitSizeRange(long minSize, long maxSize)
public BoxRequestsSearch.Search limitOwnerUserIds(java.lang.String[] userIds)
public BoxRequestsSearch.Search limitAncestorFolderIds(java.lang.String[] folderIds)
public BoxRequestsSearch.Search limitContentTypes(java.lang.String[] contentTypes)
public BoxRequestsSearch.Search limitType(java.lang.String type)
public BoxRequestsSearch.Search setLimit(int limit)
limit - limit of items to returnpublic BoxRequestsSearch.Search setOffset(int offset)
offset - offset of items to returnpublic java.util.Date getLastUpdatedAtDateRangeFrom()
public java.util.Date getLastUpdatedAtDateRangeTo()
public java.util.Date getCreatedAtDateRangeFrom()
public java.util.Date getCreatedAtDateRangeTo()
public java.lang.Long getSizeRangeFrom()
public java.lang.Long getSizeRangeTo()
public java.lang.String[] getOwnerUserIds()
public java.lang.String[] getAncestorFolderIds()
public java.lang.String[] getContentTypes()
public java.lang.String getType()
public java.lang.Integer getLimit()
public java.lang.Integer getOffset()
public java.lang.String getQuery()
public java.lang.String getScope()
public java.lang.String[] getFileExtensions()