org.hippoecm.hst.content.beans.standard
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HippoAvailableTranslationsBean.NoopTranslationsBean
public HippoAvailableTranslationsBean.NoopTranslationsBean()
getAvailableLocales
public List<String> getAvailableLocales()
- Description copied from interface:
HippoAvailableTranslationsBean
- It returns the available translations.
- Specified by:
getAvailableLocales
in interface HippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
- the
List
of available locale's and an empty List
is no locale's are present
getTranslation
public K getTranslation(String locale)
throws ClassCastException
- Specified by:
getTranslation
in interface HippoAvailableTranslationsBean<K extends HippoBean>
- Parameters:
locale
- the locale for the translation
- Returns:
- returns the
T
for locale
and null
if not present
- Throws:
ClassCastException
- when the bean for locale
cannot be cast to
getTranslations
public List<K> getTranslations()
throws ClassCastException
- Specified by:
getTranslations
in interface HippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
- the List of all
T
's and an empty List
if no translations found
- Throws:
ClassCastException
- when the bean for locale
cannot be cast to
hasTranslation
public boolean hasTranslation(String locale)
- Specified by:
hasTranslation
in interface HippoAvailableTranslationsBean<K extends HippoBean>
- Returns:
true
when the translation for locale
is present
Copyright © 2008-2012 Hippo. All Rights Reserved.