Package org.ametys.cms.search.ui.model
Interface SearchUIModel
- All Superinterfaces:
Labelable,Model,ModelItemAccessor,ModelItemContainer,SearchModel
- All Known Implementing Classes:
DefaultSearchUIModel,ReferenceTableSearchUIModel,ReferencingContentsWithSameValuesSearchUIModel,SearchModelWrapper,SkillSearchUIModel,StaticSearchUIModel
Search tool model.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTag to indicate that a search model is public -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddAdvancedCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Add the given criterion to the advanced criteriadefault voidaddAdvancedCriterion(SearchModelCriterionViewItem criterion, Map<String, Object> contextualParameters) Add the given criterion to the advanced criteriadefault voidaddCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Add the given criterion to the simple criteriadefault voidaddCriterion(ViewItem criterion, Map<String, Object> contextualParameters) Add the given criterion to the simple criteriadefault voidaddFacetedCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Add the given criterion to the faceted criteriadefault voidaddFacetedCriterion(SearchModelCriterionViewItem criterion, Map<String, Object> contextualParameters) Add the given criterion to the faceted criteriagetAdvancedCriteria(Map<String, Object> contextualParameters) Retrieves the criteria in advanced modedefault ModelViewItemgetAdvancedCriterion(String name, Map<String, Object> contextualParameters) Retrieves the advanced criterion with the given namegetExportCSVUrl(Map<String, Object> contextualParameters) Get the URL for CSV export of resultsgetExportCSVUrlPlugin(Map<String, Object> contextualParameters) Get the plugin name for CSV export of resultsintgetPageSize(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.getTags()Get the registered tags for this search modelbooleanDetermines if the search model has the given tagdefault booleanisPublic()Get whether the search model is publicMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItemMethods inherited from interface org.ametys.cms.search.model.SearchModel
getContentTypes, getCriteria, getCriterion, getExcludedContentTypes, getFacetedCriteria, getFacetedCriterion, getFamilyId, getId, getModelItems, getResultItem, getResultItems, getWorkspace, resultItemsToJSON, toJSON
-
Field Details
-
TAG_PUBLIC
Tag to indicate that a search model is public- See Also:
-
-
Method Details
-
addCriterion
default void addCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Description copied from interface:SearchModelAdd the given criterion to the simple criteria- Specified by:
addCriterionin interfaceSearchModel- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
addCriterion
Add the given criterion to the simple criteria- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
addFacetedCriterion
default void addFacetedCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Description copied from interface:SearchModelAdd the given criterion to the faceted criteria- Specified by:
addFacetedCriterionin interfaceSearchModel- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
addFacetedCriterion
default void addFacetedCriterion(SearchModelCriterionViewItem criterion, Map<String, Object> contextualParameters) Add the given criterion to the faceted criteria- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
getAdvancedCriteria
Retrieves the criteria in advanced mode- Parameters:
contextualParameters- the contextual parameters- Returns:
- the criteria in advanced mode
-
getAdvancedCriterion
Retrieves the advanced criterion with the given name- Parameters:
name- The name of the faceted criterion to retrievecontextualParameters- the contextual parameters- Returns:
- the advanced criterion or
nullif not found
-
addAdvancedCriterion
default void addAdvancedCriterion(SearchModelCriterionDefinition criterion, Map<String, Object> contextualParameters) Add the given criterion to the advanced criteria- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
addAdvancedCriterion
default void addAdvancedCriterion(SearchModelCriterionViewItem criterion, Map<String, Object> contextualParameters) Add the given criterion to the advanced criteria- Parameters:
criterion- the criterion to addcontextualParameters- the contextual parameters
-
getPageSize
Get the page size.- Parameters:
contextualParameters- the contextual parameters.- Returns:
- The page size, unlimited or default used when negative or 0.
-
getSearchUrl
Get the URL for search- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for search
-
getSearchUrlPlugin
Get the plugin name for search- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for search
-
getExportCSVUrl
Get the URL for CSV export of results- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for CSV export
-
getExportCSVUrlPlugin
Get the plugin name for CSV export of results- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for CSV export
-
getPrintUrl
Get the URL for print results- Parameters:
contextualParameters- the contextual parameters- Returns:
- the URL for print results
-
getPrintUrlPlugin
Get the plugin name for print results- Parameters:
contextualParameters- the contextual parameters- Returns:
- the plugin name for print results
-
getSummaryView
Get the name of the view to use for summary of the content.- Returns:
- the name of the view to use for summary of the content. Can be null.
-
hasTag
Determines if the search model has the given tag- Parameters:
tagName- The tag name- Returns:
- true if the search model is tagged with the given tag name
-
getTags
Get the registered tags for this search model- Returns:
- the tags
-
isPublic
Get whether the search model is public- Returns:
- true if the model is public, false if it is private.
-