Package org.ametys.cms.search.ui.model
Class AbstractSearchUIModel
java.lang.Object
org.ametys.cms.search.ui.model.AbstractSearchUIModel
- All Implemented Interfaces:
SearchModel,SearchUIModel,LogEnabled
- Direct Known Subclasses:
ReferenceTableSearchUIModel,ReferencingContentsWithSameValuesSearchUIModel,StaticSearchUIModel
Abstract class for SearchUIModel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,SearchUICriterion> The search criteria in advanced mode, indexed by ID.The content types of this search model.The content types excluded from this search model.protected Map<String,SearchUICriterion> The search criteria used as facets, indexed by ID.protected org.slf4j.LoggerThe logger.protected ViewItemContainerThe result columnsprotected Map<String,SearchUICriterion> The search criteria in simple mode, indexed by ID.protected static final StringThe default URL for CSV exportprotected static final StringThe default URL for DOC exportprotected static final StringThe default URL for PDF exportprotected static final StringThe default URL for XML exportprotected static final StringThe URL for print resultsprotected static final StringThe default URL for searchprotected static final StringThe default plugin name for URLs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdvancedCriteria(Map<String, Object> contextualParameters) Get the list of search criteria in advanced modegetContentTypes(Map<String, Object> contextualParameters) Get the list of content types.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.getExportCSVUrl(Map<String, Object> contextualParameters) Get the URL for CSV export of resultsgetExportCSVUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for CSV export of resultsgetExportDOCUrl(Map<String, Object> contextualParameters) Get the URL for DOC export of resultsgetExportDOCUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for DOC export of resultsgetExportPDFUrl(Map<String, Object> contextualParameters) Get the URL for PDF export of resultsgetExportPDFUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for PDF export of resultsgetExportXMLUrl(Map<String, Object> contextualParameters) Get the URL for XML export of resultsgetExportXMLUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for XML export of resultsgetFacetedCriteria(Map<String, Object> contextualParameters) Get the list of faceted search criteria.protected final org.slf4j.LoggerGet the logger.intgetPageSize(Map<String, Object> contextualParameters) Get the page size.getPrintUrl(Map<String, Object> contextualParameters) Get the URL for print resultsgetPrintUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for print resultsgetResultItems(Map<String, Object> contextualParameters) Retrieves the search result itemsgetSearchUrl(Map<String, Object> contextualParameters) Get the URL for searchgetSearchUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for searchGet the name of the view to use for summary of the content.getWorkspace(Map<String, Object> contextualParameters) Get the specific workspace to use.voidsetAdvancedCriteria(Collection<SearchUICriterion> criteria) Set the criteria in advanced mode.voidsetContentTypes(Set<String> cTypes) Set the content types.voidsetCriteria(Collection<SearchUICriterion> criteria) Set the criteria in simple mode.voidsetExcludedContentTypes(Set<String> cTypes) Set the excluded content types.voidsetFacetedCriteria(Collection<SearchCriterion> criteria) Set the criteria to use as facets.voidsetLogger(org.slf4j.Logger logger) Called at creation time to provide aLogger.voidsetResultItems(ViewItemContainer resultItems) Set the result itemsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.model.SearchModel
getResultItemMethods inherited from interface org.ametys.cms.search.ui.model.SearchUIModel
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion
-
Field Details
-
DEFAULT_URL_PLUGIN
The default plugin name for URLs- See Also:
-
DEFAULT_SEARCH_URL
The default URL for search- See Also:
-
DEFAULT_EXPORT_CSV_URL
The default URL for CSV export- See Also:
-
DEFAULT_EXPORT_DOC_URL
The default URL for DOC export- See Also:
-
DEFAULT_EXPORT_XML_URL
The default URL for XML export- See Also:
-
DEFAULT_EXPORT_PDF_URL
The default URL for PDF export -
DEFAULT_PRINT_URL
The URL for print results- See Also:
-
_logger
The logger. -
_cTypes
The content types of this search model. -
_excludedCTypes
The content types excluded from this search model. -
_searchCriteria
The search criteria in simple mode, indexed by ID. -
_advancedSearchCriteria
The search criteria in advanced mode, indexed by ID. -
_facetedCriteria
The search criteria used as facets, indexed by ID. -
_resultItems
The result columns
-
-
Constructor Details
-
AbstractSearchUIModel
public AbstractSearchUIModel()
-
-
Method Details
-
setLogger
Description copied from interface:LogEnabledCalled at creation time to provide aLogger.- Specified by:
setLoggerin interfaceLogEnabled- Parameters:
logger- aLoggerfor messages.
-
getLogger
Get the logger.- Returns:
- the logger.
-
getContentTypes
Description copied from interface:SearchModelGet the list of content types.- Specified by:
getContentTypesin interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters.- Returns:
- The list of content types.
-
setContentTypes
Set the content types.- Parameters:
cTypes- The content types.
-
getExcludedContentTypes
Description copied from interface:SearchModelGet the list of excluded content types.- Specified by:
getExcludedContentTypesin interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- The list of excluded content types.
-
setExcludedContentTypes
Set the excluded content types.- Parameters:
cTypes- The 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- Parameters:
contextualParameters- the contextual parameters- Returns:
- the list of search criteria in simple mode
-
setCriteria
Set the criteria in simple mode.- Parameters:
criteria- A collection of search criteria.
-
getAdvancedCriteria
Description copied from interface:SearchUIModelGet the list of search criteria in advanced mode- Specified by:
getAdvancedCriteriain interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the list of search criteria in advanced mode
-
setAdvancedCriteria
Set the criteria in advanced mode.- Parameters:
criteria- A collection of search criteria.
-
getFacetedCriteria
Description copied from interface:SearchModelGet the list of faceted search criteria.- Specified by:
getFacetedCriteriain interfaceSearchModel- Specified by:
getFacetedCriteriain interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the list of faceted search criteria.
-
setFacetedCriteria
Set the criteria to use as facets.- Parameters:
criteria- A collection of search criteria.
-
getResultItems
Description copied from interface:SearchModelRetrieves the search result items- Specified by:
getResultItemsin interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the search result items
-
setResultItems
Set the result items- Parameters:
resultItems- The result items to set
-
getPageSize
Description copied from interface:SearchUIModelGet the page size.- Specified by:
getPageSizein interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters.- Returns:
- The page size, unlimited or default used when negative or 0.
-
getWorkspace
Description copied from interface:SearchModelGet the specific workspace to use.- Specified by:
getWorkspacein interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters.- Returns:
- the workspace to use when searching, or null to use the default workspace.
-
getSearchUrl
Description copied from interface:SearchUIModelGet the URL for search- Specified by:
getSearchUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for search
-
getSearchUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for search- Specified by:
getSearchUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for search
-
getExportCSVUrl
Description copied from interface:SearchUIModelGet the URL for CSV export of results- Specified by:
getExportCSVUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for CSV export
-
getExportCSVUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for CSV export of results- Specified by:
getExportCSVUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for CSV export
-
getExportDOCUrl
Description copied from interface:SearchUIModelGet the URL for DOC export of results- Specified by:
getExportDOCUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for DOC export
-
getExportDOCUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for DOC export of results- Specified by:
getExportDOCUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for DOC export
-
getExportXMLUrl
Description copied from interface:SearchUIModelGet the URL for XML export of results- Specified by:
getExportXMLUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for XML export
-
getExportXMLUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for XML export of results- Specified by:
getExportXMLUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for XML export
-
getExportPDFUrl
Description copied from interface:SearchUIModelGet the URL for PDF export of results- Specified by:
getExportPDFUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for PDF export
-
getExportPDFUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for PDF export of results- Specified by:
getExportPDFUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for PDF export
-
getPrintUrl
Description copied from interface:SearchUIModelGet the URL for print results- Specified by:
getPrintUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for print results
-
getPrintUrlPlugin
Description copied from interface:SearchUIModelGet the plugin name for print results- Specified by:
getPrintUrlPluginin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for print results
-
getSummaryView
Description copied from interface:SearchUIModelGet the name of the view to use for summary of the content.- Specified by:
getSummaryViewin interfaceSearchUIModel- Returns:
- the name of the view to use for summary of the content. Can be null.
-