Interface QualifierProvider
- All Known Implementing Classes:
CurrencyQualifierProvider,CurrencyQualifierProvider,LanguageQualifierProvider,NoOpQualifierProvider
public interface QualifierProvider
This interface provides support for different types of qualifiers.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyQualifier(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.getAvailableQualifiers(FacetSearchConfig facetSearchConfig, IndexedType indexedType) Returns all the possible qualifiers for a given index configuration and indexed type.Returns the current qualifier.Returns all the supported types by this provider.
-
Method Details
-
getSupportedTypes
Returns all the supported types by this provider.- Returns:
- the supported types
-
getAvailableQualifiers
Collection<Qualifier> getAvailableQualifiers(FacetSearchConfig facetSearchConfig, IndexedType indexedType) Returns all the possible qualifiers for a given index configuration and indexed type.- Parameters:
facetSearchConfig- - the facet search configurationindexedType- - the indexed type- Returns:
- the available qualifiers
-
canApply
Checks if qualifiers can be applied/used with the indexed property passed as parameter.- Parameters:
indexedProperty- - the indexed property- Returns:
trueif qualifiers can be used,falseotherwise
-
applyQualifier
Applies 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.- Parameters:
qualifier- - theQualifierto be applied
-
getCurrentQualifier
Qualifier getCurrentQualifier()Returns the current qualifier. This normally consists in getting some attributes from the session and creating the corresponding qualifier.- Returns:
- the current qualifier
-