Package org.ametys.cms.search.content
Class ContentSearcherFactory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.search.content.ContentSearcherFactory
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Component creating content searchers from
SearchModel
s or content type IDs.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Record representing a sort criterion.class
A ContentSearcher backed by aSearchModel
.class
A ContentSearcher on a list of content types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypesHelper
The content type helper.protected ContentTypeExtensionPoint
The content type extension point.protected QueryBuilder
The query builder.protected SearcherFactory
The searcher factory.protected ContentSearchHelper
The search helper.protected SearchModelHelper
The search model helperprotected SystemPropertyExtensionPoint
The system property extension point.static final String
The component role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a simple ContentSearcher from a list of content types.create
(Collection<String> contentTypes) Create a simple ContentSearcher from a list of content types.create
(SearchModel searchModel) Create a ContentSearcher from a search model.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role. -
_searcherFactory
The searcher factory. -
_queryBuilder
The query builder. -
_cTypeEP
The content type extension point. -
_contentTypesHelper
The content type helper. -
_sysPropEP
The system property extension point. -
_searchHelper
The search helper. -
_searchModelHelper
The search model helper
-
-
Constructor Details
-
ContentSearcherFactory
public ContentSearcherFactory()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
create
Create a ContentSearcher from a search model.- Parameters:
searchModel
- The reference search model.- Returns:
- a ContentSearcher backed by the given search model.
-
create
Create a simple ContentSearcher from a list of content types.- Parameters:
contentTypes
- The content types to search on.- Returns:
- a ContentSearcher referencing the given content types.
-
create
Create a simple ContentSearcher from a list of content types.- Parameters:
contentTypes
- The content types to search on.- Returns:
- a ContentSearcher referencing the given content types.
-