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
Modifier 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
-
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 resultsvoid
setContentTypes
(Set<String> cTypes) Set the content types of the modelsvoid
setCriteria
(Collection<? extends SearchCriterion> criteria) Set the criteriavoid
setExcludedContentTypes
(Set<String> cTypes) Set the content types to excludevoid
setFacetedCriteria
(Collection<? extends SearchCriterion> criteria) Set the faceted criteriavoid
setResultFields
(Collection<? extends ResultField> fields) Set the result fieldsMethods 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.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:SearchModel
Get the list of content types.- Specified by:
getContentTypes
in 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: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.
-
setExcludedContentTypes
Set the content types to exclude- Parameters:
cTypes
- The content types to exclude
-
getCriteria
Description copied from interface:SearchModel
Get the list of search criteria in simple mode- Specified by:
getCriteria
in 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:SearchModel
Get the list of faceted search criteria.- Specified by:
getFacetedCriteria
in 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:SearchModel
Get the column for results- Specified by:
getResultFields
in 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
-