public class AvailableTranslations<K extends HippoBean> extends Object implements HippoAvailableTranslationsBean<K>
HippoAvailableTranslationsBean.NoopTranslationsBean<K extends HippoBean>
Constructor and Description |
---|
AvailableTranslations(javax.jcr.Node node) |
AvailableTranslations(javax.jcr.Node node,
ObjectConverter objectConverter)
Deprecated.
Deprecated since CMS 11.0.0 (HST 4.0.0). Use
AvailableTranslations(Node) instead. |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAvailableLocales()
Returns the available translations.
|
K |
getTranslation(String locale) |
List<K> |
getTranslations() |
boolean |
hasTranslation(String locale) |
void |
setBeanMappingClass(Class<K> beanMappingClass)
Sets the
beanMappingClass for this HippoAvailableTranslationsBean . |
public AvailableTranslations(javax.jcr.Node node)
@Deprecated public AvailableTranslations(javax.jcr.Node node, ObjectConverter objectConverter)
AvailableTranslations(Node)
instead.node
- the node
to get the translations forpublic List<String> getAvailableLocales()
HippoAvailableTranslationsBean
getAvailableLocales
in interface HippoAvailableTranslationsBean<K extends HippoBean>
List
of available locales and an empty List
is no locales are presentpublic K getTranslation(String locale)
getTranslation
in interface HippoAvailableTranslationsBean<K extends HippoBean>
locale
- the locale for the translationlocale
and null
if not presentpublic List<K> getTranslations()
getTranslations
in interface HippoAvailableTranslationsBean<K extends HippoBean>
List
of all translations or an empty List
if no translations foundpublic boolean hasTranslation(String locale)
hasTranslation
in interface HippoAvailableTranslationsBean<K extends HippoBean>
true
when the translation for locale
is presentpublic void setBeanMappingClass(Class<K> beanMappingClass)
beanMappingClass
for this HippoAvailableTranslationsBean
. Only translations of type
beanMappingClass
will be returnedbeanMappingClass
- the type of class the available translations should be offCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.