Interface StoreSessionFacade

All Known Implementing Classes:
DefaultStoreSessionFacade

public interface StoreSessionFacade
Store session facade interface. The main purpose is to load currency and language data from existing services.
  • Method Details

    • 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

      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

      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(String isocode)
      Sets the current language and validates, if language chosen is supported for current store.
      Parameters:
      isocode - language iso
    • setCurrentCurrency

      void setCurrentCurrency(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(List<Locale> preferredLocales)
      Initialize the session
      Parameters:
      preferredLocales - the preferred locales from which to initialize session language