Package org.ametys.cms.search.solr
Class SolrQueryHelper
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.search.solr.SolrQueryHelper
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class SolrQueryHelper extends AbstractLogEnabled implements Component, Serviceable
Helper for solr query editor.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypesHelper
_contentTypesHelper
The content types helper.protected ContentTypeExtensionPoint
_cTypeEP
The content type extension point.protected SearchUIModelExtensionPoint
_searchModelManager
The search model helper.protected SystemPropertyExtensionPoint
_systemPropertyEP
The extension point for system propertiesstatic String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description SolrQueryHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getAllContentTypeIndexingFields(String language)
Get all the content types and their indexing fields.Map<String,Object>
getCommonAncestors(Collection<String> contentTypes)
Get content types' common ancestors.Map<String,Object>
getCommonFields(String language)
Get the common fields.void
service(ServiceManager serviceManager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point.
-
_contentTypesHelper
protected ContentTypesHelper _contentTypesHelper
The content types helper.
-
_searchModelManager
protected SearchUIModelExtensionPoint _searchModelManager
The search model helper.
-
_systemPropertyEP
protected SystemPropertyExtensionPoint _systemPropertyEP
The extension point for system properties
-
-
Constructor Detail
-
SolrQueryHelper
public SolrQueryHelper()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getAllContentTypeIndexingFields
public Map<String,Object> getAllContentTypeIndexingFields(String language)
Get all the content types and their indexing fields.- Parameters:
language
- the query language (because string field names are language-dependent).- Returns:
- the content types and their metadatas.
-
getCommonAncestors
public Map<String,Object> getCommonAncestors(Collection<String> contentTypes)
Get content types' common ancestors.- Parameters:
contentTypes
- The content types.- Returns:
- a Map with the common ancestors
-
getCommonFields
public Map<String,Object> getCommonFields(String language)
Get the common fields.- Parameters:
language
- the query language (because string field names are language-dependent).- Returns:
- the common fields.
-
-