All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.server.SystemMessagesProvider Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */

package com.vaadin.server;

import java.io.Serializable;

import com.vaadin.ui.UI;

/**
 * Gives out system messages based on Locale. Registered using
 * {@link VaadinService#setSystemMessagesProvider(SystemMessagesProvider)}.
 *
 * @author Vaadin Ltd
 * @since 7.0.0
 */
@FunctionalInterface
public interface SystemMessagesProvider extends Serializable {
    /**
     * Gets the system messages to use in the given context. The
     * {@link SystemMessagesInfo} object contains available information but in
     * most cases some or both of {@link VaadinSession#getCurrent()} and
     * {@link UI#getCurrent()} can also be used to find more information to help
     * the decision.
     *
     * @param systemMessagesInfo
     *            Locale, current request and other information available.
     * @return a system messages object
     */
    public SystemMessages getSystemMessages(
            SystemMessagesInfo systemMessagesInfo);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy