Class SearchObject

All Implemented Interfaces:
Resource, Adaptable

public class SearchObject extends QueryExecutor
Since:
8.3 Search endpoint to perform queries via rest api, with support to save and execute saved search queries.
  • Field Details

  • Constructor Details

    • SearchObject

      public SearchObject()
  • Method Details

    • initialize

      public void initialize(Object... args)
      Overrides:
      initialize in class AbstractResource<ResourceTypeImpl>
    • doQueryByLang

      @Deprecated public Object doQueryByLang(@Context javax.ws.rs.core.UriInfo uriInfo, String queryLanguage)
      Deprecated.
      since 10.3, use doQueryByLang(UriInfo) instead.
    • doQueryByLang

      public Object doQueryByLang(@Context javax.ws.rs.core.UriInfo uriInfo)
      Since:
      10.3
    • doBulkActionByLang

      @Deprecated public Object doBulkActionByLang(@Context javax.ws.rs.core.UriInfo uriInfo, String queryLanguage)
      Deprecated.
      since 10.3, use doBulkActionByLang(UriInfo) instead.
    • doBulkActionByLang

      public Object doBulkActionByLang(@Context javax.ws.rs.core.UriInfo uriInfo)
      Since:
      10.3
    • doQueryByPageProvider

      public Object doQueryByPageProvider(@Context javax.ws.rs.core.UriInfo uriInfo, String pageProviderName)
    • doGetPageProviderDefinition

      public Object doGetPageProviderDefinition(String pageProviderName) throws IOException
      Throws:
      IOException
    • doBulkActionByPageProvider

      public Object doBulkActionByPageProvider(String pageProviderName, @Context javax.ws.rs.core.UriInfo uriInfo)
    • doGetSavedSearches

      public List<SavedSearch> doGetSavedSearches(@Context javax.ws.rs.core.UriInfo uriInfo)
    • doSaveSearch

      public javax.ws.rs.core.Response doSaveSearch(SavedSearchRequest request)
    • doGetSavedSearch

      public javax.ws.rs.core.Response doGetSavedSearch(String id)
    • doBulkActionBySavedSearch

      public Object doBulkActionBySavedSearch(String id, @Context javax.ws.rs.core.UriInfo uriInfo)
    • doUpdateSavedSearch

      public javax.ws.rs.core.Response doUpdateSavedSearch(SavedSearchRequest request, String id)
    • doDeleteSavedSearch

      public javax.ws.rs.core.Response doDeleteSavedSearch(String id)
    • doExecuteSavedSearch

      public Object doExecuteSavedSearch(String id, @Context javax.ws.rs.core.UriInfo uriInfo)
    • setSaveSearchParams

      protected void setSaveSearchParams(Map<String,String> params, SavedSearch search) throws IOException
      Throws:
      IOException
    • executeSavedSearch

      protected DocumentModelList executeSavedSearch(SavedSearch search, javax.ws.rs.core.MultivaluedMap<String,String> params)
    • querySavedSearchByLang

      protected DocumentModelList querySavedSearchByLang(String queryLanguage, String query, Long pageSize, Long currentPageIndex, Long currentPageOffset, Long maxResults, String orderedParams, Map<String,String> namedParameters, List<SortInfo> sortInfo)
    • querySavedSearchByPageProvider

      protected DocumentModelList querySavedSearchByPageProvider(String pageProviderName, Long pageSize, Long currentPageIndex, Long currentPageOffset, String orderedParams, Map<String,String> namedParameters, List<SortInfo> sortInfo, List<QuickFilter> quickFilters, DocumentModel searchDocumentModel)
    • getPageProvider

      protected PageProvider<?> getPageProvider(String providerName, javax.ws.rs.core.MultivaluedMap<String,String> parameters)
      Retrieves the page provider from the given page provider name and/or parameters.
      Since:
      2021.8
    • getQueryString

      protected String getQueryString(String providerName, javax.ws.rs.core.MultivaluedMap<String,String> parameters)
      Retrieves the query string from the given page provider name and/or parameters.
    • getQueryString

      protected String getQueryString(PageProvider<?> pageProvider)
      Retrieves the query string from the given page provider.
      Since:
      2021.8