Package org.ametys.plugins.mobileapp
Class SearchModelWrapper
- java.lang.Object
-
- org.ametys.plugins.mobileapp.SearchModelWrapper
-
- All Implemented Interfaces:
SearchModel,SearchUIModel
public class SearchModelWrapper extends Object implements SearchUIModel
Wrapper for a SearchUIModel to force LastValidationSystemProperty to be in result feilds
-
-
Field Summary
Fields Modifier and Type Field Description protected Context_contextThe contextprotected org.slf4j.Logger_loggerThe loggerprotected ServiceManager_managerThe service managerprotected SearchUIModelHelper_searchModelHelperThe search model helper.
-
Constructor Summary
Constructors Constructor Description SearchModelWrapper(SearchUIModel model, ServiceManager manager, Context context, org.slf4j.Logger logger)Constructor with the SearchUIModel to wrap
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,SearchUICriterion>getAdvancedCriteria(Map<String,Object> contextualParameters)Get the list of search criteria in advanced modeSet<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 modeSet<String>getExcludedContentTypes(Map<String,Object> contextualParameters)Get the list of excluded content types.StringgetExportCSVUrl(Map<String,Object> contextualParameters)Get the URL for CSV export of resultsStringgetExportCSVUrlPlugin(Map<String,Object> contextualParameters)Get the plugin name for CSV export of resultsStringgetExportDOCUrl(Map<String,Object> contextualParameters)Get the URL for DOC export of resultsStringgetExportDOCUrlPlugin(Map<String,Object> contextualParameters)Get the plugin name for DOC export of resultsStringgetExportXMLUrl(Map<String,Object> contextualParameters)Get the URL for XML export of resultsStringgetExportXMLUrlPlugin(Map<String,Object> contextualParameters)Get the plugin name for XML export of resultsMap<String,SearchUICriterion>getFacetedCriteria(Map<String,Object> contextualParameters)Get the list of faceted search criteria.protected SearchUIColumngetLastValidationColumn(Map<String,Object> contextualParameters)Create a new SearchUIColumn for the last validation dateprotected org.slf4j.LoggergetLogger()Get the logger.intgetPageSize(Map<String,Object> contextualParameters)Get the page size.StringgetPrintUrl(Map<String,Object> contextualParameters)Get the URL for print resultsStringgetPrintUrlPlugin(Map<String,Object> contextualParameters)Get the plugin name for print resultsMap<String,SearchUIColumn>getResultFields(Map<String,Object> contextualParameters)Get the column for resultsStringgetSearchUrl(Map<String,Object> contextualParameters)Get the URL for searchStringgetSearchUrlPlugin(Map<String,Object> contextualParameters)Get the plugin name for searchStringgetSummaryView()Get the name of the view to use for summary of the content.StringgetWorkspace(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 Detail
-
_logger
protected org.slf4j.Logger _logger
The logger
-
_manager
protected ServiceManager _manager
The service manager
-
_searchModelHelper
protected SearchUIModelHelper _searchModelHelper
The search model helper.
-
-
Constructor Detail
-
SearchModelWrapper
public SearchModelWrapper(SearchUIModel model, ServiceManager manager, Context context, org.slf4j.Logger logger)
Constructor with the SearchUIModel to wrap- Parameters:
model- the SearchUIModel to wrapmanager- The service managercontext- The contextlogger- The logger
-
-
Method Detail
-
getResultFields
public Map<String,SearchUIColumn> getResultFields(Map<String,Object> contextualParameters)
Description copied from interface:SearchModelGet the column for results- Specified by:
getResultFieldsin interfaceSearchModel- Specified by:
getResultFieldsin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters. Can be null.- Returns:
- the column for results
-
getLastValidationColumn
protected SearchUIColumn getLastValidationColumn(Map<String,Object> contextualParameters) throws Exception
Create 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
public Set<String> getContentTypes(Map<String,Object> contextualParameters)
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.
-
getExcludedContentTypes
public Set<String> getExcludedContentTypes(Map<String,Object> contextualParameters)
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.
-
getCriteria
public Map<String,SearchUICriterion> getCriteria(Map<String,Object> contextualParameters)
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
-
getFacetedCriteria
public Map<String,SearchUICriterion> getFacetedCriteria(Map<String,Object> contextualParameters)
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.
-
getAdvancedCriteria
public Map<String,SearchUICriterion> getAdvancedCriteria(Map<String,Object> contextualParameters)
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
-
getPageSize
public int getPageSize(Map<String,Object> contextualParameters)
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
public String getWorkspace(Map<String,Object> contextualParameters)
Description copied from interface:SearchUIModelGet the specific workspace to use.- Specified by:
getWorkspacein interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters.- Returns:
- the workspace to use when searching, or null to use the default workspace.
-
getSearchUrl
public String getSearchUrl(Map<String,Object> contextualParameters)
Description copied from interface:SearchUIModelGet the URL for search- Specified by:
getSearchUrlin interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for search
-
getSearchUrlPlugin
public String getSearchUrlPlugin(Map<String,Object> contextualParameters)
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
public String getExportCSVUrl(Map<String,Object> contextualParameters)
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
public String getExportCSVUrlPlugin(Map<String,Object> contextualParameters)
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
public String getExportDOCUrl(Map<String,Object> contextualParameters)
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
public String getExportDOCUrlPlugin(Map<String,Object> contextualParameters)
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
public String getExportXMLUrl(Map<String,Object> contextualParameters)
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
public String getExportXMLUrlPlugin(Map<String,Object> contextualParameters)
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
-
getPrintUrl
public String getPrintUrl(Map<String,Object> contextualParameters)
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
public String getPrintUrlPlugin(Map<String,Object> contextualParameters)
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
public String 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.
-
getLogger
protected final org.slf4j.Logger getLogger()
Get the logger.- Returns:
- the logger.
-
-