public class StaticSearchUIModel extends AbstractSearchUIModel implements Configurable, Disposable
AbstractSearchUIModel
Modifier and Type | Field and Description |
---|---|
private int |
_criteriaIndex |
protected ContentTypesHelper |
_cTypeHelper
The content type helper.
|
private String |
_exportCSVUrl |
private String |
_exportCSVUrlPlugin |
private String |
_exportDOCUrl |
private String |
_exportDOCUrlPlugin |
private String |
_exportXMLUrl |
private String |
_exportXMLUrlPlugin |
private int |
_pageSize |
private String |
_printUrl |
private String |
_printUrlPlugin |
protected ThreadSafeComponentManager<SearchUIColumn> |
_searchColumnManager
ComponentManager for
SearchUIColumn s. |
protected ThreadSafeComponentManager<SearchUICriterion> |
_searchCriterionManager
ComponentManager for
SearchUICriterion s. |
private String |
_searchUrl |
private String |
_searchUrlPlugin |
private boolean |
_sortOnMultipleJoin |
private String |
_summaryView |
protected SystemPropertyExtensionPoint |
_systemPropEP
The system property extension point.
|
private String |
_workspace |
_advancedSearchCriteria, _columns, _context, _cTypeEP, _cTypes, _excludedCTypes, _facetedCriteria, _logger, _manager, _searchCriteria, _searchModelHelper
Constructor and Description |
---|
StaticSearchUIModel() |
Modifier and Type | Method and Description |
---|---|
protected void |
_addColumnsComponents(ContentType cType,
Configuration configuration,
List<String> columnsRolesToLookup)
Add column components to the result column manager.
|
protected void |
_addCriteriaComponents(ContentType commonContentType,
Configuration configuration,
List<String> searchCriteriaRoles)
Add criteria components to the search criteria manager.
|
protected void |
_addCriteriaComponents(ContentType commonContentType,
Configuration configuration,
List<String> searchCriteriaRoles,
I18nizableText group)
Add standard criteria components to the search criteria manager.
|
protected void |
_addCustomColumnComponent(ContentType commonContentType,
Configuration conf,
String customId,
List<String> columnsRolesToLookup)
Add a custom column component to the manager.
|
protected void |
_addCustomCriteriaComponents(ContentType commonContentType,
Configuration conf,
List<String> searchCriteriaRoles,
String searchCriterionId,
I18nizableText group)
Add a custom criteria component to the manager.
|
protected void |
_addFacetCriteriaComponents(ContentType commonContentType,
Configuration configuration,
List<String> searchCriteriaRoles)
Add facet criteria components to the search criteria manager.
|
protected void |
_addIndexingFieldCriteriaComponents(ContentType commonContentType,
Configuration conf,
List<String> searchCriteriaRoles,
String fieldRef,
I18nizableText group)
Add a indexing field criteria component to the manager.
|
protected void |
_addMetadataColumnComponents(ContentType commonContentType,
Configuration conf,
String metadataPath,
List<String> columnsRolesToLookup)
Add a metadata column component to the manager.
|
protected void |
_addSystemColumnComponent(ContentType commonContentType,
Configuration originalConf,
String property,
List<String> columnsRolesToLookup)
Add a system column component to the manager.
|
protected void |
_addSystemCriteriaComponents(ContentType commonContentType,
Configuration originalConf,
List<String> searchCriteriaRoles,
String property,
I18nizableText group)
Add a system criteria component to the manager.
|
protected Set<String> |
_configureBaseContentTypes(Configuration configuration)
Configure the base content type ids.
|
protected Map<String,SearchUIColumn> |
_configureColumns(List<String> columnRoles)
Lookup all the configured columns in the manager.
|
protected void |
_configureContentTypes(Configuration configuration)
Configure the content type ids
|
protected void |
_configureCriteria(Map<String,SearchUICriterion> criteriaMap,
List<String> criteriaRoles,
boolean checkFacetable)
Lookup the previously initialized criteria components and fill the given map with them.
|
private void |
_configureExportCSVUrl(Configuration configuration) |
private void |
_configureExportDOCUrl(Configuration configuration) |
private void |
_configureExportXMLUrl(Configuration configuration) |
private I18nizableText |
_configureI18nizableText(Configuration config,
I18nizableText defaultValue) |
private void |
_configurePrintUrl(Configuration configuration) |
private void |
_configureSearchUrl(Configuration configuration) |
protected void |
_copyAdvancedCriteria(Map<String,SearchUICriterion> advancedCriteria,
Collection<SearchUICriterion> criteria)
Copy all the allowed search criteria to the given criteria map.
|
protected void |
_copyFacetableCriteria(Map<String,SearchUICriterion> facetedCriteria,
Collection<SearchUICriterion> criteria)
Copy all the facetable search criteria to the given criteria map.
|
protected boolean |
_isAdvanced(SearchUICriterion criterion)
Test if a search criterion can be used in advanced search mode.
|
protected boolean |
_isValidContentType(String id,
List<String> excludedTags,
List<String> excludedContentTypes)
Determines if the content type is a valid content type in current configuration
|
boolean |
allowSortOnMultipleJoin()
|
void |
configure(Configuration configuration) |
void |
dispose() |
Set<String> |
getContentTypes(Map<String,Object> contextualParameters)
Get the list of content types.
|
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
|
int |
getPageSize(Map<String,Object> contextualParameters)
Get the page size.
|
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
|
String |
getSearchUrl(Map<String,Object> contextualParameters)
Get the URL for search
|
String |
getSearchUrlPlugin(Map<String,Object> contextualParameters)
Get the plugin name for search
|
String |
getSummaryView()
Get the name of the view to use for summary of the content.
|
String |
getWorkspace(Map<String,Object> contextualParameters)
Get the specific workspace to use.
|
void |
service(ServiceManager manager) |
addContentTypesConfiguration, contextualize, getAdvancedCriteria, getCriteria, getCustomCriteriaConfiguration, getFacetedCriteria, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getIndexingFieldCriteriaConfiguration, getLogger, getMetadataColumnConfiguration, getMetadataColumnConfiguration, getResultFields, getSystemColumnConfiguration, getSystemColumnConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, getSystemCriteriaConfiguration, setAdvancedCriteria, setContentTypes, setCriteria, setExcludedContentTypes, setFacetedCriteria, setLogger, setResultFields
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdvancedCriterion, getCriterion, getFacetedCriterion, getResultField
protected ContentTypesHelper _cTypeHelper
protected ThreadSafeComponentManager<SearchUICriterion> _searchCriterionManager
SearchUICriterion
s.protected ThreadSafeComponentManager<SearchUIColumn> _searchColumnManager
SearchUIColumn
s.protected SystemPropertyExtensionPoint _systemPropEP
private int _criteriaIndex
private int _pageSize
private String _workspace
private String _searchUrl
private String _searchUrlPlugin
private String _exportCSVUrl
private String _exportCSVUrlPlugin
private String _exportDOCUrl
private String _exportDOCUrlPlugin
private String _exportXMLUrl
private String _exportXMLUrlPlugin
private String _printUrlPlugin
private String _summaryView
private boolean _sortOnMultipleJoin
public StaticSearchUIModel()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractSearchUIModel
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void dispose()
dispose
in interface Disposable
public Set<String> getContentTypes(Map<String,Object> contextualParameters)
SearchModel
getContentTypes
in interface SearchModel
getContentTypes
in class AbstractSearchUIModel
contextualParameters
- the contextual parameters.public Set<String> getExcludedContentTypes(Map<String,Object> contextualParameters)
SearchModel
getExcludedContentTypes
in interface SearchModel
getExcludedContentTypes
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic int getPageSize(Map<String,Object> contextualParameters)
SearchUIModel
getPageSize
in interface SearchUIModel
getPageSize
in class AbstractSearchUIModel
contextualParameters
- the contextual parameters.public String getWorkspace(Map<String,Object> contextualParameters)
SearchUIModel
getWorkspace
in interface SearchUIModel
getWorkspace
in class AbstractSearchUIModel
contextualParameters
- the contextual parameters.public String getSearchUrl(Map<String,Object> contextualParameters)
SearchUIModel
getSearchUrl
in interface SearchUIModel
getSearchUrl
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getSearchUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getSearchUrlPlugin
in interface SearchUIModel
getSearchUrlPlugin
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportCSVUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportCSVUrl
in interface SearchUIModel
getExportCSVUrl
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportCSVUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportCSVUrlPlugin
in interface SearchUIModel
getExportCSVUrlPlugin
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportDOCUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportDOCUrl
in interface SearchUIModel
getExportDOCUrl
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportDOCUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportDOCUrlPlugin
in interface SearchUIModel
getExportDOCUrlPlugin
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportXMLUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportXMLUrl
in interface SearchUIModel
getExportXMLUrl
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getExportXMLUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportXMLUrlPlugin
in interface SearchUIModel
getExportXMLUrlPlugin
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getPrintUrl(Map<String,Object> contextualParameters)
SearchUIModel
getPrintUrl
in interface SearchUIModel
getPrintUrl
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getPrintUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getPrintUrlPlugin
in interface SearchUIModel
getPrintUrlPlugin
in class AbstractSearchUIModel
contextualParameters
- the contextual parameterspublic String getSummaryView()
SearchUIModel
getSummaryView
in interface SearchUIModel
getSummaryView
in class AbstractSearchUIModel
public boolean allowSortOnMultipleJoin()
SearchUIModel
multiple
metadata
in its path (intermediate ones only) must be allowed.
allowSortOnMultipleJoin
in interface SearchUIModel
protected void _configureContentTypes(Configuration configuration) throws ConfigurationException
configuration
- The content types configurationConfigurationException
- If an error occursprotected Set<String> _configureBaseContentTypes(Configuration configuration) throws ConfigurationException
configuration
- The content types configurationConfigurationException
- If an error occursprotected boolean _isValidContentType(String id, List<String> excludedTags, List<String> excludedContentTypes)
id
- The content type idexcludedTags
- The tags to excludeexcludedContentTypes
- The content types to excludetrue
if the content type is a valid content typeprivate void _configureSearchUrl(Configuration configuration)
private void _configureExportCSVUrl(Configuration configuration)
private void _configureExportDOCUrl(Configuration configuration)
private void _configureExportXMLUrl(Configuration configuration)
private void _configurePrintUrl(Configuration configuration)
protected void _addCriteriaComponents(ContentType commonContentType, Configuration configuration, List<String> searchCriteriaRoles) throws ConfigurationException
commonContentType
- the model's common content type, can be null.configuration
- the model configuration.searchCriteriaRoles
- the criteria role list to fill.ConfigurationException
- if an error occurs.protected void _addCriteriaComponents(ContentType commonContentType, Configuration configuration, List<String> searchCriteriaRoles, I18nizableText group) throws ConfigurationException
commonContentType
- the model's common content type, can be null.configuration
- the model configuration.searchCriteriaRoles
- the criteria role list to fill.group
- the criteria group.ConfigurationException
- if an error occurs.protected void _addFacetCriteriaComponents(ContentType commonContentType, Configuration configuration, List<String> searchCriteriaRoles) throws ConfigurationException
commonContentType
- the model's common content type, can be null.configuration
- the model configuration.searchCriteriaRoles
- the criteria role list to fill.ConfigurationException
- if an error occurs.protected void _addIndexingFieldCriteriaComponents(ContentType commonContentType, Configuration conf, List<String> searchCriteriaRoles, String fieldRef, I18nizableText group) throws ConfigurationException
commonContentType
- the model common content type, can be null.conf
- the criteria configuration.searchCriteriaRoles
- the criteria role list to fill.fieldRef
- the field path.group
- The group.ConfigurationException
- if an error occurs.protected void _addSystemCriteriaComponents(ContentType commonContentType, Configuration originalConf, List<String> searchCriteriaRoles, String property, I18nizableText group) throws ConfigurationException
commonContentType
- the model common content type, can be null.originalConf
- the criteria configuration.searchCriteriaRoles
- the criteria role list to fill.property
- the system property id.group
- The group.ConfigurationException
- if an error occurs.protected void _addCustomCriteriaComponents(ContentType commonContentType, Configuration conf, List<String> searchCriteriaRoles, String searchCriterionId, I18nizableText group) throws ConfigurationException
commonContentType
- the model common content type, can be null.conf
- the criteria configuration.searchCriteriaRoles
- the criteria role list to fill.searchCriterionId
- the custom criteria id.group
- The group. Can be null.ConfigurationException
- if an error occurs.protected void _configureCriteria(Map<String,SearchUICriterion> criteriaMap, List<String> criteriaRoles, boolean checkFacetable) throws ConfigurationException
criteriaMap
- the criteria map to fill.criteriaRoles
- the roles of the criteria components to lookup.checkFacetable
- true to check if the criteria are facetable.ConfigurationException
- if an error occurs.protected void _copyAdvancedCriteria(Map<String,SearchUICriterion> advancedCriteria, Collection<SearchUICriterion> criteria) throws ConfigurationException
advancedCriteria
- the criteria map to fill.criteria
- the source criteria collection.ConfigurationException
- if an error occurs.protected void _copyFacetableCriteria(Map<String,SearchUICriterion> facetedCriteria, Collection<SearchUICriterion> criteria) throws ConfigurationException
facetedCriteria
- the criteria map to fill.criteria
- the source criteria collection.ConfigurationException
- if an error occurs.protected boolean _isAdvanced(SearchUICriterion criterion)
criterion
- the search criterion to test.true
if the criterion can be used in advanced search mode, false
otherwise.protected void _addColumnsComponents(ContentType cType, Configuration configuration, List<String> columnsRolesToLookup) throws ConfigurationException
cType
- the model's common content type, can be null.configuration
- the model configuration.columnsRolesToLookup
- The list of column roles to lookup that will be filled by the method.ConfigurationException
- if an error occurs.protected void _addMetadataColumnComponents(ContentType commonContentType, Configuration conf, String metadataPath, List<String> columnsRolesToLookup) throws ConfigurationException
commonContentType
- the model common content type, can be null.conf
- the column configuration.metadataPath
- the metadata path, separated by '/'.columnsRolesToLookup
- The list to fill with the column roles to lookup when the manager is initialized.ConfigurationException
- if an error occurs.protected void _addSystemColumnComponent(ContentType commonContentType, Configuration originalConf, String property, List<String> columnsRolesToLookup) throws ConfigurationException
commonContentType
- the model common content type, can be null.originalConf
- the column configuration.property
- the system property.columnsRolesToLookup
- The list to fill with the column roles to lookup when the manager is initialized.ConfigurationException
- if an error occurs.protected void _addCustomColumnComponent(ContentType commonContentType, Configuration conf, String customId, List<String> columnsRolesToLookup) throws ConfigurationException
commonContentType
- the model common content type, can be null.conf
- the column configuration.customId
- the custom column id.columnsRolesToLookup
- The list to fill with the column roles to lookup when the manager is initialized.ConfigurationException
- if an error occurs.protected Map<String,SearchUIColumn> _configureColumns(List<String> columnRoles) throws Exception
columnRoles
- The list of column roles added to the component manager.Exception
- if an error occurs.private I18nizableText _configureI18nizableText(Configuration config, I18nizableText defaultValue) throws ConfigurationException
ConfigurationException