public class BoxSearchParameters extends Object
Advanced Search support here allows a number of parameters be specified to take full advantage of box search capabilities. Query parameter is required in all cases except when Metadata templates searching is being used.
| Constructor and Description |
|---|
BoxSearchParameters()
Creates a Box Search Parameters Objects without query set, specific for Metadata Only Searches.
|
BoxSearchParameters(String query)
Creates a Box Search Parameters Objects with a query initiated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearParameters()
Clears the Parameters before performing a new search.
|
List<String> |
getAncestorFolderIds()
Return the list of folder ids that is currently being used as applied filter.
|
List<String> |
getContentTypes()
Return content types that or being applied as a filter (name,description,tags,file_content).
|
DateRange |
getCreatedRange()
Get the DateRange filter to specify the when a file was created.
|
DateRange |
getDeletedRange()
Limits the search results to items that were deleted within the given date range.
|
List<String> |
getDeleterUserIds()
Limits the search results to items that were deleted by the given list of users, defined as a list of comma separated user IDs.
|
String |
getDirection()
Retrieves the sort direction for Box Search results.
|
List<String> |
getFields()
Get the existing fields that are used for the search criteria.
|
List<String> |
getFileExtensions()
Get file extension filter (jpg,docx).
|
BoxMetadataFilter |
getMetadataFilter()
Retrieve the existing BoxMetaDataFilter.
|
List<String> |
getOwnerUserIds()
Return the list of owner id's that are being applied as a search filter on the results.
|
String |
getQuery()
Get existing query String that is being used.
|
QueryStringBuilder |
getQueryParameters()
Get the Query Paramaters to be used for search request.
|
String |
getScope()
Get the scope on which you want to search, ["enterprise","scope"].
|
SizeRange |
getSizeRange()
Return the size range that is being used as a filter.
|
String |
getSort()
Retrieve the sort field for Box Search.
|
String |
getTrashContent()
Return the specified trash search preference.
|
String |
getType()
Return the type you want to return in your search.
|
DateRange |
getUpdatedRange()
Get the DateRange filter to specify the when a file was updated.
|
void |
setAncestorFolderIds(List<String> ancestorFolderIds)
Set the list of folder id's to be applied as a filter on the search filters.
|
void |
setContentTypes(List<String> contentTypes)
Set list of content types that will be used as a filters.
|
void |
setCreatedRange(DateRange createdRange)
Set the from DateRange filter to specify when a file was created.
|
void |
setDeletedRange(DateRange deletedRange)
Limits the search results to items that were deleted within the given date range.
|
void |
setDeleterUserIds(List<String> deleterUserIds)
Limits the search results to items that were deleted by the given list of users, defined as a list of comma separated user IDs.
|
void |
setDirection(String direction)
Set the direction of the sort for the Box Search results.
|
void |
setFields(List<String> fields)
Set the existing fields that are used for the search criteria.
|
void |
setFileExtensions(List<String> fileExtensions)
Set file extension by providing a list of strings [jpg,docx].
|
void |
setMetadataFilter(BoxMetadataFilter metadataFilter)
Set the current list of Metadata Filters.
|
void |
setOwnerUserIds(List<String> ownerUserIds)
Set the owner id's to be applied as a filter to restrict the results on specific file owners.
|
void |
setQuery(String query)
Set query string for that will be used to search.
|
void |
setScope(String scope)
Set the scope for how you want to search, ["enterprise","scope"].
|
void |
setSizeRange(SizeRange sizeRange)
Set the file size range for lower and upper bounds Bytes.
|
void |
setSort(String sortBy)
Set the sort field for Box Search.
|
void |
setTrashContent(String trashContent)
Set trash filter.
|
void |
setType(String type)
Set the type you want to search for can be file, folder, or web_link.
|
void |
setUpdatedRange(DateRange updatedRange)
Set the from DateRange filter to specify when a file was updated.
|
public BoxSearchParameters()
public BoxSearchParameters(String query)
query - parameter.public boolean clearParameters()
public String getQuery()
public void setQuery(String query)
query - is a String value.public List<String> getFields()
public void setFields(List<String> fields)
fields - specify what fields to be returned.public String getScope()
public void setScope(String scope)
scope - set scope you want to search.public List<String> getFileExtensions()
public void setFileExtensions(List<String> fileExtensions)
fileExtensions - applied as a filter for extensions.public DateRange getCreatedRange()
public void setCreatedRange(DateRange createdRange)
createdRange - a start and end date on which a file was created.public DateRange getUpdatedRange()
public void setUpdatedRange(DateRange updatedRange)
updatedRange - a start and end date on which a file was updated.public SizeRange getSizeRange()
public void setSizeRange(SizeRange sizeRange)
sizeRange - a size filter.public List<String> getOwnerUserIds()
public void setOwnerUserIds(List<String> ownerUserIds)
ownerUserIds - applied ownerId's.public List<String> getAncestorFolderIds()
public void setAncestorFolderIds(List<String> ancestorFolderIds)
ancestorFolderIds - a list of folder ids that will contain results to specific folders.public List<String> getContentTypes()
public void setContentTypes(List<String> contentTypes)
contentTypes - a list of content types such as (name,description,tags,file_content).public String getType()
public void setType(String type)
type - can be file, folder, or web_link.public String getTrashContent()
public void setTrashContent(String trashContent)
trashContent - Can be trashed_only or non_trashed_only.public BoxMetadataFilter getMetadataFilter()
public void setMetadataFilter(BoxMetadataFilter metadataFilter)
metadataFilter - a list of the current metadata filters.public String getSort()
public void setSort(String sortBy)
sortBy - the field to sort the Box Search results by.public String getDirection()
public void setDirection(String direction)
direction - can be DESC or ASC.public List<String> getDeleterUserIds()
public void setDeleterUserIds(List<String> deleterUserIds)
deleterUserIds - a list of user ids.public DateRange getDeletedRange()
public void setDeletedRange(DateRange deletedRange)
deletedRange - a date range.public QueryStringBuilder getQueryParameters()