Class DefaultSearchUIModel
java.lang.Object
org.ametys.cms.search.model.DefaultSearchModel
org.ametys.cms.search.ui.model.impl.DefaultSearchUIModel
- All Implemented Interfaces:
SearchModel
,SearchUIModel
Default implementation of a
SearchUIModel
.-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The URL for CSV export of resultsprotected String
The plugin name for CSV export of resultsprotected String
The URL for doc export of resultsprotected String
The plugin name for doc export of resultsprotected String
The URL for PDF export of resultsprotected String
The plugin name for PDF export of resultsprotected String
The URL for XML export of resultsprotected String
The plugin name for XML export of resultsprotected int
The page sizeprotected String
The URL for print resultsprotected String
The plugin name for print resultsprotected String
The URL for searchprotected String
The plugin name for searchprotected String
The name of the view to use for summary of the contentprotected Map<String,
SearchUICriterion> The advanced search ui criteria, indexed by ID.protected Map<String,
SearchUICriterion> The simple search ui criteria, indexed by ID.protected Map<String,
SearchUICriterion> The faceted search ui criteria, indexed by ID.Fields inherited from class org.ametys.cms.search.model.DefaultSearchModel
_criteria, _cTypes, _excludedCTypes, _facetedCriteria, _resultItems, _workspace
-
Constructor Summary
ConstructorDescriptionDefault constructor.DefaultSearchUIModel
(SearchUIModel searchUIModelToCopy, Map<String, Object> contextualParameters) Constructor by copying an existingSearchUIModel
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdvancedCriterion
(SearchUICriterion criterion) Add an advanced criterionvoid
addCriterion
(SearchCriterion criterion) Add a criterionvoid
addFacetedCriterion
(SearchCriterion criterion) Add a faceted criteriongetAdvancedCriteria
(Map<String, Object> contextualParameters) Get the list of search criteria in advanced modegetCriteria
(Map<String, Object> contextualParameters) Get the list of search criteria in simple modegetExportCSVUrl
(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.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 resultsgetSearchUrl
(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.void
setAdvancedCriteria
(Collection<? extends SearchUICriterion> criteria) Set the advanced criteriavoid
setCriteria
(Collection<? extends SearchCriterion> criteria) Set the criteriavoid
setExportCSVUrl
(String exportCSVUrl) Set the URL for CSV export of resultsvoid
setExportCSVUrlPlugin
(String exportCSVUrlPlugin) Set the plugin name for CSV export of resultsvoid
setExportDOCUrl
(String exportDOCUrl) Set the URL for Doc export of resultsvoid
setExportDOCUrlPlugin
(String exportDOCUrlPlugin) Set the plugin name for Doc export of resultsvoid
setExportPDFUrl
(String exportPDFUrl) Set the URL for PDF export of resultsvoid
setExportPDFUrlPlugin
(String exportPDFUrlPlugin) Set the plugin name for PDF export of resultsvoid
setExportXMLUrl
(String exportXMLUrl) Set the URL for XML export of resultsvoid
setExportXMLUrlPlugin
(String exportXMLUrlPlugin) Set the plugin name for XML export of resultsvoid
setFacetedCriteria
(Collection<? extends SearchCriterion> criteria) Set the faceted criteriavoid
setPageSize
(int pageSize) Set the page sizevoid
setPrintUrl
(String printUrl) Set the URL for print resultsvoid
setPrintUrlPlugin
(String printUrlPlugin) Set the plugin name for print resultsvoid
setSearchUrl
(String searchUrl) Set the URL for searchvoid
setSearchUrlPlugin
(String searchUrlPlugin) Set the plugin name for searchvoid
setSummaryView
(String summaryView) Set The name of the view to use for summary of the contentMethods inherited from class org.ametys.cms.search.model.DefaultSearchModel
getContentTypes, getExcludedContentTypes, getResultItems, getWorkspace, setContentTypes, setExcludedContentTypes, setResulItems, setWorkspace
Methods 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
getContentTypes, getExcludedContentTypes, getResultItem, getResultItems, getWorkspace
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUIModel
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion
-
Field Details
-
_uiCriteria
The simple search ui criteria, indexed by ID. -
_uiFacetedCriteria
The faceted search ui criteria, indexed by ID. -
_uiAdvancedCriteria
The advanced search ui criteria, indexed by ID. -
_pageSize
The page size -
_searchUrl
The URL for search -
_searchUrlPlugin
The plugin name for search -
_exportCSVUrl
The URL for CSV export of results -
_exportCSVUrlPlugin
The plugin name for CSV export of results -
_exportDOCUrl
The URL for doc export of results -
_exportDOCUrlPlugin
The plugin name for doc export of results -
_exportXMLUrl
The URL for XML export of results -
_exportXMLUrlPlugin
The plugin name for XML export of results -
_exportPDFUrl
The URL for PDF export of results -
_exportPDFUrlPlugin
The plugin name for PDF export of results -
_printUrl
The URL for print results -
_printUrlPlugin
The plugin name for print results -
_summaryView
The name of the view to use for summary of the content
-
-
Constructor Details
-
DefaultSearchUIModel
public DefaultSearchUIModel()Default constructor. -
DefaultSearchUIModel
public DefaultSearchUIModel(SearchUIModel searchUIModelToCopy, Map<String, Object> contextualParameters) Constructor by copying an existingSearchUIModel
.- Parameters:
searchUIModelToCopy
- TheSearchUIModel
to copycontextualParameters
- The contextual parameters
-
-
Method Details
-
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
- Overrides:
getCriteria
in classDefaultSearchModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the list of search criteria in simple mode
-
addCriterion
Description copied from class:DefaultSearchModel
Add a criterion- Overrides:
addCriterion
in classDefaultSearchModel
- Parameters:
criterion
- the criterion to add
-
setCriteria
Description copied from class:DefaultSearchModel
Set the criteria- Overrides:
setCriteria
in classDefaultSearchModel
- Parameters:
criteria
- The criteria list
-
getFacetedCriteria
Description copied from interface:SearchModel
Get the list of faceted search criteria.- Specified by:
getFacetedCriteria
in interfaceSearchModel
- Specified by:
getFacetedCriteria
in interfaceSearchUIModel
- Overrides:
getFacetedCriteria
in classDefaultSearchModel
- Parameters:
contextualParameters
- the contextual parameters- Returns:
- the list of faceted search criteria.
-
addFacetedCriterion
Description copied from class:DefaultSearchModel
Add a faceted criterion- Overrides:
addFacetedCriterion
in classDefaultSearchModel
- Parameters:
criterion
- the faceted criterion to add
-
setFacetedCriteria
Description copied from class:DefaultSearchModel
Set the faceted criteria- Overrides:
setFacetedCriteria
in classDefaultSearchModel
- Parameters:
criteria
- The list of faceted 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
-
addAdvancedCriterion
Add an advanced criterion- Parameters:
criterion
- the advanced criterion to add
-
setAdvancedCriteria
Set the advanced criteria- Parameters:
criteria
- The list of advanced criterion
-
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.
-
setPageSize
Set the page size- Parameters:
pageSize
- The page size to set. Set to negative or 0 for unlimited or default
-
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
-
setSearchUrl
Set the URL for search- Parameters:
searchUrl
- The URL to set
-
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
-
setSearchUrlPlugin
Set the plugin name for search- Parameters:
searchUrlPlugin
- the plugin name to set
-
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
-
setExportCSVUrl
Set the URL for CSV export of results- Parameters:
exportCSVUrl
- The URL to set
-
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
-
setExportCSVUrlPlugin
Set the plugin name for CSV export of results- Parameters:
exportCSVUrlPlugin
- the plugin name to set
-
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
-
setExportDOCUrl
Set the URL for Doc export of results- Parameters:
exportDOCUrl
- The URL to set
-
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
-
setExportDOCUrlPlugin
Set the plugin name for Doc export of results- Parameters:
exportDOCUrlPlugin
- the plugin name to set
-
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
-
setExportXMLUrl
Set the URL for XML export of results- Parameters:
exportXMLUrl
- The URL to set
-
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
-
setExportXMLUrlPlugin
Set the plugin name for XML export of results- Parameters:
exportXMLUrlPlugin
- the plugin name to set
-
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
-
setExportPDFUrl
Set the URL for PDF export of results- Parameters:
exportPDFUrl
- The URL to set
-
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
-
setExportPDFUrlPlugin
Set the plugin name for PDF export of results- Parameters:
exportPDFUrlPlugin
- the plugin name to set
-
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
-
setPrintUrl
Set the URL for print results- Parameters:
printUrl
- The URL to set
-
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
-
setPrintUrlPlugin
Set the plugin name for print results- Parameters:
printUrlPlugin
- the plugin name to set
-
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.
-
setSummaryView
Set The name of the view to use for summary of the content- Parameters:
summaryView
- the name to set
-