Interface HippoAvailableTranslationsBean<K extends HippoBean>

All Known Implementing Classes:
HippoAvailableTranslationsBean.NoopTranslationsBean

public interface HippoAvailableTranslationsBean<K extends HippoBean>
  • Method Details

    • getAvailableLocales

      List<String> getAvailableLocales()
      Returns the available translations.
      Returns:
      the List of available locales and an empty List is no locales are present
    • hasTranslation

      boolean hasTranslation(String locale)
      Parameters:
      locale -
      Returns:
      true when the translation for locale is present
    • getTranslations

      List<K> getTranslations() throws ClassCastException
      Returns:
      the List of all translations or an empty List if no translations found
      Throws:
      ClassCastException - when the bean for locale cannot be cast to K
    • getTranslation

      K getTranslation(String locale) throws ClassCastException
      Parameters:
      locale - the locale for the translation
      Returns:
      returns translation for locale and null if not present
      Throws:
      ClassCastException - when the bean for locale cannot be cast to K