Class QueryExecutor
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.restapi.server.jaxrs.search.QueryExecutor
-
- Direct Known Subclasses:
SearchObject
public abstract class QueryExecutor extends AbstractResource<ResourceTypeImpl>
- Since:
- 8.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryExecutor.LangParams
static class
QueryExecutor.QueryParams
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_PAGE_INDEX
static String
CURRENT_PAGE_OFFSET
In case offset is specified, currentPageIndex is ignored.static String
CURRENT_REPO_PATTERN
static String
CURRENT_USERID_PATTERN
static String
HIGHLIGHT
static String
MAX_RESULTS
static String
NXQL
static String
ORDERED_PARAMS
static String
PAGE_SIZE
protected PageProviderService
pageProviderService
static String
QUERY
static String
QUERY_LIMIT_PARAM
static String
QUICK_FILTERS
static String
SCROLL_PARAM
protected boolean
skipAggregates
static String
SORT_BY
static String
SORT_ORDER
-
Constructor Summary
Constructors Constructor Description QueryExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>
asStringList(String value)
protected javax.ws.rs.core.Response
buildResponse(javax.ws.rs.core.Response.StatusType status, String type, Object object)
protected Long
getCurrentPageIndex(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Long
getCurrentPageOffset(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<String>
getHighlights(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Long
getMaxResults(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Map<String,String>
getNamedParameters(Map<String,String> queryParams)
protected Map<String,String>
getNamedParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected PageProviderDefinition
getPageProviderDefinition(String pageProviderName)
protected Long
getPageSize(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Object[]
getParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Map<String,Serializable>
getProperties()
protected String
getQuery(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<QuickFilter>
getQuickFilters(String providerName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<SortInfo>
getSortInfo(String sortBy, String sortOrder)
protected List<SortInfo>
getSortInfo(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected String
handleNamedParamVars(String value)
void
initExecutor()
protected DocumentModelList
queryByLang(String query, Long pageSize, Long currentPageIndex, Long currentPageOffset, Long maxResults, List<SortInfo> sortInfo, Map<String,Serializable> props, DocumentModel searchDocumentModel, Object... parameters)
protected DocumentModelList
queryByLang(String queryLanguage, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected DocumentModelList
queryByLang(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected DocumentModelList
queryByPageProvider(String pageProviderName, Long pageSize, Long currentPageIndex, Long currentPageOffset, List<SortInfo> sortInfo, List<String> highlights, List<QuickFilter> quickFilters, Map<String,Serializable> props, DocumentModel searchDocumentModel, Object... parameters)
protected DocumentModelList
queryByPageProvider(String pageProviderName, Long pageSize, Long currentPageIndex, Long currentPageOffset, List<SortInfo> sortInfo, List<QuickFilter> quickFilters, Object[] parameters, Map<String,Serializable> props, DocumentModel searchDocumentModel)
protected DocumentModelList
queryByPageProvider(String pageProviderName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Object[]
replaceParameterPattern(Object[] parameters)
-
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, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
NXQL
public static final String NXQL
- See Also:
- Constant Field Values
-
QUERY
public static final String QUERY
- See Also:
- Constant Field Values
-
PAGE_SIZE
public static final String PAGE_SIZE
- See Also:
- Constant Field Values
-
CURRENT_PAGE_INDEX
public static final String CURRENT_PAGE_INDEX
- See Also:
- Constant Field Values
-
CURRENT_PAGE_OFFSET
public static final String CURRENT_PAGE_OFFSET
In case offset is specified, currentPageIndex is ignored.- Since:
- 9.3
- See Also:
- Constant Field Values
-
MAX_RESULTS
public static final String MAX_RESULTS
- See Also:
- Constant Field Values
-
SORT_BY
public static final String SORT_BY
- See Also:
- Constant Field Values
-
SORT_ORDER
public static final String SORT_ORDER
- See Also:
- Constant Field Values
-
ORDERED_PARAMS
public static final String ORDERED_PARAMS
- See Also:
- Constant Field Values
-
QUICK_FILTERS
public static final String QUICK_FILTERS
- Since:
- 8.4
- See Also:
- Constant Field Values
-
HIGHLIGHT
public static final String HIGHLIGHT
- Since:
- 9.1
- See Also:
- Constant Field Values
-
CURRENT_USERID_PATTERN
public static final String CURRENT_USERID_PATTERN
- See Also:
- Constant Field Values
-
CURRENT_REPO_PATTERN
public static final String CURRENT_REPO_PATTERN
- See Also:
- Constant Field Values
-
SCROLL_PARAM
public static final String SCROLL_PARAM
- See Also:
- Constant Field Values
-
QUERY_LIMIT_PARAM
public static final String QUERY_LIMIT_PARAM
- See Also:
- Constant Field Values
-
pageProviderService
protected PageProviderService pageProviderService
-
skipAggregates
protected boolean skipAggregates
-
-
Method Detail
-
initExecutor
public void initExecutor()
-
getCurrentPageIndex
protected Long getCurrentPageIndex(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getCurrentPageOffset
protected Long getCurrentPageOffset(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getPageSize
protected Long getPageSize(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getMaxResults
protected Long getMaxResults(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getSortInfo
protected List<SortInfo> getSortInfo(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getQuickFilters
protected List<QuickFilter> getQuickFilters(String providerName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
- Since:
- 8.4
-
getHighlights
protected List<String> getHighlights(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getNamedParameters
protected Map<String,String> getNamedParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getNamedParameters
protected Map<String,String> getNamedParameters(Map<String,String> queryParams)
-
getParameters
protected Object[] getParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
getProperties
protected Map<String,Serializable> getProperties()
-
queryByLang
protected DocumentModelList queryByLang(String queryLanguage, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
queryByLang
protected DocumentModelList queryByLang(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
queryByPageProvider
protected DocumentModelList queryByPageProvider(String pageProviderName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
-
queryByLang
protected DocumentModelList queryByLang(String query, Long pageSize, Long currentPageIndex, Long currentPageOffset, Long maxResults, List<SortInfo> sortInfo, Map<String,Serializable> props, DocumentModel searchDocumentModel, Object... parameters)
-
queryByPageProvider
protected DocumentModelList queryByPageProvider(String pageProviderName, Long pageSize, Long currentPageIndex, Long currentPageOffset, List<SortInfo> sortInfo, List<QuickFilter> quickFilters, Object[] parameters, Map<String,Serializable> props, DocumentModel searchDocumentModel)
- Since:
- 8.4
-
queryByPageProvider
protected DocumentModelList queryByPageProvider(String pageProviderName, Long pageSize, Long currentPageIndex, Long currentPageOffset, List<SortInfo> sortInfo, List<String> highlights, List<QuickFilter> quickFilters, Map<String,Serializable> props, DocumentModel searchDocumentModel, Object... parameters)
-
getPageProviderDefinition
protected PageProviderDefinition getPageProviderDefinition(String pageProviderName)
-
buildResponse
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, String type, Object object) throws IOException
- Throws:
IOException
-
-