<commit_before>/*
 * Copyright 2000-2014 Vaadin Ltd.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.vaadin.server;

import java.io.Serializable;

/**
 * Contains the system messages used to notify the user about various critical
 * situations that can occur.
 * <p>
 * Vaadin gets the SystemMessages from your application by calling a static
 * getSystemMessages() method. By default the Application.getSystemMessages() is
 * used. You can customize this by defining a static
 * MyApplication.getSystemMessages() and returning CustomizedSystemMessages.
 * Note that getSystemMessages() is static - changing the system messages will
 * by default change the message for all users of the application.
 * </p>
 * <p>
 * The default behavior is to show a notification, and restart the application
 * the the user clicks the message. <br/>
 * Instead of restarting the application, you can set a specific URL that the
 * user is taken to.<br/>
 * Setting both caption and message to null will restart the application (or go
 * to the specified URL) without displaying a notification.
 * set*NotificationEnabled(false) will achieve the same thing.
 * </p>
 * <p>
 * The situations are:
 * <li>Session expired: the user session has expired, usually due to inactivity.
 * </li>
 * <li>Communication error: the client failed to contact the server, or the
 * server returned and invalid response.</li>
 * <li>Internal error: unhandled critical server error (e.g out of memory,
 * database crash)
 * <li>Out of sync: the client is not in sync with the server. E.g the user
 * opens two windows showing the same application, but the application does not
 * support this and uses the same Window instance. When the user makes changes
 * in one of the windows - the other window is no longer in sync, and (for
 * instance) pressing a button that is no longer present in the UI will cause a
 * out-of-sync -situation.
 * </p>
 */

public class CustomizedSystemMessages extends SystemMessages implements
        Serializable {

    /**
     * Sets the URL to go to when the session has expired.
     * 
     * @param sessionExpiredURL
     *            the URL to go to, or null to reload current
     */
    public void setSessionExpiredURL(String sessionExpiredURL) {
        this.sessionExpiredURL = sessionExpiredURL;
    }

    /**
     * Enables or disables the notification. If disabled, the set URL (or
     * current) is loaded directly when next transaction between server and
     * client happens.
     * 
     * @param sessionExpiredNotificationEnabled
     *            true = enabled, false = disabled
     */
    public void setSessionExpiredNotificationEnabled(
            boolean sessionExpiredNotificationEnabled) {
        this.sessionExpiredNotificationEnabled = sessionExpiredNotificationEnabled;
    }
<commit_msg>Remove out of date javadoc (#19454)<commit_after>/*
 * Copyright 2000-2014 Vaadin Ltd.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.vaadin.server;

import java.io.Serializable;

/**
 * Contains the system messages used to notify the user about various critical
 * situations that can occur.
 * <p>
 * Vaadin gets the SystemMessages from your application by calling a static
 * getSystemMessages() method. By default the Application.getSystemMessages() is
 * used. You can customize this by defining a static
 * MyApplication.getSystemMessages() and returning CustomizedSystemMessages.
 * Note that getSystemMessages() is static - changing the system messages will
 * by default change the message for all users of the application.
 * </p>
 * <p>
 * The default behavior is to show a notification, and restart the application
 * the the user clicks the message. <br/>
 * Instead of restarting the application, you can set a specific URL that the
 * user is taken to.<br/>
 * Setting both caption and message to null will restart the application (or go
 * to the specified URL) without displaying a notification.
 * set*NotificationEnabled(false) will achieve the same thing.
 * </p>
 * <p>
 * The situations are:
 * <li>Session expired: the user session has expired, usually due to inactivity.
 * </li>
 * <li>Communication error: the client failed to contact the server, or the
 * server returned and invalid response.</li>
 * <li>Internal error: unhandled critical server error (e.g out of memory,
 * database crash)
 * </p>
 */

public class CustomizedSystemMessages extends SystemMessages implements
        Serializable {

    /**
     * Sets the URL to go to when the session has expired.
     * 
     * @param sessionExpiredURL
     *            the URL to go to, or null to reload current
     */
    public void setSessionExpiredURL(String sessionExpiredURL) {
        this.sessionExpiredURL = sessionExpiredURL;
    }

    /**
     * Enables or disables the notification. If disabled, the set URL (or
     * current) is loaded directly when next transaction between server and
     * client happens.
     * 
     * @param sessionExpiredNotificationEnabled
     *            true = enabled, false = disabled
     */
    public void setSessionExpiredNotificationEnabled(
            boolean sessionExpiredNotificationEnabled) {
        this.sessionExpiredNotificationEnabled = sessionExpiredNotificationEnabled;
    }

{'fraction_non_alphanumeric': 0.06853879105188006, 'fraction_numerical': 0.0046009836585752814, 'mean_word_length': 3.4677533664068037, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7057023', 'n_tokens_mistral': 1597, 'n_tokens_neox': 1534, 'n_words': 755}