Example usage for com.vaadin.server SystemMessagesInfo getLocale

List of usage examples for com.vaadin.server SystemMessagesInfo getLocale

Introduction

In this page you can find the example usage for com.vaadin.server SystemMessagesInfo getLocale.

Prototype

public Locale getLocale() 

Source Link

Document

The locale of the UI related to the SystemMessages request.

Usage

From source file:com.klwork.explorer.web.SpringVaadinSystemMessagesProvider.java

License:Apache License

@Override
public SystemMessages getSystemMessages(SystemMessagesInfo systemMessagesInfo) {
    Locale locale = systemMessagesInfo.getLocale();

    if (systemMessagesCache.containsKey(locale)) {
        return systemMessagesCache.get(locale);
    }/*from w ww  .  ja  v  a  2  s .  com*/

    SystemMessages systemMessages = systemMessagesBean.getSystemMessages(locale);
    systemMessagesCache.put(locale, systemMessages);

    return systemMessages;
}

From source file:org.eclipse.hawkbit.ui.LocalizedSystemMessagesProvider.java

License:Open Source License

@Override
public SystemMessages getSystemMessages(final SystemMessagesInfo systemMessagesInfo) {
    return getLocalizedSystemMessages(i18n, systemMessagesInfo.getLocale());
}

From source file:org.opencms.main.CmsUIServlet.java

License:Open Source License

/**
 * @see com.vaadin.server.SystemMessagesProvider#getSystemMessages(com.vaadin.server.SystemMessagesInfo)
 *//*  ww w  . ja  v a 2 s  .  c  o  m*/
public SystemMessages getSystemMessages(SystemMessagesInfo systemMessagesInfo) {

    Locale locale = systemMessagesInfo.getLocale();
    if (!m_systemMessages.containsKey(locale)) {
        m_systemMessages.put(locale, createSystemMessages(locale));
    }
    return m_systemMessages.get(locale);
}

From source file:pl.exsio.frameset.vaadin.bootstrap.spring.FramesetSystemMessagesProvider.java

License:Open Source License

@Override
public SystemMessages getSystemMessages(SystemMessagesInfo systemMessagesInfo) {
    Locale locale = systemMessagesInfo.getLocale();

    if (this.systemMessagesCache.containsKey(locale)) {
        return this.systemMessagesCache.get(locale);
    }/*from   w  ww .j a va 2  s . c o  m*/

    SystemMessages systemMessages = this.systemMessagesBean.getSystemMessages(locale);
    this.systemMessagesCache.put(locale, systemMessages);

    return systemMessages;
}