Package com.smartsheet.api
Interface SearchResources
-
public interface SearchResources
This interface provides methods to access search resources.Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchResult
search(java.lang.String query)
Performs a search across all Sheets to which user has access.SearchResult
search(java.lang.String query, java.util.EnumSet<SearchInclusion> includes, SearchLocation location, java.util.Date modifiedSince, java.util.EnumSet<SearchScope> scopes)
Performs a search across all Sheets to which user has access.SearchResult
searchSheet(long sheetId, java.lang.String query)
Performs a search within a sheet.
-
-
-
Method Detail
-
search
SearchResult search(java.lang.String query) throws SmartsheetException
Performs a search across all Sheets to which user has access.
It mirrors to the following Smartsheet REST API method: GET /search
- Parameters:
query
- the query text- Returns:
- the search result (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
search
SearchResult search(java.lang.String query, java.util.EnumSet<SearchInclusion> includes, SearchLocation location, java.util.Date modifiedSince, java.util.EnumSet<SearchScope> scopes) throws SmartsheetException
Performs a search across all Sheets to which user has access.
It mirrors to the following Smartsheet REST API method: GET /search
- Parameters:
query
- the query textincludes
- enum set of inclusionslocation
- when specified with a value of "personalWorkspace" limits response to only those items in the user's WorkspacemodifiedSince
- only return items modified since this datescopes
- enum set of search filters- Returns:
- the search result (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
searchSheet
SearchResult searchSheet(long sheetId, java.lang.String query) throws SmartsheetException
Performs a search within a sheet.
It mirrors to the following Smartsheet REST API method: GET /search/sheet/{sheetId}
- Parameters:
sheetId
- the sheet idquery
- the query text- Returns:
- the search result (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
-