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 fromSearchModels or content type IDs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classContentSearcherFactory.SearchModelContentSearcherA ContentSearcher backed by aSearchModel.classContentSearcherFactory.SimpleContentSearcherA ContentSearcher on a list of content types.
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint_cTypeEPThe content type extension point.protected ContentTypesHelper_cTypeHelperThe content type helper.protected QueryBuilder_queryBuilderThe query builder.protected SearcherFactory_searcherFactoryThe searcher factory.protected ContentSearchHelper_searchHelperThe search helper.protected SystemPropertyExtensionPoint_sysPropEPThe system property extension point.static StringROLEThe component role.
-
Constructor Summary
Constructors Constructor Description ContentSearcherFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentSearcherFactory.SimpleContentSearchercreate(String... contentTypes)Create a simple ContentSearcher from a list of content types.ContentSearcherFactory.SimpleContentSearchercreate(Collection<String> contentTypes)Create a simple ContentSearcher from a list of content types.ContentSearcherFactory.SearchModelContentSearchercreate(SearchModel searchModel)Create a ContentSearcher from a search model.voidservice(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:
servicein 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.
-
-