Interface StoreSessionFacade
-
- All Known Implementing Classes:
DefaultStoreSessionFacade
public interface StoreSessionFacadeStore session facade interface. The main purpose is to load currency and language data from existing services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<CurrencyData>getAllCurrencies()java.util.Collection<LanguageData>getAllLanguages()CurrencyDatagetCurrentCurrency()Gets current currency stored in session.LanguageDatagetCurrentLanguage()Gets current language stored in session.CurrencyDatagetDefaultCurrency()Gets default currency for current store.LanguageDatagetDefaultLanguage()Gets default language for current store.voidinitializeSession(java.util.List<java.util.Locale> preferredLocales)Initialize the sessionvoidsetCurrentCurrency(java.lang.String isocode)Sets the current currency and validates, if currency chosen is supported for current currency.voidsetCurrentLanguage(java.lang.String isocode)Sets the current language and validates, if language chosen is supported for current store.
-
-
-
Method Detail
-
getCurrentLanguage
LanguageData getCurrentLanguage()
Gets current language stored in session.- Returns:
- current language for the current store.
-
getCurrentCurrency
CurrencyData getCurrentCurrency()
Gets current currency stored in session.- Returns:
- current currency for the current store.
-
getAllLanguages
java.util.Collection<LanguageData> getAllLanguages()
- Returns:
- all usable languages for the current catalog versions. In case of empty list of languages for versions, list of all languages in the system should be returned.
-
getAllCurrencies
java.util.Collection<CurrencyData> getAllCurrencies()
- Returns:
- all usable currencies for the current store. In case of empty list of currencies for stores, list of all currencies in the system should be returned.
-
setCurrentLanguage
void setCurrentLanguage(java.lang.String isocode)
Sets the current language and validates, if language chosen is supported for current store.- Parameters:
isocode- language iso
-
setCurrentCurrency
void setCurrentCurrency(java.lang.String isocode)
Sets the current currency and validates, if currency chosen is supported for current currency.- Parameters:
isocode- currency iso
-
getDefaultLanguage
LanguageData getDefaultLanguage()
Gets default language for current store.- Returns:
- default language for current store.
-
getDefaultCurrency
CurrencyData getDefaultCurrency()
Gets default currency for current store.- Returns:
- default currency for current store.
-
initializeSession
void initializeSession(java.util.List<java.util.Locale> preferredLocales)
Initialize the session- Parameters:
preferredLocales- the preferred locales from which to initialize session language
-
-