Package org.ametys.cms.trash.model
Class TrashSearchModel
java.lang.Object
org.ametys.cms.trash.model.TrashSearchModel
- All Implemented Interfaces:
Component
,Serviceable
- Direct Known Subclasses:
WebTrashSearchModel
This class represent the search model for trash elements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the facet definitions as list.Get the facets values for the search tool.The filter queries to retrieve the trash elementGet the query from search criteria.getSortDefinitions
(String sortString, String groupString) Get the sort definitions depending on search sorts and groups.protected SearchUIColumn
modelItem2Column
(ModelItem modelItem) Convert the model item to search ui columnvoid
service
(ServiceManager serviceManager) toJSON()
Get the JSON representation of theTrashSearchModel
.
-
Field Details
-
ROLE
The avalon role
-
-
Constructor Details
-
TrashSearchModel
public TrashSearchModel()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
toJSON
Get the JSON representation of theTrashSearchModel
.- Returns:
- the search model as JSON
-
getFilterQueries
The filter queries to retrieve the trash element- Returns:
- a list of queries to apply
-
getQuery
Get the query from search criteria.- Parameters:
criteria
- the search criteria- Returns:
- a Solr query
-
getFacetDefinitions
Get the facet definitions as list.- Returns:
- a list of facet definitions
-
getFacetsValues
Get the facets values for the search tool.- Parameters:
facetResults
- the facets results from the search- Returns:
- the facets values
-
getSortDefinitions
public List<SearcherFactory.SortDefinition> getSortDefinitions(String sortString, String groupString) Get the sort definitions depending on search sorts and groups.- Parameters:
sortString
- the sortsgroupString
- the groups- Returns:
- the list of sort definitions.
-
modelItem2Column
Convert the model item to search ui column- Parameters:
modelItem
- the model item- Returns:
- the column
-