Class LanguageQualifierProvider
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.LanguageQualifierProvider
-
- All Implemented Interfaces:
QualifierProvider
public class LanguageQualifierProvider extends java.lang.Object implements QualifierProvider
Qualifier provider for languages.The available qualifiers will be created based on the configured languages for the index configuration (see
IndexConfig.getLanguages()).It supports the following types:
LanguageModelLocale
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classLanguageQualifierProvider.LanguageQualifier
-
Constructor Summary
Constructors Constructor Description LanguageQualifierProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyQualifier(Qualifier qualifier)Applies the qualifier passed as parameter.booleancanApply(IndexedProperty indexedProperty)Checks if qualifiers can be applied/used with the indexed property passed as parameter.java.util.Collection<Qualifier>getAvailableQualifiers(FacetSearchConfig facetSearchConfig, IndexedType indexedType)Returns all the possible qualifiers for a given index configuration and indexed type.CommonI18NServicegetCommonI18NService()QualifiergetCurrentQualifier()Returns the current qualifier.java.util.Set<java.lang.Class<?>>getSupportedTypes()Returns all the supported types by this provider.voidsetCommonI18NService(CommonI18NService commonI18NService)
-
-
-
Method Detail
-
getCommonI18NService
public CommonI18NService getCommonI18NService()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
getSupportedTypes
public java.util.Set<java.lang.Class<?>> getSupportedTypes()
Description copied from interface:QualifierProviderReturns all the supported types by this provider.- Specified by:
getSupportedTypesin interfaceQualifierProvider- Returns:
- the supported types
-
getAvailableQualifiers
public java.util.Collection<Qualifier> getAvailableQualifiers(FacetSearchConfig facetSearchConfig, IndexedType indexedType)
Description copied from interface:QualifierProviderReturns all the possible qualifiers for a given index configuration and indexed type.- Specified by:
getAvailableQualifiersin interfaceQualifierProvider- Parameters:
facetSearchConfig- - the facet search configurationindexedType- - the indexed type- Returns:
- the available qualifiers
-
canApply
public boolean canApply(IndexedProperty indexedProperty)
Description copied from interface:QualifierProviderChecks if qualifiers can be applied/used with the indexed property passed as parameter.- Specified by:
canApplyin interfaceQualifierProvider- Parameters:
indexedProperty- - the indexed property- Returns:
trueif qualifiers can be used,falseotherwise
-
applyQualifier
public void applyQualifier(Qualifier qualifier)
Description copied from interface:QualifierProviderApplies the qualifier passed as parameter. This normally consists in setting some attributes on the session, e.g. by calling a service to set the current session language, currency, etc.- Specified by:
applyQualifierin interfaceQualifierProvider- Parameters:
qualifier- - theQualifierto be applied
-
getCurrentQualifier
public Qualifier getCurrentQualifier()
Description copied from interface:QualifierProviderReturns the current qualifier. This normally consists in getting some attributes from the session and creating the corresponding qualifier.- Specified by:
getCurrentQualifierin interfaceQualifierProvider- Returns:
- the current qualifier
-
-