Package com.dropbox.core.v2.files
Class SearchOptions
- java.lang.Object
- 
- com.dropbox.core.v2.files.SearchOptions
 
- 
 public class SearchOptions extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSearchOptions.BuilderBuilder forSearchOptions.
 - 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringaccountIdprotected java.util.List<FileCategory>fileCategoriesprotected java.util.List<java.lang.String>fileExtensionsprotected booleanfilenameOnlyprotected FileStatusfileStatusprotected longmaxResultsprotected SearchOrderByorderByprotected java.lang.Stringpath
 - 
Constructor SummaryConstructors Constructor Description SearchOptions()NoneSearchOptions(java.lang.String path, long maxResults, SearchOrderBy orderBy, FileStatus fileStatus, boolean filenameOnly, java.util.List<java.lang.String> fileExtensions, java.util.List<FileCategory> fileCategories, java.lang.String accountId)UsenewBuilder()to create instances of this class without specifying values for all optional fields.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAccountId()Restricts results to the given account id.java.util.List<FileCategory>getFileCategories()Restricts search to only the file categories specified.java.util.List<java.lang.String>getFileExtensions()Restricts search to only the extensions specified.booleangetFilenameOnly()Restricts search to only match on filenames.FileStatusgetFileStatus()Restricts search to the given file status.longgetMaxResults()The maximum number of search results to return.SearchOrderBygetOrderBy()Specified property of the order of search results.java.lang.StringgetPath()Scopes the search to a path in the user's Dropbox.inthashCode()static SearchOptions.BuildernewBuilder()Returns a new builder for creating an instance of this class.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Field Detail- 
pathprotected final java.lang.String path 
 - 
maxResultsprotected final long maxResults 
 - 
orderByprotected final SearchOrderBy orderBy 
 - 
fileStatusprotected final FileStatus fileStatus 
 - 
filenameOnlyprotected final boolean filenameOnly 
 - 
fileExtensionsprotected final java.util.List<java.lang.String> fileExtensions 
 - 
fileCategoriesprotected final java.util.List<FileCategory> fileCategories 
 - 
accountIdprotected final java.lang.String accountId 
 
- 
 - 
Constructor Detail- 
SearchOptionspublic SearchOptions(java.lang.String path, long maxResults, SearchOrderBy orderBy, FileStatus fileStatus, boolean filenameOnly, java.util.List<java.lang.String> fileExtensions, java.util.List<FileCategory> fileCategories, java.lang.String accountId)UsenewBuilder()to create instances of this class without specifying values for all optional fields.- Parameters:
- path- Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified. Must match pattern "- (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)".
- maxResults- The maximum number of search results to return. Must be greater than or equal to 1 and be less than or equal to 1000.
- orderBy- Specified property of the order of search results. By default, results are sorted by relevance.
- fileStatus- Restricts search to the given file status. Must not be- null.
- filenameOnly- Restricts search to only match on filenames.
- fileExtensions- Restricts search to only the extensions specified. Only supported for active file search. Must not contain a- nullitem.
- fileCategories- Restricts search to only the file categories specified. Only supported for active file search. Must not contain a- nullitem.
- accountId- Restricts results to the given account id. Must have length of at least 40 and have length of at most 40.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
SearchOptionspublic SearchOptions() NoneThe default values for unset fields will be used. 
 
- 
 - 
Method Detail- 
getPathpublic java.lang.String getPath() Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified.- Returns:
- value for this field, or nullif not present.
 
 - 
getMaxResultspublic long getMaxResults() The maximum number of search results to return.- Returns:
- value for this field, or nullif not present. Defaults to 100L.
 
 - 
getOrderBypublic SearchOrderBy getOrderBy() Specified property of the order of search results. By default, results are sorted by relevance.- Returns:
- value for this field, or nullif not present.
 
 - 
getFileStatuspublic FileStatus getFileStatus() Restricts search to the given file status.- Returns:
- value for this field, or nullif not present. Defaults to FileStatus.ACTIVE.
 
 - 
getFilenameOnlypublic boolean getFilenameOnly() Restricts search to only match on filenames.- Returns:
- value for this field, or nullif not present. Defaults to false.
 
 - 
getFileExtensionspublic java.util.List<java.lang.String> getFileExtensions() Restricts search to only the extensions specified. Only supported for active file search.- Returns:
- value for this field, or nullif not present.
 
 - 
getFileCategoriespublic java.util.List<FileCategory> getFileCategories() Restricts search to only the file categories specified. Only supported for active file search.- Returns:
- value for this field, or nullif not present.
 
 - 
getAccountIdpublic java.lang.String getAccountId() Restricts results to the given account id.- Returns:
- value for this field, or nullif not present.
 
 - 
newBuilderpublic static SearchOptions.Builder newBuilder() Returns a new builder for creating an instance of this class.- Returns:
- builder for this class.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String toStringMultiline() Returns a String representation of this object formatted for easier readability.The returned String may contain newlines. - Returns:
- Formatted, multiline String representation of this object
 
 
- 
 
-