public class CriteriaSearchUIModelWrapper extends AbstractSearchUIModel
| Modifier and Type | Class and Description |
|---|---|
static class |
CriteriaSearchUIModelWrapper.Column
A column and its (optional) label
|
| Modifier and Type | Field and Description |
|---|---|
private int |
_criteriaIndex |
private SearchUIModelExtensionPoint |
_searchModelEP |
protected ThreadSafeComponentManager<SearchUIColumn> |
_searchUIColumnManager
ComponentManager for
SearchUIColumns. |
protected ThreadSafeComponentManager<SearchUICriterion> |
_searchUICriterionManager
ComponentManager for
SearchUICriterions. |
private SystemPropertyExtensionPoint |
_sysPropEP |
private SearchUIModel |
_wrappedModel |
_advancedSearchCriteria, _columns, _context, _cTypeEP, _cTypes, _excludedCTypes, _facetedCriteria, _logger, _manager, _searchCriteria, _searchModelHelper| Constructor and Description |
|---|
CriteriaSearchUIModelWrapper(SearchUIModel model,
ServiceManager manager,
Context context,
Logger logger)
Build a model wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addIndexingFieldCriteriaComponents(List<Object> searchToolCriterionRoles,
String contentTypeId,
String fieldRef)
Add a indexing field criteria component to the manager.
|
private Configuration |
addLabelInColumnConf(Configuration originalConf,
String label) |
protected void |
addMetadataColumnComponents(List<Object> columnsRolesToLookup,
String contentTypeId,
String metadataPath,
Optional<String> columnLabel)
Add a metadata column component to the manager.
|
protected void |
addSystemColumnComponent(List<Object> columnsRolesToLookup,
String contentTypeId,
String property,
Optional<String> columnLabel)
Add a system column component to the manager.
|
protected void |
addSystemCriteriaComponents(List<Object> searchToolCriterionRoles,
String contentTypeId,
String property)
Add a system criteria component to the manager.
|
boolean |
allowSortOnMultipleJoin()
|
protected void |
configureColumns(List<Object> columnRoles,
String contentTypeId,
Collection<CriteriaSearchUIModelWrapper.Column> columnIds,
SearchUIModel referenceModel,
Map<String,Object> contextualParameters)
Configure the list of search columns.
|
protected Collection<String> |
configureFacets(List<Object> criteriaRoles,
String contentTypeId,
Collection<String> criteriaIds,
SearchUIModel referenceModel,
Map<String,Object> contextualParameters)
Configure the list of faceted criteria.
|
Map<String,SearchUICriterion> |
getAdvancedCriteria(Map<String,Object> contextualParameters)
Get the list of search criteria in advanced mode
|
protected SearchUIColumn |
getColumn(SearchUIModel searchModel,
String columnId,
Map<String,Object> contextualParameters)
Search a column in the reference model from its column identifier.
|
Set<String> |
getContentTypes(Map<String,Object> contextualParameters)
Get the list of content types.
|
Map<String,SearchUICriterion> |
getCriteria(Map<String,Object> contextualParameters)
Get the list of search criteria in simple mode
|
protected SearchUICriterion |
getCriterion(SearchUIModel searchModel,
String criterionId,
Map<String,Object> contextualParameters)
Search a criterion in the reference model from its criterion identifier.
|
SearchUICriterion |
getCriterion(String id,
Map<String,Object> contextualParameters)
Get a simple search criterion by its id
|
Set<String> |
getExcludedContentTypes(Map<String,Object> contextualParameters)
Get the list of excluded content types.
|
String |
getExportCSVUrl(Map<String,Object> contextualParameters)
Get the URL for CVS export of results
|
String |
getExportCSVUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for CVS export of results
|
String |
getExportDOCUrl(Map<String,Object> contextualParameters)
Get the URL for DOC export of results
|
String |
getExportDOCUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for DOC export of results
|
String |
getExportXMLUrl(Map<String,Object> contextualParameters)
Get the URL for XML export of results
|
String |
getExportXMLUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for XML export of results
|
Map<String,SearchUICriterion> |
getFacetedCriteria(Map<String,Object> contextualParameters)
Get the list of faceted search criteria.
|
String |
getPrintUrl(Map<String,Object> contextualParameters)
Get the URL for print results
|
String |
getPrintUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for print results
|
SearchUIColumn |
getResultField(String id,
Map<String,Object> contextualParameters)
Get the column by its identifier
|
Map<String,SearchUIColumn> |
getResultFields(Map<String,Object> contextualParameters)
Get the column for results
|
String |
getSearchUrl(Map<String,Object> contextualParameters)
Get the URL for search
|
String |
getSearchUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for search
|
void |
service(ServiceManager manager) |
Collection<String> |
setFacetedCriteria(String contentTypeId,
Collection<String> criteriaIds,
Map<String,Object> contextualParameters)
Set the custom faceted criteria.
|
void |
setResultColumns(String contentTypeId,
Collection<CriteriaSearchUIModelWrapper.Column> columns,
Map<String,Object> contextualParameters)
Set the custom columns.
|
addContentTypesConfiguration, contextualize, getCustomCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getLogger, getMetadataColumnConfiguration, getMetadataColumnConfiguration, getPageSize, getSummaryView, getSystemColumnConfiguration, getSystemColumnConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, getWorkspace, setAdvancedCriteria, setContentTypes, setCriteria, setExcludedContentTypes, setFacetedCriteria, setLogger, setResultFieldsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdvancedCriterion, getFacetedCriterionprotected ThreadSafeComponentManager<SearchUICriterion> _searchUICriterionManager
SearchUICriterions.protected ThreadSafeComponentManager<SearchUIColumn> _searchUIColumnManager
SearchUIColumns.private SearchUIModelExtensionPoint _searchModelEP
private SystemPropertyExtensionPoint _sysPropEP
private SearchUIModel _wrappedModel
private int _criteriaIndex
public CriteriaSearchUIModelWrapper(SearchUIModel model, ServiceManager manager, Context context, Logger logger)
model - the search model to wrap.manager - the service manager.context - the component context.logger - the logger.public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractSearchUIModelServiceExceptionpublic Collection<String> setFacetedCriteria(String contentTypeId, Collection<String> criteriaIds, Map<String,Object> contextualParameters) throws Exception
contentTypeId - the reference content type ID, can be null.criteriaIds - the criteria IDscontextualParameters - the contextual parametersException - if an error occurs initializing criteria.public void setResultColumns(String contentTypeId, Collection<CriteriaSearchUIModelWrapper.Column> columns, Map<String,Object> contextualParameters) throws Exception
contentTypeId - the reference content type ID, can be null.columns - The columnscontextualParameters - the contextual parametersException - if an error occurs initializing columns.protected Collection<String> configureFacets(List<Object> criteriaRoles, String contentTypeId, Collection<String> criteriaIds, SearchUIModel referenceModel, Map<String,Object> contextualParameters) throws ConfigurationException
criteriaRoles - the roles of criteria to lookup (or the already existing SearchUICriterion objects).contentTypeId - The reference content type ID.criteriaIds - the criteria IDs.referenceModel - the reference model.contextualParameters - the contextual parametersConfigurationException - if an error occurs creating a component configuration.protected SearchUICriterion getCriterion(SearchUIModel searchModel, String criterionId, Map<String,Object> contextualParameters)
searchModel - the reference search model.criterionId - the criterion identifier.contextualParameters - the contextual parametersprotected void configureColumns(List<Object> columnRoles, String contentTypeId, Collection<CriteriaSearchUIModelWrapper.Column> columnIds, SearchUIModel referenceModel, Map<String,Object> contextualParameters) throws ConfigurationException
columnRoles - the roles of columns to lookup (or the already existing SearchUIColumn objects).contentTypeId - The reference content type ID.columnIds - The columnsreferenceModel - the reference model.contextualParameters - the contextual parametersConfigurationException - if an error occurs creating a component configuration.protected SearchUIColumn getColumn(SearchUIModel searchModel, String columnId, Map<String,Object> contextualParameters)
searchModel - the reference search model.columnId - the column identifier.contextualParameters - the contextual parametersprotected void addIndexingFieldCriteriaComponents(List<Object> searchToolCriterionRoles, String contentTypeId, String fieldRef) throws ConfigurationException
searchToolCriterionRoles - the criteria role list to fill.contentTypeId - the reference content type ID, can be null.fieldRef - the field path.ConfigurationException - if an error occurs.protected void addSystemCriteriaComponents(List<Object> searchToolCriterionRoles, String contentTypeId, String property) throws ConfigurationException
searchToolCriterionRoles - the criteria role list to fill.contentTypeId - the reference content type ID, can be null.property - the system property id.ConfigurationException - if an error occurs.private Configuration addLabelInColumnConf(Configuration originalConf, String label) throws ConfigurationException
ConfigurationExceptionprotected void addMetadataColumnComponents(List<Object> columnsRolesToLookup, String contentTypeId, String metadataPath, Optional<String> columnLabel) throws ConfigurationException
columnsRolesToLookup - the columns rolescontentTypeId - the reference content type ID, can be null.metadataPath - the metadata path.columnLabel - The (optional) label of the column. If not present, the column label will be the metadata one.ConfigurationException - if an error occurs.protected void addSystemColumnComponent(List<Object> columnsRolesToLookup, String contentTypeId, String property, Optional<String> columnLabel) throws ConfigurationException
columnsRolesToLookup - the columns rolescontentTypeId - the reference content type ID, can be null.property - the system property.columnLabel - The (optional) label of the column. If not present, the column label will be the metadata one.ConfigurationException - if an error occurs.public Map<String,SearchUICriterion> getFacetedCriteria(Map<String,Object> contextualParameters)
SearchModelgetFacetedCriteria in interface SearchModelgetFacetedCriteria in interface SearchUIModelgetFacetedCriteria in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic Map<String,SearchUIColumn> getResultFields(Map<String,Object> contextualParameters)
SearchModelgetResultFields in interface SearchModelgetResultFields in interface SearchUIModelgetResultFields in class AbstractSearchUIModelcontextualParameters - the contextual parameters. Can be null.public SearchUIColumn getResultField(String id, Map<String,Object> contextualParameters)
SearchModelid - The column idcontextualParameters - the contextual parameterspublic Set<String> getContentTypes(Map<String,Object> contextualParameters)
SearchModelgetContentTypes in interface SearchModelgetContentTypes in class AbstractSearchUIModelcontextualParameters - the contextual parameters.public Set<String> getExcludedContentTypes(Map<String,Object> contextualParameters)
SearchModelgetExcludedContentTypes in interface SearchModelgetExcludedContentTypes in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getSearchUrl(Map<String,Object> contextualParameters)
SearchUIModelgetSearchUrl in interface SearchUIModelgetSearchUrl in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getSearchUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModelgetSearchUrlPlugin in interface SearchUIModelgetSearchUrlPlugin in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportCSVUrl(Map<String,Object> contextualParameters)
SearchUIModelgetExportCSVUrl in interface SearchUIModelgetExportCSVUrl in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportCSVUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModelgetExportCSVUrlPlugin in interface SearchUIModelgetExportCSVUrlPlugin in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportDOCUrl(Map<String,Object> contextualParameters)
SearchUIModelgetExportDOCUrl in interface SearchUIModelgetExportDOCUrl in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportDOCUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModelgetExportDOCUrlPlugin in interface SearchUIModelgetExportDOCUrlPlugin in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportXMLUrl(Map<String,Object> contextualParameters)
SearchUIModelgetExportXMLUrl in interface SearchUIModelgetExportXMLUrl in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getExportXMLUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModelgetExportXMLUrlPlugin in interface SearchUIModelgetExportXMLUrlPlugin in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getPrintUrl(Map<String,Object> contextualParameters)
SearchUIModelgetPrintUrl in interface SearchUIModelgetPrintUrl in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic String getPrintUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModelgetPrintUrlPlugin in interface SearchUIModelgetPrintUrlPlugin in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic boolean allowSortOnMultipleJoin()
SearchUIModelmultiple metadata in its path (intermediate ones only) must be allowed.
public Map<String,SearchUICriterion> getCriteria(Map<String,Object> contextualParameters)
SearchModelgetCriteria in interface SearchModelgetCriteria in interface SearchUIModelgetCriteria in class AbstractSearchUIModelcontextualParameters - the contextual parameterspublic SearchUICriterion getCriterion(String id, Map<String,Object> contextualParameters)
SearchModelid - The search criterion idcontextualParameters - the contextual parametersnull if not foundpublic Map<String,SearchUICriterion> getAdvancedCriteria(Map<String,Object> contextualParameters)
SearchUIModelgetAdvancedCriteria in interface SearchUIModelgetAdvancedCriteria in class AbstractSearchUIModelcontextualParameters - the contextual parameters