public class GetQueryFromJSONHelper extends AbstractLogEnabled implements Component, Serviceable, Contextualizable
| Modifier and Type | Field and Description |
|---|---|
private ContentTypeExtensionPoint |
_contentTypeExtensionPoint |
private Context |
_context |
private JSONUtils |
_jsonUtils |
private QueryBuilder |
_queryBuilder |
private SearchUIModelExtensionPoint |
_searchUIModelExtensionPoint |
private ServiceManager |
_serviceManager |
static String |
ROLE
The Avalon role name
|
| Constructor and Description |
|---|
GetQueryFromJSONHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextualize(Context context) |
List<String> |
getColumnsFromSearchModel(SearchUIModel model,
Map<String,Object> contextualParameters)
Retrieves a list of column ids
|
Query |
getQueryFromModel(SearchUIModel model,
Map<String,Object> parameters,
List<String> contentTypes)
Retrieves a Query object from the SearchUIModel and the JSON parameters
|
SearchUIModel |
getSearchUIModel(Map<String,Object> parameters)
Retrieves the search UI model
|
SearchUIModel |
getSearchUIModel(Map<String,Object> parameters,
String modelKeyName)
Retrieves the search UI model
|
List<Sort> |
getSort(Map<String,Object> parameters)
Retrieves the sort criteria from a sort string.
|
List<Sort> |
getSort(String sortString,
String groupString)
Retrieves the sort criteria from a sort string.
|
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate SearchUIModelExtensionPoint _searchUIModelExtensionPoint
private ContentTypeExtensionPoint _contentTypeExtensionPoint
private QueryBuilder _queryBuilder
private JSONUtils _jsonUtils
private ServiceManager _serviceManager
public GetQueryFromJSONHelper()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic SearchUIModel getSearchUIModel(Map<String,Object> parameters)
parameters - The JS parameterspublic SearchUIModel getSearchUIModel(Map<String,Object> parameters, String modelKeyName)
parameters - The JS parametersmodelKeyName - key name of the model parameterpublic Query getQueryFromModel(SearchUIModel model, Map<String,Object> parameters, List<String> contentTypes) throws QuerySyntaxException
model - Modelparameters - JSON parameterscontentTypes - List of content types to fillQuerySyntaxException - If an error occurs during the query parsingpublic List<String> getColumnsFromSearchModel(SearchUIModel model, Map<String,Object> contextualParameters)
model - search model containing result fieldscontextualParameters - JSON object containing the contextual parameterspublic List<Sort> getSort(Map<String,Object> parameters)
parameters - The parameters (containing sort and optionally group keys)Sort.public List<Sort> getSort(String sortString, String groupString)
sortString - The sort criteria as a JSON-encoded string.groupString - The group criteria as a JSON-encoded string (for server-side grouping feature). Can be null.Sort.