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
public class ContentSearcherFactory extends AbstractLogEnabled implements Component, Serviceable
Component creating content searchers fromSearchModel
s or content type IDs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ContentSearcherFactory.SearchModelContentSearcher
A ContentSearcher backed by aSearchModel
.class
ContentSearcherFactory.SimpleContentSearcher
A ContentSearcher on a list of content types.
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint
_cTypeEP
The content type extension point.protected ContentTypesHelper
_cTypeHelper
The content type helper.protected QueryBuilder
_queryBuilder
The query builder.protected SearcherFactory
_searcherFactory
The searcher factory.protected ContentSearchHelper
_searchHelper
The search helper.protected SystemPropertyExtensionPoint
_sysPropEP
The system property extension point.static String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description ContentSearcherFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentSearcherFactory.SimpleContentSearcher
create(String... contentTypes)
Create a simple ContentSearcher from a list of content types.ContentSearcherFactory.SimpleContentSearcher
create(Collection<String> contentTypes)
Create a simple ContentSearcher from a list of content types.ContentSearcherFactory.SearchModelContentSearcher
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 Detail
-
_searcherFactory
protected SearcherFactory _searcherFactory
The searcher factory.
-
_queryBuilder
protected QueryBuilder _queryBuilder
The query builder.
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point.
-
_cTypeHelper
protected ContentTypesHelper _cTypeHelper
The content type helper.
-
_sysPropEP
protected SystemPropertyExtensionPoint _sysPropEP
The system property extension point.
-
_searchHelper
protected ContentSearchHelper _searchHelper
The search helper.
-
-
Constructor Detail
-
ContentSearcherFactory
public ContentSearcherFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
create
public ContentSearcherFactory.SearchModelContentSearcher create(SearchModel searchModel)
Create a ContentSearcher from a search model.- Parameters:
searchModel
- The reference search model.- Returns:
- a ContentSearcher backed by the given search model.
-
create
public ContentSearcherFactory.SimpleContentSearcher create(String... contentTypes)
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
public ContentSearcherFactory.SimpleContentSearcher create(Collection<String> contentTypes)
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.
-
-