public class SearchOptions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchOptions.Builder
Builder for
SearchOptions . |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<FileCategory> |
fileCategories |
protected java.util.List<java.lang.String> |
fileExtensions |
protected boolean |
filenameOnly |
protected FileStatus |
fileStatus |
protected long |
maxResults |
protected java.lang.String |
path |
Constructor and Description |
---|
SearchOptions()
None
|
SearchOptions(java.lang.String path,
long maxResults,
FileStatus fileStatus,
boolean filenameOnly,
java.util.List<java.lang.String> fileExtensions,
java.util.List<FileCategory> fileCategories)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
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.
|
boolean |
getFilenameOnly()
Restricts search to only match on filenames.
|
FileStatus |
getFileStatus()
Restricts search to the given file status.
|
long |
getMaxResults()
The maximum number of search results to return.
|
java.lang.String |
getPath()
Scopes the search to a path in the user's Dropbox.
|
int |
hashCode() |
static SearchOptions.Builder |
newBuilder()
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final java.lang.String path
protected final long maxResults
protected final FileStatus fileStatus
protected final boolean filenameOnly
protected final java.util.List<java.lang.String> fileExtensions
protected final java.util.List<FileCategory> fileCategories
public SearchOptions(java.lang.String path, long maxResults, FileStatus fileStatus, boolean filenameOnly, java.util.List<java.lang.String> fileExtensions, java.util.List<FileCategory> fileCategories)
newBuilder
to create instances of this class without
specifying values for all optional fields.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.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 null
item.fileCategories
- Restricts search to only the file categories
specified. Only supported for active file search. Must not contain a
null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SearchOptions()
The default values for unset fields will be used.
public java.lang.String getPath()
null
if not present.public long getMaxResults()
null
if not present. Defaults to
100L.public FileStatus getFileStatus()
null
if not present. Defaults to
FileStatus.ACTIVE.public boolean getFilenameOnly()
null
if not present. Defaults to
false.public java.util.List<java.lang.String> getFileExtensions()
null
if not present.public java.util.List<FileCategory> getFileCategories()
null
if not present.public static SearchOptions.Builder newBuilder()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.