Interface QualifierProvider
-
- All Known Implementing Classes:
CurrencyQualifierProvider
,CurrencyQualifierProvider
,LanguageQualifierProvider
,NoOpQualifierProvider
public interface QualifierProvider
This interface provides support for different types of qualifiers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyQualifier(Qualifier qualifier)
Applies the qualifier passed as parameter.boolean
canApply(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.Qualifier
getCurrentQualifier()
Returns the current qualifier.java.util.Set<java.lang.Class<?>>
getSupportedTypes()
Returns all the supported types by this provider.
-
-
-
Method Detail
-
getSupportedTypes
java.util.Set<java.lang.Class<?>> getSupportedTypes()
Returns all the supported types by this provider.- Returns:
- the supported types
-
getAvailableQualifiers
java.util.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
boolean canApply(IndexedProperty indexedProperty)
Checks if qualifiers can be applied/used with the indexed property passed as parameter.- Parameters:
indexedProperty
- - the indexed property- Returns:
true
if qualifiers can be used,false
otherwise
-
applyQualifier
void applyQualifier(Qualifier qualifier)
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
- - theQualifier
to 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
-
-