public class ReferenceTableSearchUIModel extends AbstractSearchUIModel implements Configurable
SearchUIModel
for reference tables
The search tool model automatically declares simple first level metadatas as criteria and columns.Modifier and Type | Field and Description |
---|---|
protected ThreadSafeComponentManager<SearchUIColumn> |
_searchColumnManager
ComponentManager for
SearchUIColumn s. |
protected List<String> |
_searchColumnRoles
The search column roles.
|
protected ThreadSafeComponentManager<SearchUICriterion> |
_searchCriteriaManager
ComponentManager for
SearchUICriterion s. |
protected List<String> |
_searchCriteriaRoles
The search criteria roles.
|
_advancedSearchCriteria, _columns, _context, _cTypeEP, _cTypes, _excludedCTypes, _facetedCriteria, _logger, _manager, _searchCriteria, _searchModelHelper
Constructor and Description |
---|
ReferenceTableSearchUIModel() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_filterMetadata(MetadataDefinition metadataDefinition)
Returns true if metadata can be used as criteria and column search UI
|
protected void |
addColumnComponents(ContentType cType)
Add column components to the manager.
|
protected void |
addCriteriaComponents(ContentType cType)
Add criteria components to the manager.
|
protected void |
addLikeTitleCriterionComponent(ContentType contentType)
Add the title metadata criterion component to the manager, with a 'LIKE' operator and an hidden widget
|
protected void |
addMetadataColumnComponent(ContentType contentType,
String metadataName)
Add a metadata column component to the manager.
|
protected void |
addMetadataCriterionComponent(ContentType contentType,
String metadataName,
Query.Operator operator)
Add a metadata criterion component to the manager.
|
protected void |
addParentMetadataSystemCriterionComponent(ContentType cType)
Add a system criterion component for the "parent" metadata
|
protected void |
addSystemColumnComponent(ContentType contentType,
String property)
Add a system column component to the manager.
|
protected void |
addSystemCriterionComponent(ContentType contentType,
String property)
Add a system criterion component to the manager.
|
void |
configure(Configuration configuration) |
Map<String,SearchUICriterion> |
getAdvancedCriteria(Map<String,Object> contextualParameters)
Get the list of search criteria in advanced mode
|
protected List<SearchUIColumn> |
getColumns(ContentType cType)
Lookup all the columns.
|
Map<String,SearchUICriterion> |
getCriteria(Map<String,Object> contextualParameters)
Get the list of search criteria in simple mode
|
Set<String> |
getExcludedContentTypes(Map<String,Object> contextualParameters)
Get the list of excluded content types.
|
Map<String,SearchUICriterion> |
getFacetedCriteria(Map<String,Object> contextualParameters)
Get the list of faceted search criteria.
|
Map<String,SearchUIColumn> |
getResultFields(Map<String,Object> contextualParameters)
Get the column for results
|
protected List<SearchUICriterion> |
getSearchUICriteria(ContentType cType)
Lookup all the criteria.
|
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, service, setAdvancedCriteria, setContentTypes, setCriteria, setExcludedContentTypes, setFacetedCriteria, setLogger, setResultFields
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion, getResultField
protected ThreadSafeComponentManager<SearchUICriterion> _searchCriteriaManager
SearchUICriterion
s.protected ThreadSafeComponentManager<SearchUIColumn> _searchColumnManager
SearchUIColumn
s.protected List<String> _searchCriteriaRoles
protected List<String> _searchColumnRoles
public ReferenceTableSearchUIModel()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public Set<String> getExcludedContentTypes(Map<String,Object> contextualParameters)
SearchModel
getExcludedContentTypes
in interface SearchModel
getExcludedContentTypes
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic Map<String,SearchUICriterion> getCriteria(Map<String,Object> contextualParameters)
SearchModel
getCriteria
in interface SearchModel
getCriteria
in interface SearchUIModel
getCriteria
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic Map<String,SearchUICriterion> getFacetedCriteria(Map<String,Object> contextualParameters)
SearchModel
getFacetedCriteria
in interface SearchModel
getFacetedCriteria
in interface SearchUIModel
getFacetedCriteria
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic Map<String,SearchUICriterion> getAdvancedCriteria(Map<String,Object> contextualParameters)
SearchUIModel
getAdvancedCriteria
in interface SearchUIModel
getAdvancedCriteria
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic Map<String,SearchUIColumn> getResultFields(Map<String,Object> contextualParameters)
SearchModel
getResultFields
in interface SearchModel
getResultFields
in interface SearchUIModel
getResultFields
in class AbstractSearchUIModel
contextualParameters
- the contextual parameters. Can be null.protected void addCriteriaComponents(ContentType cType) throws ConfigurationException, ComponentException
cType
- the simple content type.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected boolean _filterMetadata(MetadataDefinition metadataDefinition)
metadataDefinition
- the metadata definitiontrue
protected void addParentMetadataSystemCriterionComponent(ContentType cType) throws ConfigurationException, ComponentException
cType
- the simple content typeConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected void addLikeTitleCriterionComponent(ContentType contentType) throws ConfigurationException, ComponentException
contentType
- the simple content type.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected void addMetadataCriterionComponent(ContentType contentType, String metadataName, Query.Operator operator) throws ConfigurationException, ComponentException
contentType
- the simple content type.metadataName
- the metadata name.operator
- the criterion operator.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected void addSystemCriterionComponent(ContentType contentType, String property) throws ConfigurationException, ComponentException
contentType
- the simple content type.property
- the system property.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected List<SearchUICriterion> getSearchUICriteria(ContentType cType) throws ComponentException
cType
- the simple content type.ComponentException
- if a component cannot be looked up.protected void addColumnComponents(ContentType cType) throws ConfigurationException, ComponentException
cType
- the simple content type.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected void addMetadataColumnComponent(ContentType contentType, String metadataName) throws ConfigurationException, ComponentException
contentType
- the simple content type.metadataName
- the metadata name.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected void addSystemColumnComponent(ContentType contentType, String property) throws ConfigurationException, ComponentException
contentType
- the simple content type.property
- the system property.ConfigurationException
- if a configuration error occurs.ComponentException
- if a component cannot be initialized.protected List<SearchUIColumn> getColumns(ContentType cType) throws ComponentException
cType
- the simple content type.ComponentException
- if a component cannot be looked up.