Constructor
new SaveSearchService(input)
To create an instance, use factory method App.searchV2.createSaveSearchService
Parameters:
Name | Type | Description |
---|---|---|
input |
object | input |
Methods
deleteSearch(id) → {Object}
Calls delete search ajax service to delete a saved search.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id of search to be deleted. |
Returns:
Promise object of ajax service call
- Type
- Object
destroy()
Clears up saved search service
getApi() → {Object}
Returns API methods for this class
Returns:
- object of api functions
- Type
- Object
getSavedSearches() → {Array}
Returns list of saved searches
Returns:
- Array of saved searches.
- Type
- Array
getSearch(searchId) → {Object}
Returns saved search with given search id from saved searches list
Parameters:
Name | Type | Description |
---|---|---|
searchId |
string | id of search object. |
Returns:
- Saved search object
- Type
- Object
hasSearch(searchId) → {boolean}
Whether search with given id is present in saved searches list
Parameters:
Name | Type | Description |
---|---|---|
searchId |
string | id of search object. |
Returns:
- Whether search is present
- Type
- boolean
removeSearch(searchId)
Removes search from saved searches list
Parameters:
Name | Type | Description |
---|---|---|
searchId |
string | id of search to be deleted. |
saveAsDataset(queryData)
Calls ajax service to save search as dataset
Parameters:
Name | Type | Description |
---|---|---|
queryData |
Object | search to be saved. |
saveSearch(search)
Calls ajax service to save search and adds it to saved searches list
Parameters:
Name | Type | Description |
---|---|---|
search |
Object | search to be saved. |