Interface SavedSearchHandler
-
- All Known Implementing Classes:
FormsAbstractSavedSearchHandler
@ConsumerType public interface SavedSearchHandlerA service providerSavedSearchHandlerinterface 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 ResourcecreateOrUpdateSavedSearch(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.booleandeleteSavedSearch(ResourceResolver resolver, java.lang.String path)This function delete the saved search node existing on the provided pathjava.lang.StringgetID()This function returns ID ofSavedSearchHandleraka 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 ofSavedSearchHandleraka 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-ResourceResolverinstancelimit- number of result on a pageoffset- offset/start of result- Returns:
IteratorofResourceof nodes of saved search for the module.- Throws:
OmniSearchException- instance ofOmniSearchExceptionwhich 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-ResourceResolverinstancepath- path of the node of saved search, from which parameters of saved searchQueryrequired- Returns:
Mapcontaining parameters of theQuery- Throws:
OmniSearchException- instance ofOmniSearchExceptionwhich 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-ResourceResolverinstancepredicateMap-Mapof type <String, String> containing all the parameters that needed to be saved in query parameters of saved search node.- Returns:
Resourcethat is created or updated for saved search- Throws:
OmniSearchException- instance ofOmniSearchExceptionwhich 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-ResourceResolverinstancepath- path of saved search node that needed to be deleted.- Returns:
- true if node deleted successfully , false otherwise
- Throws:
OmniSearchException- instance ofOmniSearchExceptionwhich provide error from the module
-
-