Package org.ametys.plugins.mobileapp
Class SearchModelWrapper
java.lang.Object
org.ametys.plugins.mobileapp.SearchModelWrapper
- All Implemented Interfaces:
SearchModel
,SearchUIModel
Wrapper for a SearchUIModel to force LastValidationSystemProperty to be in result feilds
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The contextprotected Logger
The loggerprotected ServiceManager
The service managerprotected SearchUIModelHelper
The search model helper. -
Constructor Summary
ConstructorDescriptionSearchModelWrapper
(SearchUIModel model, ServiceManager manager, Context context, Logger logger) Constructor with the SearchUIModel to wrap -
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 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 SearchUIColumn
getLastValidationColumn
(Map<String, Object> contextualParameters) Create a new SearchUIColumn for the last validation dateprotected 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 resultsgetResultFields
(Map<String, Object> contextualParameters) Get the column for 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.getWorkspace
(Map<String, Object> contextualParameters) Get the specific workspace to use.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.ui.model.SearchUIModel
allowSortOnMultipleJoin, getAdvancedCriterion, getCriterion, getFacetedCriterion, getResultField
-
Field Details
-
_logger
The logger -
_manager
The service manager -
_context
The context -
_searchModelHelper
The search model helper.
-
-
Constructor Details
-
SearchModelWrapper
public SearchModelWrapper(SearchUIModel model, ServiceManager manager, Context context, Logger logger) Constructor with the SearchUIModel to wrap- Parameters:
model
- the SearchUIModel to wrapmanager
- The service managercontext
- The contextlogger
- The logger
-
-
Method Details
-
getResultFields
Description copied from interface:SearchModel
Get the column for results- Specified by:
getResultFields
in interfaceSearchModel
- Specified by:
getResultFields
in interfaceSearchUIModel
- Parameters:
contextualParameters
- the contextual parameters. Can be null.- Returns:
- the column for results
-
getLastValidationColumn
protected SearchUIColumn getLastValidationColumn(Map<String, Object> contextualParameters) throws ExceptionCreate a new SearchUIColumn for the last validation date- Parameters:
contextualParameters
- the contextual parameters. Can be null.- Returns:
- a new SearchUIColumn for the last validation date
- Throws:
Exception
- something went wrong
-
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.
-
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.
-
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
-
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.
-
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
-
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:SearchUIModel
Get the specific workspace to use.- Specified by:
getWorkspace
in interfaceSearchUIModel
- 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
-
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.
-
getLogger
Get the logger.- Returns:
- the logger.
-