Package org.ametys.cms.search.ui.model
Class ReferenceTableSearchUIModel
java.lang.Object
org.ametys.cms.search.ui.model.AbstractSearchUIModel
org.ametys.cms.search.ui.model.ReferenceTableSearchUIModel
- All Implemented Interfaces:
 SearchModel,SearchUIModel,LogEnabled,Configurable,Contextualizable,Serviceable
Generic implementation of 
SearchUIModel for reference tables
 The search tool model automatically declares simple first level metadatas as criteria and columns.- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HierarchicalReferenceTablesHelperThe helper component for hierarchical reference tablesprotected ThreadSafeComponentManager<SearchUIColumn>ComponentManager forSearchUIColumns.The search column roles.protected ThreadSafeComponentManager<SearchUICriterion>ComponentManager forSearchUICriterions.The search criteria roles.Fields inherited from class org.ametys.cms.search.ui.model.AbstractSearchUIModel
_advancedSearchCriteria, _columns, _context, _cTypeEP, _cTypes, _excludedCTypes, _facetedCriteria, _logger, _manager, _searchCriteria, _searchModelHelper, DEFAULT_EXPORT_CSV_URL, DEFAULT_EXPORT_DOC_URL, DEFAULT_EXPORT_XML_URL, DEFAULT_PRINT_URL, DEFAULT_SEARCH_URL, DEFAULT_URL_PLUGIN - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_filterModelItemForColumn(ModelItem modelItem) Returnstrueif model item can be used as column search UIprotected boolean_filterModelItemForCriteria(ModelItem modelItem) Returnstrueif the model item can be used as criteriaprotected voidaddAttributeColumnComponent(ContentType contentType, String attributePath) Add an attribute column component to the manager.protected voidaddAttributeCriterionComponent(ContentType contentType, String attributePath, Query.Operator operator) Add an attribute criterion component to the manager.protected voidaddColumnComponents(ContentType cType) Add column components to the manager.protected voidaddColumnComponents(ContentType cType, ViewItemContainer viewContainer) Add column components to the manager.protected voidaddCriteriaComponents(ContentType cType) Add criteria components to the manager.protected voidaddCriteriaComponents(ContentType cType, ViewItemContainer viewContainer) Add criteria components to the manager.protected voidAdd criteria component to exclude the candidatesprotected voidaddLikeTitleCriterionComponent(ContentType contentType, String attributePath) Add the title attribute criterion component to the manager, with a 'LIKE' operator and an hidden widgetprotected voidaddSystemColumnComponent(ContentType contentType, String property) Add a system column component to the manager.protected voidaddSystemCriterionComponent(ContentType contentType, String property) Add a system criterion component to the manager.voidconfigure(Configuration configuration) getAdvancedCriteria(Map<String, Object> contextualParameters) Get the list of search criteria in advanced modeprotected List<SearchUIColumn>Lookup all the columns.getCriteria(Map<String, Object> contextualParameters) Get the list of search criteria in simple modegetExcludedContentTypes(Map<String, Object> contextualParameters) Get the list of excluded content types.getFacetedCriteria(Map<String, Object> contextualParameters) Get the list of faceted search criteria.getResultFields(Map<String, Object> contextualParameters) Get the column for resultsprotected List<SearchUICriterion>getSearchUICriteria(ContentType cType) Lookup all the criteria.voidservice(ServiceManager smanager) Methods inherited from class org.ametys.cms.search.ui.model.AbstractSearchUIModel
addContentTypesConfiguration, contextualize, getContentTypes, getCustomCriteriaConfiguration, getExportCSVUrl, getExportCSVUrlPlugin, getExportDOCUrl, getExportDOCUrlPlugin, getExportXMLUrl, getExportXMLUrlPlugin, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getLogger, getMetadataColumnConfiguration, getMetadataColumnConfiguration, getPageSize, getPrintUrl, getPrintUrlPlugin, getSearchUrl, getSearchUrlPlugin, getSummaryView, getSystemColumnConfiguration, getSystemColumnConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, getWorkspace, setAdvancedCriteria, setContentTypes, setCriteria, setExcludedContentTypes, setFacetedCriteria, setLogger, setResultFieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.ui.model.SearchUIModel
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion, getResultField 
- 
Field Details
- 
_searchCriteriaManager
ComponentManager forSearchUICriterions. - 
_searchColumnManager
ComponentManager forSearchUIColumns. - 
_searchCriteriaRoles
The search criteria roles. - 
_searchColumnRoles
The search column roles. - 
_hierarchicalReferenceTableContentsHelper
The helper component for hierarchical reference tables 
 - 
 - 
Constructor Details
- 
ReferenceTableSearchUIModel
public ReferenceTableSearchUIModel() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classAbstractSearchUIModel- Throws:
 ServiceException
 - 
configure
- Specified by:
 configurein interfaceConfigurable- Throws:
 ConfigurationException
 - 
