Package org.ametys.plugins.mobileapp
Class SearchModelWrapper
java.lang.Object
org.ametys.plugins.mobileapp.SearchModelWrapper
- All Implemented Interfaces:
SearchModel,SearchUIModel,Model,ModelItemAccessor,ModelItemContainer,Labelable
Wrapper for a SearchUIModel to force LastValidationSystemProperty to be in result fields
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.slf4j.LoggerThe loggerprotected ServiceManagerThe service managerprotected SystemPropertyExtensionPointThe SystemProperty extension pointFields inherited from interface org.ametys.cms.search.ui.model.SearchUIModel
TAG_PUBLIC -
Constructor Summary
ConstructorsConstructorDescriptionSearchModelWrapper(SearchUIModel model, ServiceManager manager, org.slf4j.Logger logger) Constructor with the SearchUIModel to wrap -
Method Summary
Modifier and TypeMethodDescriptiongetAdvancedCriteria(Map<String, Object> contextualParameters) Retrieves the criteria in advanced modegetContentTypes(Map<String, Object> contextualParameters) Get the list of content types.getCriteria(Map<String, Object> contextualParameters) Retrieves the criteria in simple modeRetrieves the description.getExcludedContentTypes(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 resultsgetFacetedCriteria(Map<String, Object> contextualParameters) Retrieves the faceted criteria.getLabel()Retrieves the label.protected final org.slf4j.LoggerGet the logger.getName()Get the name.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.protected SystemPropertyExtensionPointRetrieves theSystemPropertyExtensionPointgetTags()Get the registered tags for this search modelgetWorkspace(Map<String, Object> contextualParameters) Get the specific workspace to use.booleanDetermines if the search model has the given tagresultItemsToJSON(Map<String, Object> contextualParameters) Converts the search model's result items on a JSON listConverts the search model in a JSON mapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.cms.search.model.SearchModel
getCriterion, getFacetedCriterion, getFamilyId, getId, getModelItems, getResultItemMethods inherited from interface org.ametys.cms.search.ui.model.SearchUIModel
addAdvancedCriterion, addAdvancedCriterion, addCriterion, addCriterion, addFacetedCriterion, addFacetedCriterion, getAdvancedCriterion, isPublic
-
Field Details
-
_logger
The logger -
_manager
The service manager -
_systemPropertyExtensionPoint
The SystemProperty extension point
-
-
Constructor Details
-
SearchModelWrapper
Constructor with the SearchUIModel to wrap- Parameters:
model- the SearchUIModel to wrapmanager- The service managerlogger- The logger
-
-
Method Details
-
getResultItems
Description copied from interface:SearchModelRetrieves the search result items- Specified by:
getResultItemsin interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the search result items
-
getSystemPropertyExtensionPoint
Retrieves theSystemPropertyExtensionPoint- Returns:
- The
SystemPropertyExtensionPoint - Throws:
ServiceException- if an error occurs while looking to the extension point up
-
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.
-
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.
-
getCriteria
Description copied from interface:SearchModelRetrieves the criteria in simple mode- Specified by:
getCriteriain interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the criteria in simple mode
-
getFacetedCriteria
Description copied from interface:SearchModelRetrieves the faceted criteria.- Specified by:
getFacetedCriteriain interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the faceted criteria.
-
getAdvancedCriteria
Description copied from interface:SearchUIModelRetrieves the criteria in advanced mode- Specified by:
getAdvancedCriteriain interfaceSearchUIModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the criteria in advanced mode
-
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
-
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.
-
toJSON
Description copied from interface:SearchModelConverts the search model in a JSON map- Specified by:
toJSONin interfaceSearchModel- Parameters:
contextualParameters- The contextual parameters- Returns:
- the search model as a JSON map
-
resultItemsToJSON
Description copied from interface:SearchModelConverts the search model's result items on a JSON list- Specified by:
resultItemsToJSONin interfaceSearchModel- Parameters:
contextualParameters- The contextual parameters- Returns:
- the result items as a JSON list
-
getLogger
Get the logger.- Returns:
- the logger.
-
getName
Description copied from interface:LabelableGet the name. -
getLabel
Description copied from interface:LabelableRetrieves the label. -
getDescription
Description copied from interface:LabelableRetrieves the description.- Specified by:
getDescriptionin interfaceLabelable- Returns:
- the description.
-
hasTag
Description copied from interface:SearchUIModelDetermines if the search model has the given tag- Specified by:
hasTagin interfaceSearchUIModel- Parameters:
tagName- The tag name- Returns:
- true if the search model is tagged with the given tag name
-
getTags
Description copied from interface:SearchUIModelGet the registered tags for this search model- Specified by:
getTagsin interfaceSearchUIModel- Returns:
- the tags
-