Interface HippoAvailableTranslationsBean<K extends HippoBean>
-
- All Known Implementing Classes:
HippoAvailableTranslationsBean.NoopTranslationsBean
public interface HippoAvailableTranslationsBean<K extends HippoBean>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
HippoAvailableTranslationsBean.NoopTranslationsBean<K extends HippoBean>
A No-operation instance of a HippoAvailableTranslationsBean
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>
getAvailableLocales()
Returns the available translations.K
getTranslation(String locale)
List<K>
getTranslations()
boolean
hasTranslation(String locale)
-
-
-
Method Detail
-
hasTranslation
boolean hasTranslation(String locale)
- Parameters:
locale
-- Returns:
true
when the translation forlocale
is present
-
getTranslations
List<K> getTranslations() throws ClassCastException
- Returns:
- the
List
of all translations or an emptyList
if no translations found - Throws:
ClassCastException
- when the bean forlocale
cannot be cast toK
-
getTranslation
K getTranslation(String locale) throws ClassCastException
- Parameters:
locale
- the locale for the translation- Returns:
- returns translation for
locale
andnull
if not present - Throws:
ClassCastException
- when the bean forlocale
cannot be cast toK
-
-