Class SearchObject
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.restapi.server.jaxrs.search.QueryExecutor
-
- org.nuxeo.ecm.restapi.server.jaxrs.search.SearchObject
-
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.restapi.server.jaxrs.search.QueryExecutor
QueryExecutor.LangParams, QueryExecutor.QueryParams
-
-
Field Summary
Fields Modifier and Type Field Description static String
PAGE_PROVIDER_NAME_PARAM
static String
SAVED_SEARCHES_PAGE_PROVIDER
static String
SAVED_SEARCHES_PAGE_PROVIDER_PARAMS
protected SavedSearchService
savedSearchService
-
Fields inherited from class org.nuxeo.ecm.restapi.server.jaxrs.search.QueryExecutor
CURRENT_PAGE_INDEX, CURRENT_PAGE_OFFSET, CURRENT_REPO_PATTERN, CURRENT_USERID_PATTERN, HIGHLIGHT, MAX_RESULTS, NXQL, ORDERED_PARAMS, PAGE_SIZE, pageProviderService, QUERY, QUERY_LIMIT_PARAM, QUICK_FILTERS, SCROLL_PARAM, skipAggregates, SORT_BY, SORT_ORDER
-
-
Constructor Summary
Constructors Constructor Description SearchObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
doBulkActionByLang(javax.ws.rs.core.UriInfo uriInfo)
Object
doBulkActionByLang(javax.ws.rs.core.UriInfo uriInfo, String queryLanguage)
Deprecated.since 10.3, usedoBulkActionByLang(UriInfo)
instead.Object
doBulkActionByPageProvider(String pageProviderName, javax.ws.rs.core.UriInfo uriInfo)
Object
doBulkActionBySavedSearch(String id, javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
doDeleteSavedSearch(String id)
Object
doExecuteSavedSearch(String id, javax.ws.rs.core.UriInfo uriInfo)
Object
doGetPageProviderDefinition(String pageProviderName)
javax.ws.rs.core.Response
doGetSavedSearch(String id)
List<SavedSearch>
doGetSavedSearches(javax.ws.rs.core.UriInfo uriInfo)
Object
doQueryByLang(javax.ws.rs.core.UriInfo uriInfo)
Object
doQueryByLang(javax.ws.rs.core.UriInfo uriInfo, String queryLanguage)
Deprecated.since 10.3, usedoQueryByLang(UriInfo)
instead.Object
doQueryByPageProvider(javax.ws.rs.core.UriInfo uriInfo, String pageProviderName)
javax.ws.rs.core.Response
doSaveSearch(SavedSearchRequest request)
javax.ws.rs.core.Response
doUpdateSavedSearch(SavedSearchRequest request, String id)
protected DocumentModelList
executeSavedSearch(SavedSearch search, javax.ws.rs.core.MultivaluedMap<String,String> params)
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.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.protected String
getQueryString(PageProvider<?> pageProvider)
Retrieves the query string from the given page provider.void
initialize(Object... args)
protected DocumentModelList
querySavedSearchByLang(String queryLanguage, String query, Long pageSize, Long currentPageIndex, Long currentPageOffset, Long maxResults, String orderedParams, Map<String,String> namedParameters, List<SortInfo> sortInfo)
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)
protected void
setSaveSearchParams(Map<String,String> params, SavedSearch search)
-
Methods inherited from class org.nuxeo.ecm.restapi.server.jaxrs.search.QueryExecutor
asStringList, buildResponse, getCurrentPageIndex, getCurrentPageOffset, getHighlights, getMaxResults, getNamedParameters, getNamedParameters, getPageProviderDefinition, getPageSize, getParameters, getProperties, getQuery, getQuickFilters, getSortInfo, getSortInfo, handleNamedParamVars, initExecutor, queryByLang, queryByLang, queryByLang, queryByPageProvider, queryByPageProvider, queryByPageProvider, replaceParameterPattern
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
SAVED_SEARCHES_PAGE_PROVIDER
public static final String SAVED_SEARCHES_PAGE_PROVIDER
- See Also:
- Constant Field Values
-
SAVED_SEARCHES_PAGE_PROVIDER_PARAMS
public static final String SAVED_SEARCHES_PAGE_PROVIDER_PARAMS
- See Also:
- Constant Field Values
-
PAGE_PROVIDER_NAME_PARAM
public static final String PAGE_PROVIDER_NAME_PARAM
- See Also:
- Constant Field Values
-
savedSearchService
protected SavedSearchService savedSearchService
-
-
Method Detail
-
initialize
public void initialize(Object... args)
- Overrides:
initialize
in classAbstractResource<ResourceTypeImpl>
-
doQueryByLang
@Deprecated public Object doQueryByLang(@Context javax.ws.rs.core.UriInfo uriInfo, String queryLanguage)
Deprecated.since 10.3, usedoQueryByLang(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, usedoBulkActionByLang(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
-
-