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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the available translations.getTranslation
(String locale) boolean
hasTranslation
(String locale)
-
Constructor Details
-
NoopTranslationsBean
public NoopTranslationsBean()
-
-
Method Details
-
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
- 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
- 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
- Specified by:
hasTranslation
in interfaceHippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
true
when the translation forlocale
is present
-