getExcludedContentTypes
Description copied from interface:SearchModelGet the list of excluded content types.- Specified by:
 getExcludedContentTypesin interfaceSearchModel- Overrides:
 getExcludedContentTypesin classAbstractSearchUIModel- Parameters:
 contextualParameters- the contextual parameters- Returns:
 - The list of excluded content types.
 
 - 
getCriteria
Description copied from interface:SearchModelGet the list of search criteria in simple mode- Specified by:
 getCriteriain interfaceSearchModel- Specified by:
 getCriteriain interfaceSearchUIModel- Overrides:
 getCriteriain classAbstractSearchUIModel- Parameters:
 contextualParameters- the contextual parameters- Returns:
 - the list of search criteria in simple mode
 
 - 
getFacetedCriteria
Description copied from interface:SearchModelGet the list of faceted search criteria.- Specified by:
 getFacetedCriteriain interfaceSearchModel- Specified by:
 getFacetedCriteriain interfaceSearchUIModel- Overrides:
 getFacetedCriteriain classAbstractSearchUIModel- Parameters:
 contextualParameters- the contextual parameters- Returns:
 - the list of faceted search criteria.
 
 - 
getAdvancedCriteria
Description copied from interface:SearchUIModelGet the list of search criteria in advanced mode- Specified by:
 getAdvancedCriteriain interfaceSearchUIModel- Overrides:
 getAdvancedCriteriain classAbstractSearchUIModel- Parameters:
 contextualParameters- the contextual parameters- Returns:
 - the list of search criteria in advanced mode
 
 - 
getResultFields
Description copied from interface:SearchModelGet the column for results- Specified by:
 getResultFieldsin interfaceSearchModel- Specified by:
 getResultFieldsin interfaceSearchUIModel- Overrides:
 getResultFieldsin classAbstractSearchUIModel- Parameters:
 contextualParameters- the contextual parameters. Can be null.- Returns:
 - the column for results
 
 - 
addCriteriaComponents
protected void addCriteriaComponents(ContentType cType) throws ConfigurationException, ComponentException Add criteria components to the manager.- Parameters:
 cType- the simple content type.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addCriteriaComponents
protected void addCriteriaComponents(ContentType cType, ViewItemContainer viewContainer) throws ConfigurationException, ComponentException Add criteria components to the manager.- Parameters:
 cType- the simple content type.viewContainer- the view item container- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addExcludeCandidateSystemCriterionComponent
Add criteria component to exclude the candidates- Parameters:
 cType- the simple content type
 - 
_filterModelItemForCriteria
Returnstrueif the model item can be used as criteria- Parameters:
 modelItem- the model item- Returns:
 trueif the model item can be used as criteria
 - 
_filterModelItemForColumn
Returnstrueif model item can be used as column search UI- Parameters:
 modelItem- the model item- Returns:
 trueif model item can be used as column search UI
 - 
addLikeTitleCriterionComponent
protected void addLikeTitleCriterionComponent(ContentType contentType, String attributePath) throws ConfigurationException, ComponentException Add the title attribute criterion component to the manager, with a 'LIKE' operator and an hidden widget- Parameters:
 contentType- the simple content type.attributePath- the attribute path.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addAttributeCriterionComponent
protected void addAttributeCriterionComponent(ContentType contentType, String attributePath, Query.Operator operator) throws ConfigurationException, ComponentException Add an attribute criterion component to the manager.- Parameters:
 contentType- the simple content type.attributePath- the attribute path.operator- the criterion operator.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addSystemCriterionComponent
protected void addSystemCriterionComponent(ContentType contentType, String property) throws ConfigurationException, ComponentException Add a system criterion component to the manager.- Parameters:
 contentType- the simple content type.property- the system property.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
getSearchUICriteria
Lookup all the criteria.- Parameters:
 cType- the simple content type.- Returns:
 - the search criteria list.
 - Throws:
 ComponentException- if a component cannot be looked up.
 - 
addColumnComponents
protected void addColumnComponents(ContentType cType) throws ConfigurationException, ComponentException Add column components to the manager.- Parameters:
 cType- the simple content type.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addColumnComponents
protected void addColumnComponents(ContentType cType, ViewItemContainer viewContainer) throws ConfigurationException, ComponentException Add column components to the manager.- Parameters:
 cType- the simple content type.viewContainer- the view item container- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addAttributeColumnComponent
protected void addAttributeColumnComponent(ContentType contentType, String attributePath) throws ConfigurationException, ComponentException Add an attribute column component to the manager.- Parameters:
 contentType- the simple content type.attributePath- the attribute path.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
addSystemColumnComponent
protected void addSystemColumnComponent(ContentType contentType, String property) throws ConfigurationException, ComponentException Add a system column component to the manager.- Parameters:
 contentType- the simple content type.property- the system property.- Throws:
 ConfigurationException- if a configuration error occurs.ComponentException- if a component cannot be initialized.
 - 
getColumns
Lookup all the columns.- Returns:
 - the search column list.
 - Throws:
 ComponentException- if a component cannot be looked up.
 
 -