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
Modifier 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 Logger
The logger.protected ViewItemContainer
The result columnsprotected Map<String,
SearchUICriterion> The search criteria in simple mode, indexed by ID.protected static final String
The default URL for CSV exportprotected static final String
The default URL for DOC exportprotected static final String
The default URL for PDF exportprotected static final String
The default URL for XML exportprotected static final String
The URL for print resultsprotected static final String
The default URL for searchprotected static final String
The default plugin name for URLs -
Constructor Summary
-
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 Logger
Get the logger.int
getPageSize
(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.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
Called at creation time to provide aLogger
.void
setResultItems
(ViewItemContainer resultItems) Set the result itemsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.cms.search.model.SearchModel
getResultItem
Methods 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:LogEnabled
Called at creation time to provide aLogger
.- Specified by:
setLogger
in interfaceLogEnabled
- Parameters:
logger
- aLogger
for messages.
-
getLogger
Get the logger.- Returns:
- the logger.
-
getContentTypes
Description copied from interface:SearchModel
Get the list of content types.- Specified by:
getContentTypes
in 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:SearchModel
Get the list of excluded content types.- Specified by:
getExcludedContentTypes
in 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:SearchModel
Get the list of search criteria in simple mode- Specified by:
getCriteria
in interfaceSearchModel
- Specified by:
getCriteria
in 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:SearchUIModel
Get the list of search criteria in advanced mode- Specified by:
getAdvancedCriteria
in 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:SearchModel
Get the list of faceted search criteria.- Specified by:
getFacetedCriteria
in interfaceSearchModel
- Specified by:
getFacetedCriteria
in 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:SearchModel
Retrieves the search result items- Specified by:
getResultItems
in 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:SearchUIModel
Get the page size.- Specified by:
getPageSize
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters.- Returns:
- The page size, unlimited or default used when negative or 0.
-
getWorkspace
Description copied from interface:SearchModel
Get the specific workspace to use.- Specified by:
getWorkspace
in 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:SearchUIModel
Get the URL for search- Specified by:
getSearchUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for search
-
getSearchUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for search- Specified by:
getSearchUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for search
-
getExportCSVUrl
Description copied from interface:SearchUIModel
Get the URL for CSV export of results- Specified by:
getExportCSVUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for CSV export
-
getExportCSVUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for CSV export of results- Specified by:
getExportCSVUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for CSV export
-
getExportDOCUrl
Description copied from interface:SearchUIModel
Get the URL for DOC export of results- Specified by:
getExportDOCUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for DOC export
-
getExportDOCUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for DOC export of results- Specified by:
getExportDOCUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for DOC export
-
getExportXMLUrl
Description copied from interface:SearchUIModel
Get the URL for XML export of results- Specified by:
getExportXMLUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for XML export
-
getExportXMLUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for XML export of results- Specified by:
getExportXMLUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for XML export
-
getExportPDFUrl
Description copied from interface:SearchUIModel
Get the URL for PDF export of results- Specified by:
getExportPDFUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for PDF export
-
getExportPDFUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for PDF export of results- Specified by:
getExportPDFUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for PDF export
-
getPrintUrl
Description copied from interface:SearchUIModel
Get the URL for print results- Specified by:
getPrintUrl
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the URL for print results
-
getPrintUrlPlugin
Description copied from interface:SearchUIModel
Get the plugin name for print results- Specified by:
getPrintUrlPlugin
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the plugin name for print results
-
getSummaryView
Description copied from interface:SearchUIModel
Get the name of the view to use for summary of the content.- Specified by:
getSummaryView
in interfaceSearchUIModel
- Returns:
- the name of the view to use for summary of the content. Can be null.
-