Package org.ametys.cms.search.model
Class DefaultSearchModel
java.lang.Object
org.ametys.cms.search.model.DefaultSearchModel
- All Implemented Interfaces:
SearchModel
Default implementation of a
SearchModel.-
Field Summary
FieldsModifier and TypeFieldDescriptionThe content types of this search model.The content types excluded from this search model.protected Map<String,SearchCriterion> The faceted search criteria, indexed by ID.protected Map<String,ResultField> The simple search criteria, indexed by ID.protected Map<String,SearchCriterion> The simple search criteria, indexed by ID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContentTypes(Map<String, Object> contextualParameters) Get the list of content types.Map<String,? extends SearchCriterion> 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.Map<String,? extends SearchCriterion> getFacetedCriteria(Map<String, Object> contextualParameters) Get the list of faceted search criteria.Map<String,? extends ResultField> getResultFields(Map<String, Object> contextualParameters) Get the column for resultsvoidsetContentTypes(Set<String> cTypes) Set the content types of the modelsvoidsetCriteria(Collection<? extends SearchCriterion> criteria) Set the criteriavoidsetExcludedContentTypes(Set<String> cTypes) Set the content types to excludevoidsetFacetedCriteria(Collection<? extends SearchCriterion> criteria) Set the faceted criteriavoidsetResultFields(Collection<? extends ResultField> fields) Set the result fieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.model.SearchModel
getCriterion, getFacetedCriterion, getResultField
-
Field Details
-
_cTypes
The content types of this search model. -
_excludedCTypes
The content types excluded from this search model. -
_searchCriteria
The simple search criteria, indexed by ID. -
_facetedCriteria
The faceted search criteria, indexed by ID. -
_resultFields
The simple search criteria, indexed by ID.
-
-
Constructor Details
-
DefaultSearchModel
public DefaultSearchModel()
-
-
Method Details
-
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.
-
setContentTypes
Set the content types of the models- Parameters:
cTypes- The 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.
-
setExcludedContentTypes
Set the content types to exclude- Parameters:
cTypes- The content types to exclude
-
getCriteria
Description copied from interface:SearchModelGet the list of search criteria in simple mode- Specified by:
getCriteriain interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the list of search criteria in simple mode
-
setCriteria
Set the criteria- Parameters:
criteria- The criterion list
-
getFacetedCriteria
public Map<String,? extends SearchCriterion> getFacetedCriteria(Map<String, Object> contextualParameters) Description copied from interface:SearchModelGet the list of faceted search criteria.- Specified by:
getFacetedCriteriain interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters- Returns:
- the list of faceted search criteria.
-
setFacetedCriteria
Set the faceted criteria- Parameters:
criteria- The list of faceted criterion
-
getResultFields
Description copied from interface:SearchModelGet the column for results- Specified by:
getResultFieldsin interfaceSearchModel- Parameters:
contextualParameters- the contextual parameters. Can be null.- Returns:
- the column for results
-
setResultFields
Set the result fields- Parameters:
fields- The list of result field
-