info.magnolia.ui.framework.i18n
Class DefaultI18NAuthoringSupport

java.lang.Object
  extended by info.magnolia.ui.framework.i18n.DefaultI18NAuthoringSupport
All Implemented Interfaces:
info.magnolia.ui.api.i18n.I18NAuthoringSupport

public class DefaultI18NAuthoringSupport
extends Object
implements info.magnolia.ui.api.i18n.I18NAuthoringSupport

Default implementation of I18NAuthoringSupport.


Constructor Summary
DefaultI18NAuthoringSupport()
           
 
Method Summary
 String createI18NURI(javax.jcr.Node node, Locale locale)
           
 List<Locale> getAvailableLocales(javax.jcr.Node node)
          Returns the available locales for the given page, area or component node.
 void i18nize(com.vaadin.ui.HasComponents fieldContainer, Locale locale)
           
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultI18NAuthoringSupport

public DefaultI18NAuthoringSupport()
Method Detail

getAvailableLocales

public List<Locale> getAvailableLocales(javax.jcr.Node node)
Returns the available locales for the given page, area or component node.
Please note though that this default implementation exclusively resolves locales through i18nContentSupport, i.e. as configured in /server/i18n/content/locales, regardless of the passed node.

Specified by:
getAvailableLocales in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport
Returns:
the list of locales if both i18nAuthoringSupport and i18nContentSupport are enabled, null otherwise.

i18nize

public void i18nize(com.vaadin.ui.HasComponents fieldContainer,
                    Locale locale)
Specified by:
i18nize in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport

createI18NURI

public String createI18NURI(javax.jcr.Node node,
                            Locale locale)
Specified by:
createI18NURI in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.