public abstract class QueryExecutor extends AbstractResource<ResourceTypeImpl>
Modifier and Type | Class and Description |
---|---|
static class |
QueryExecutor.LangParams |
static class |
QueryExecutor.QueryParams |
Modifier and Type | Field and 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 |
QUICK_FILTERS |
static String |
SORT_BY |
static String |
SORT_ORDER |
Constructor and Description |
---|
QueryExecutor() |
Modifier and Type | Method and Description |
---|---|
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 Properties |
getNamedParameters(Map<String,String> queryParams) |
protected Properties |
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 DocumentModel |
getSearchDocumentModel(CoreSession session,
PageProviderService pps,
String providerName,
Properties namedParameters) |
protected List<SortInfo> |
getSortInfo(javax.ws.rs.core.MultivaluedMap<String,String> queryParams) |
protected List<SortInfo> |
getSortInfo(String sortBy,
String sortOrder) |
protected String |
handleNamedParamVars(String value) |
void |
initExecutor() |
protected DocumentModelList |
queryByLang(String query,
Long pageSize,
Long currentPageIndex,
Long currentPageOffset,
Long maxResults,
List<SortInfo> sortInfo,
Object[] parameters,
Map<String,Serializable> props,
DocumentModel searchDocumentModel) |
protected DocumentModelList |
queryByLang(String queryLanguage,
javax.ws.rs.core.MultivaluedMap<String,String> queryParams) |
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,
Long pageSize,
Long currentPageIndex,
Long currentPageOffset,
List<SortInfo> sortInfo,
List<String> highlights,
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) |
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
public static final String NXQL
public static final String QUERY
public static final String PAGE_SIZE
public static final String CURRENT_PAGE_INDEX
public static final String CURRENT_PAGE_OFFSET
public static final String MAX_RESULTS
public static final String SORT_BY
public static final String SORT_ORDER
public static final String ORDERED_PARAMS
public static final String QUICK_FILTERS
public static final String HIGHLIGHT
public static final String CURRENT_USERID_PATTERN
public static final String CURRENT_REPO_PATTERN
protected PageProviderService pageProviderService
public QueryExecutor()
public void initExecutor()
protected Long getCurrentPageIndex(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Long getCurrentPageOffset(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Long getPageSize(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Long getMaxResults(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<SortInfo> getSortInfo(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<SortInfo> getSortInfo(String sortBy, String sortOrder)
protected List<QuickFilter> getQuickFilters(String providerName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected List<String> getHighlights(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Properties getNamedParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Properties getNamedParameters(Map<String,String> queryParams)
protected String handleNamedParamVars(String value)
protected Object[] getParameters(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected Object[] replaceParameterPattern(Object[] parameters)
protected Map<String,Serializable> getProperties()
protected DocumentModelList queryByLang(String queryLanguage, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected DocumentModelList queryByPageProvider(String pageProviderName, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected DocumentModelList queryByLang(String query, Long pageSize, Long currentPageIndex, Long currentPageOffset, Long maxResults, List<SortInfo> sortInfo, Object[] parameters, Map<String,Serializable> props, DocumentModel searchDocumentModel)
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, Long pageSize, Long currentPageIndex, Long currentPageOffset, List<SortInfo> sortInfo, List<String> highlights, List<QuickFilter> quickFilters, Object[] parameters, Map<String,Serializable> props, DocumentModel searchDocumentModel)
protected PageProviderDefinition getPageProviderDefinition(String pageProviderName)
protected DocumentModel getSearchDocumentModel(CoreSession session, PageProviderService pps, String providerName, Properties namedParameters)
protected javax.ws.rs.core.Response buildResponse(javax.ws.rs.core.Response.StatusType status, String type, Object object) throws IOException
IOException
Copyright © 2018 Nuxeo. All rights reserved.