Interface SavedSearchHandler
-
@ConsumerType public interface SavedSearchHandler
A service providerSavedSearchHandler
interface i.e. search module Assets, Sites would need to implement this interface. OmniSearch allows different modules to register themselves for Saved Search functionality , by implementing this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Resource
createOrUpdateSavedSearch(ResourceResolver resolver, java.util.Map<java.lang.String,java.lang.String> predicateMap)
This function creates a new saved search or updates a existing saved search based on the parameters provided in predicateMap parameter.boolean
deleteSavedSearch(ResourceResolver resolver, java.lang.String path)
This function delete the saved search node existing on the provided pathjava.lang.String
getID()
This function returns ID ofSavedSearchHandler
aka Search Module This ID helps identify the search module uniquely i.e.java.util.Iterator<Resource>
getSavedSearches(ResourceResolver resolver, long limit, long offset)
This function returns list of all saved search for the module i.e.java.util.Map<java.lang.String,java.lang.String>
getSavedSearchParameters(ResourceResolver resolver, java.lang.String path)
This function provide the detail of saved query from the saved search node of the provided path
-
-
-
Method Detail
-
getID
java.lang.String getID()
This function returns ID ofSavedSearchHandler
aka Search Module This ID helps identify the search module uniquely i.e. assets, sites, projects etc.- Returns:
- ID of
SavedSearchHandler
-
getSavedSearches
java.util.Iterator<Resource> getSavedSearches(ResourceResolver resolver, long limit, long offset) throws OmniSearchException
This function returns list of all saved search for the module i.e. sites, Asset with specified limit and offset.- Parameters:
resolver
-ResourceResolver
instancelimit
- number of result on a pageoffset
- offset/start of result- Returns:
Iterator
ofResource
of nodes of saved search for the module.- Throws:
OmniSearchException
- instance ofOmniSearchException
which provide error from the module
-
getSavedSearchParameters
java.util.Map<java.lang.String,java.lang.String> getSavedSearchParameters(ResourceResolver resolver, java.lang.String path) throws OmniSearchException
This function provide the detail of saved query from the saved search node of the provided path- Parameters:
resolver
-ResourceResolver
instancepath
- path of the node of saved search, from which parameters of saved searchQuery
required- Returns:
Map
containing parameters of theQuery
- Throws:
OmniSearchException
- instance ofOmniSearchException
which provide error from the module
-
createOrUpdateSavedSearch
Resource createOrUpdateSavedSearch(ResourceResolver resolver, java.util.Map<java.lang.String,java.lang.String> predicateMap) throws OmniSearchException
This function creates a new saved search or updates a existing saved search based on the parameters provided in predicateMap parameter.- Parameters:
resolver
-ResourceResolver
instancepredicateMap
-Map
of type <String, String> containing all the parameters that needed to be saved in query parameters of saved search node.- Returns:
Resource
that is created or updated for saved search- Throws:
OmniSearchException
- instance ofOmniSearchException
which provide error from the module
-
deleteSavedSearch
boolean deleteSavedSearch(ResourceResolver resolver, java.lang.String path) throws OmniSearchException
This function delete the saved search node existing on the provided path- Parameters:
resolver
-ResourceResolver
instancepath
- path of saved search node that needed to be deleted.- Returns:
- true if node deleted successfully , false otherwise
- Throws:
OmniSearchException
- instance ofOmniSearchException
which provide error from the module
-
-