public abstract class AbstractSearchUIModel extends Object implements SearchUIModel, LogEnabled, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
protected Map<String,SearchUICriterion> |
_advancedSearchCriteria
The search criteria in advanced mode, indexed by ID.
|
protected Map<String,SearchUIColumn> |
_columns
The result columns, indexed by ID.
|
protected Context |
_context
The context.
|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point
|
protected Set<String> |
_cTypes
The content types of this search model.
|
protected Set<String> |
_excludedCTypes
The content types excluded from this search model.
|
protected Map<String,SearchUICriterion> |
_facetedCriteria
The search criteria used as facets, indexed by ID.
|
protected Logger |
_logger
The logger.
|
protected ServiceManager |
_manager
The service manager
|
protected Map<String,SearchUICriterion> |
_searchCriteria
The search criteria in simple mode, indexed by ID.
|
protected SearchUIModelHelper |
_searchModelHelper
The search model helper.
|
Constructor and Description |
---|
AbstractSearchUIModel() |
Modifier and Type | Method and Description |
---|---|
protected void |
addContentTypesConfiguration(DefaultConfiguration conf,
String contentTypeId)
Add the content types configuration.
|
void |
contextualize(Context context) |
Map<String,SearchUICriterion> |
getAdvancedCriteria(Map<String,Object> contextualParameters)
Get the list of search criteria in advanced mode
|
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 Configuration |
getCustomCriteriaConfiguration(Configuration originalConf,
String contentTypeId,
String customCriterionId,
I18nizableText group)
Get the configuration of a custom criteria component.
|
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.
|
protected Configuration |
getIndexingFieldCriteriaConfiguration(Configuration originalConf,
String contentTypeId,
String path,
Query.Operator operator,
I18nizableText group)
Get the configuration of a metadata criteria component.
|
protected Configuration |
getIndexingFieldCriteriaConfiguration(String contentTypeId,
String path,
Query.Operator operator)
Get the configuration of a metadata criteria component.
|
protected Configuration |
getIndexingFieldCriteriaConfiguration(String contentTypeId,
String path,
Query.Operator operator,
I18nizableText group)
Get the configuration of a metadata criteria component.
|
protected Logger |
getLogger()
Get the logger.
|
protected Configuration |
getMetadataColumnConfiguration(Configuration originalConf,
String contentTypeId,
String metadataPath)
Get the configuration of a metadata column component.
|
protected Configuration |
getMetadataColumnConfiguration(String contentTypeId,
String metadataPath)
Get the configuration of a metadata column component.
|
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
|
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
|
String |
getSummaryView()
Get the name of the view to use for summary of the content.
|
protected Configuration |
getSystemColumnConfiguration(Configuration originalConf,
String contentTypeId,
String property)
Get the configuration of a system column component.
|
protected Configuration |
getSystemColumnConfiguration(String contentTypeId,
String property)
Get the configuration of a system column component.
|
protected Configuration |
getSystemCriteriaConfiguration(Configuration originalConf,
String contentTypeId,
String property,
I18nizableText group)
Get the configuration of a system criteria component.
|
protected Configuration |
getSystemCriteriaConfiguration(String contentTypeId,
String property)
Get the configuration of a system criteria component.
|
protected Configuration |
getSystemCriteriaConfiguration(String contentTypeId,
String property,
I18nizableText group)
Get the configuration of a system criteria component.
|
String |
getWorkspace(Map<String,Object> contextualParameters)
Get the specific workspace to use.
|
void |
service(ServiceManager manager) |
void |
setAdvancedCriteria(Collection<SearchUICriterion> criteria)
Set the criteria in advanced mode.
|
void |
setContentTypes(Set<String> cTypes)
Set the content types.
|
void |
setCriteria(Collection<SearchUICriterion> criteria)
Set the criteria in simple mode.
|
void |
setExcludedContentTypes(Set<String> cTypes)
Set the excluded content types.
|
void |
setFacetedCriteria(Collection<SearchCriterion> criteria)
Set the criteria to use as facets.
|
void |
setLogger(Logger logger)
Called at creation time to provide a
Logger . |
void |
setResultFields(Collection<SearchUIColumn> fields)
Set the result columns.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion, getResultField
protected ContentTypeExtensionPoint _cTypeEP
protected SearchUIModelHelper _searchModelHelper
protected ServiceManager _manager
protected Set<String> _excludedCTypes
protected Map<String,SearchUICriterion> _searchCriteria
protected Map<String,SearchUICriterion> _advancedSearchCriteria
protected Map<String,SearchUICriterion> _facetedCriteria
protected Map<String,SearchUIColumn> _columns
public AbstractSearchUIModel()
public void setLogger(Logger logger)
LogEnabled
Logger
.setLogger
in interface LogEnabled
logger
- a Logger
for messages.public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Set<String> getContentTypes(Map<String,Object> contextualParameters)
SearchModel
getContentTypes
in interface SearchModel
contextualParameters
- the contextual parameters.public void setContentTypes(Set<String> cTypes)
cTypes
- The content types.public Set<String> getExcludedContentTypes(Map<String,Object> contextualParameters)
SearchModel
getExcludedContentTypes
in interface SearchModel
contextualParameters
- the contextual parameterspublic void setExcludedContentTypes(Set<String> cTypes)
cTypes
- The excluded content types.public Map<String,SearchUICriterion> getCriteria(Map<String,Object> contextualParameters)
SearchModel
getCriteria
in interface SearchModel
getCriteria
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic void setCriteria(Collection<SearchUICriterion> criteria)
criteria
- A collection of search criteria.public Map<String,SearchUICriterion> getAdvancedCriteria(Map<String,Object> contextualParameters)
SearchUIModel
getAdvancedCriteria
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic void setAdvancedCriteria(Collection<SearchUICriterion> criteria)
criteria
- A collection of search criteria.public Map<String,SearchUICriterion> getFacetedCriteria(Map<String,Object> contextualParameters)
SearchModel
getFacetedCriteria
in interface SearchModel
getFacetedCriteria
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic void setFacetedCriteria(Collection<SearchCriterion> criteria)
criteria
- A collection of search criteria.public Map<String,SearchUIColumn> getResultFields(Map<String,Object> contextualParameters)
SearchModel
getResultFields
in interface SearchModel
getResultFields
in interface SearchUIModel
contextualParameters
- the contextual parameters. Can be null.public void setResultFields(Collection<SearchUIColumn> fields)
fields
- A collection of search columns.public int getPageSize(Map<String,Object> contextualParameters)
SearchUIModel
getPageSize
in interface SearchUIModel
contextualParameters
- the contextual parameters.public String getWorkspace(Map<String,Object> contextualParameters)
SearchUIModel
getWorkspace
in interface SearchUIModel
contextualParameters
- the contextual parameters.public String getSearchUrl(Map<String,Object> contextualParameters)
SearchUIModel
getSearchUrl
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getSearchUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getSearchUrlPlugin
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportCSVUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportCSVUrl
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportCSVUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportCSVUrlPlugin
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportDOCUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportDOCUrl
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportDOCUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportDOCUrlPlugin
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportXMLUrl(Map<String,Object> contextualParameters)
SearchUIModel
getExportXMLUrl
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getExportXMLUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getExportXMLUrlPlugin
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getPrintUrl(Map<String,Object> contextualParameters)
SearchUIModel
getPrintUrl
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getPrintUrlPlugin(Map<String,Object> contextualParameters)
SearchUIModel
getPrintUrlPlugin
in interface SearchUIModel
contextualParameters
- the contextual parameterspublic String getSummaryView()
SearchUIModel
getSummaryView
in interface SearchUIModel
protected Configuration getIndexingFieldCriteriaConfiguration(String contentTypeId, String path, Query.Operator operator) throws ConfigurationException
contentTypeId
- the content type ID.path
- the field path.operator
- the criteria operator, can be null.ConfigurationException
- if an error occurs.protected Configuration getIndexingFieldCriteriaConfiguration(String contentTypeId, String path, Query.Operator operator, I18nizableText group) throws ConfigurationException
contentTypeId
- the content type ID.path
- the field path.operator
- the criteria operator, can be null.group
- The group. Can ne null.ConfigurationException
- if an error occurs.protected Configuration getIndexingFieldCriteriaConfiguration(Configuration originalConf, String contentTypeId, String path, Query.Operator operator, I18nizableText group) throws ConfigurationException
originalConf
- the original criteria configuration.contentTypeId
- the content type ID.path
- the field path, separated by '/'.operator
- the criteria operator, can be null.group
- The group. Can ne null.ConfigurationException
- if an error occurs.protected Configuration getSystemCriteriaConfiguration(String contentTypeId, String property)
contentTypeId
- the content type ID.property
- the system property.protected Configuration getSystemCriteriaConfiguration(String contentTypeId, String property, I18nizableText group)
contentTypeId
- the content type ID.property
- the system property.group
- The group. Can ne null.protected Configuration getSystemCriteriaConfiguration(Configuration originalConf, String contentTypeId, String property, I18nizableText group) throws ConfigurationException
originalConf
- the original column configuration.contentTypeId
- the content type ID.property
- the system property.group
- The group. Can ne null.ConfigurationException
- if an error occurs.protected Configuration getCustomCriteriaConfiguration(Configuration originalConf, String contentTypeId, String customCriterionId, I18nizableText group) throws ConfigurationException
originalConf
- the original column configuration.contentTypeId
- the content type ID.customCriterionId
- the custom criterion idgroup
- The group. Can be null.ConfigurationException
- if an error occurs.protected Configuration getMetadataColumnConfiguration(String contentTypeId, String metadataPath) throws ConfigurationException
contentTypeId
- the content type ID.metadataPath
- the metadata path.ConfigurationException
- if an error occurs.protected Configuration getMetadataColumnConfiguration(Configuration originalConf, String contentTypeId, String metadataPath) throws ConfigurationException
originalConf
- the original column configuration.contentTypeId
- the content type ID, may be null.metadataPath
- the metadata path.ConfigurationException
- if an error occurs.protected Configuration getSystemColumnConfiguration(String contentTypeId, String property) throws ConfigurationException
contentTypeId
- the content type ID.property
- the system property.ConfigurationException
- if an error occurs.protected Configuration getSystemColumnConfiguration(Configuration originalConf, String contentTypeId, String property) throws ConfigurationException
originalConf
- the original column configuration.contentTypeId
- the content type ID.property
- the system property.ConfigurationException
- if an error occurs.protected void addContentTypesConfiguration(DefaultConfiguration conf, String contentTypeId)
conf
- The configuration to write to.contentTypeId
- The "base" content type ID, may be null.