Class HippoAvailableTranslationsBean.NoopTranslationsBean<K extends HippoBean>
- java.lang.Object
-
- org.hippoecm.hst.content.beans.standard.HippoAvailableTranslationsBean.NoopTranslationsBean<K>
-
- All Implemented Interfaces:
HippoAvailableTranslationsBean<K>
- Enclosing interface:
- HippoAvailableTranslationsBean<K extends HippoBean>
public static final class HippoAvailableTranslationsBean.NoopTranslationsBean<K extends HippoBean> extends Object implements HippoAvailableTranslationsBean<K>
A No-operation instance of a HippoAvailableTranslationsBean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hippoecm.hst.content.beans.standard.HippoAvailableTranslationsBean
HippoAvailableTranslationsBean.NoopTranslationsBean<K extends HippoBean>
-
-
Constructor Summary
Constructors Constructor Description NoopTranslationsBean()
-
Method Summary
All Methods Instance Methods Concrete 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
-
getAvailableLocales
public List<String> getAvailableLocales()
Description copied from interface:HippoAvailableTranslationsBean
Returns the available translations.- Specified by:
getAvailableLocales
in interfaceHippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
- the
List
of available locales and an emptyList
is no locales are present
-
getTranslation
public K getTranslation(String locale) throws ClassCastException
- Specified by:
getTranslation
in interfaceHippoAvailableTranslationsBean<K extends HippoBean>
- 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
-
getTranslations
public List<K> getTranslations() throws ClassCastException
- Specified by:
getTranslations
in interfaceHippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
- the
List
of all translations or an emptyList
if no translations found - Throws:
ClassCastException
- when the bean forlocale
cannot be cast toK
-
hasTranslation
public boolean hasTranslation(String locale)
- Specified by:
hasTranslation
in interfaceHippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
true
when the translation forlocale
is present
-
-