Package com.dropbox.core.v2.files
Class SearchOptions.Builder
- java.lang.Object
- 
- com.dropbox.core.v2.files.SearchOptions.Builder
 
- 
- Enclosing class:
- SearchOptions
 
 public static class SearchOptions.Builder extends java.lang.ObjectBuilder 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 Modifier Constructor Description protectedBuilder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchOptionsbuild()Builds an instance ofSearchOptionsconfigured with this builder's valuesSearchOptions.BuilderwithAccountId(java.lang.String accountId)Set value for optional field.SearchOptions.BuilderwithFileCategories(java.util.List<FileCategory> fileCategories)Set value for optional field.SearchOptions.BuilderwithFileExtensions(java.util.List<java.lang.String> fileExtensions)Set value for optional field.SearchOptions.BuilderwithFilenameOnly(java.lang.Boolean filenameOnly)Set value for optional field.SearchOptions.BuilderwithFileStatus(FileStatus fileStatus)Set value for optional field.SearchOptions.BuilderwithMaxResults(java.lang.Long maxResults)Set value for optional field.SearchOptions.BuilderwithOrderBy(SearchOrderBy orderBy)Set value for optional field.SearchOptions.BuilderwithPath(java.lang.String path)Set value for optional field.
 
- 
- 
- 
Field Detail- 
pathprotected java.lang.String path 
 - 
maxResultsprotected long maxResults 
 - 
orderByprotected SearchOrderBy orderBy 
 - 
fileStatusprotected FileStatus fileStatus 
 - 
filenameOnlyprotected boolean filenameOnly 
 - 
fileExtensionsprotected java.util.List<java.lang.String> fileExtensions 
 - 
fileCategoriesprotected java.util.List<FileCategory> fileCategories 
 - 
accountIdprotected java.lang.String accountId 
 
- 
 - 
Method Detail- 
withPathpublic SearchOptions.Builder withPath(java.lang.String path) Set value for optional field.- 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]+(/.*)?)".
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withMaxResultspublic SearchOptions.Builder withMaxResults(java.lang.Long maxResults) Set value for optional field.If left unset or set to null, defaults to100L.- Parameters:
- 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. Defaults to- 100Lwhen set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withOrderBypublic SearchOptions.Builder withOrderBy(SearchOrderBy orderBy) Set value for optional field.- Parameters:
- orderBy- Specified property of the order of search results. By default, results are sorted by relevance.
- Returns:
- this builder
 
 - 
withFileStatuspublic SearchOptions.Builder withFileStatus(FileStatus fileStatus) Set value for optional field.If left unset or set to null, defaults toFileStatus.ACTIVE.- Parameters:
- fileStatus- Restricts search to the given file status. Must not be- null. Defaults to- FileStatus.ACTIVEwhen set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withFilenameOnlypublic SearchOptions.Builder withFilenameOnly(java.lang.Boolean filenameOnly) Set value for optional field.If left unset or set to null, defaults tofalse.- Parameters:
- filenameOnly- Restricts search to only match on filenames. Defaults to- falsewhen set to- null.
- Returns:
- this builder
 
 - 
withFileExtensionspublic SearchOptions.Builder withFileExtensions(java.util.List<java.lang.String> fileExtensions) Set value for optional field.- Parameters:
- fileExtensions- Restricts search to only the extensions specified. Only supported for active file search. Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withFileCategoriespublic SearchOptions.Builder withFileCategories(java.util.List<FileCategory> fileCategories) Set value for optional field.- Parameters:
- fileCategories- Restricts search to only the file categories specified. Only supported for active file search. Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withAccountIdpublic SearchOptions.Builder withAccountId(java.lang.String accountId) Set value for optional field.- Parameters:
- accountId- Restricts results to the given account id. Must have length of at least 40 and have length of at most 40.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
buildpublic SearchOptions build() Builds an instance ofSearchOptionsconfigured with this builder's values- Returns:
- new instance of SearchOptions
 
 
- 
 
-