public class SearchUIModelHelper extends AbstractLogEnabled implements Component, Serviceable, Contextualizable
SearchUIModel
.Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private ContentTypeExtensionPoint |
_cTypeEP |
private SearchUIModelExtensionPoint |
_searchModelManager |
private ServiceManager |
_serviceManager |
static String |
ROLE
The component role.
|
Constructor and Description |
---|
SearchUIModelHelper() |
Modifier and Type | Method and Description |
---|---|
private Map<I18nizableText,List<SearchUICriterion>> |
_getCriteriaByGroup(Map<String,? extends SearchUICriterion> criteria) |
private SearchUIModel |
_getModel(String modelId,
List<String> restrictedContentTypes) |
private void |
_putCriterionParameter(Map<String,Object> jsonObject,
SearchUICriterion criterion) |
private void |
_putEnumerator(Map<String,Object> jsonObject,
Enumerator enumerator) |
private void |
_putValidator(Map<String,Object> jsonObject,
Validator validator) |
void |
contextualize(Context context) |
Map<String,Object> |
getAdvancedCriteriaListInfo(Map<String,? extends SearchUICriterion> criteria)
Return information on a list of advanced
SearchUICriterion , serialized as a Map. |
Set<String> |
getAllContentTypes(SearchModel model,
Map<String,Object> contextualParameters)
Get all the real content types that a model works on (the included content types, minus the excluded types).
|
List<Object> |
getColumnConfigurations(String modelId,
List<String> restrictedContentTypes,
Map<String,Object> contextualParameters)
Get the column configurations of search model as JSON object
|
Map<String,Object> |
getColumnInfo(SearchUIColumn column)
Return information on a
SearchUIColumn , serialized as a Map. |
List<Object> |
getColumnListInfo(Map<String,? extends SearchUIColumn> columns)
Return information on a list of
SearchUIColumn , serialized as a Map. |
Map<String,Object> |
getCriteriaListInfo(Map<String,? extends SearchUICriterion> criteria)
Return information on a list of
SearchUICriterion , serialized as a Map. |
Map<String,Object> |
getCriterionInfo(SearchUICriterion criterion)
Return information on a
SearchUICriterion , serialized as a Map. |
Map<String,Object> |
getSearchModelConfiguration(String modelId,
List<String> restrictedContentTypes,
Map<String,Object> contextualParameters)
Get the search model configuration as JSON object
|
Map<String,Object> |
getSearchModelInfo(SearchUIModel model,
Map<String,Object> contextualParameters)
Return information on a
SearchUIModel object serialized in a Map. |
void |
service(ServiceManager smanager) |
getLogger, setLogger
private SearchUIModelExtensionPoint _searchModelManager
private ServiceManager _serviceManager
private ContentTypeExtensionPoint _cTypeEP
public SearchUIModelHelper()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public Set<String> getAllContentTypes(SearchModel model, Map<String,Object> contextualParameters)
model
- the search model.contextualParameters
- the contextual parameters.public Map<String,Object> getSearchModelConfiguration(String modelId, List<String> restrictedContentTypes, Map<String,Object> contextualParameters) throws ProcessingException
modelId
- The id of search modelrestrictedContentTypes
- The restricted content types. Can be null.contextualParameters
- the contextual parametersProcessingException
- if an error occurredpublic List<Object> getColumnConfigurations(String modelId, List<String> restrictedContentTypes, Map<String,Object> contextualParameters) throws ProcessingException
modelId
- The id of search modelrestrictedContentTypes
- The restricted content types. Can be null.contextualParameters
- the contextual parametersProcessingException
- if an error occurredprivate SearchUIModel _getModel(String modelId, List<String> restrictedContentTypes)
public Map<String,Object> getSearchModelInfo(SearchUIModel model, Map<String,Object> contextualParameters) throws ProcessingException
SearchUIModel
object serialized in a Map.model
- The search model.contextualParameters
- The contextual parametersProcessingException
- if an error occurs.public List<Object> getColumnListInfo(Map<String,? extends SearchUIColumn> columns) throws ProcessingException
SearchUIColumn
, serialized as a Map.columns
- the list of search columns.ProcessingException
- if an error occurs.public Map<String,Object> getColumnInfo(SearchUIColumn column) throws ProcessingException
SearchUIColumn
, serialized as a Map.column
- the search column.ProcessingException
- if an error occurs.public Map<String,Object> getCriteriaListInfo(Map<String,? extends SearchUICriterion> criteria) throws ProcessingException
SearchUICriterion
, serialized as a Map.criteria
- a map of search criteria.ProcessingException
- if an error occurs.public Map<String,Object> getAdvancedCriteriaListInfo(Map<String,? extends SearchUICriterion> criteria) throws ProcessingException
SearchUICriterion
, serialized as a Map.criteria
- A map of advanced search criteria.ProcessingException
- if an error occurs.public Map<String,Object> getCriterionInfo(SearchUICriterion criterion) throws ProcessingException
SearchUICriterion
, serialized as a Map.criterion
- a search criterion.ProcessingException
- if an error occurs.private Map<I18nizableText,List<SearchUICriterion>> _getCriteriaByGroup(Map<String,? extends SearchUICriterion> criteria)
private void _putCriterionParameter(Map<String,Object> jsonObject, SearchUICriterion criterion) throws ProcessingException
ProcessingException
private void _putEnumerator(Map<String,Object> jsonObject, Enumerator enumerator) throws ProcessingException
ProcessingException
private void _putValidator(Map<String,Object> jsonObject, Validator validator)