001/*
002 *  jDTAUS Core Messages
003 *  Copyright (C) 2005 Christian Schulte
004 *  <cs@schulte.it>
005 *
006 *  This library is free software; you can redistribute it and/or
007 *  modify it under the terms of the GNU Lesser General Public
008 *  License as published by the Free Software Foundation; either
009 *  version 2.1 of the License, or any later version.
010 *
011 *  This library is distributed in the hope that it will be useful,
012 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 *  Lesser General Public License for more details.
015 *
016 *  You should have received a copy of the GNU Lesser General Public
017 *  License along with this library; if not, write to the Free Software
018 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
019 *
020 */
021package org.jdtaus.core.messages;
022
023import java.util.Locale;
024import org.jdtaus.core.container.ContainerFactory;
025import org.jdtaus.core.text.Message;
026
027/**
028 * {@code Message} stating that the application's state is undefined.
029 *
030 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
031 * @version $JDTAUS: UndefinedApplicationStateMessage.java 8641 2012-09-27 06:45:17Z schulte $
032 */
033public final class UndefinedApplicationStateMessage extends Message
034{
035    //--Contstants--------------------------------------------------------------
036
037    /** Serial version UID for backwards compatibility with 1.0.x classes. */
038    private static final long serialVersionUID = -224877321182624137L;
039
040    //---------------------------------------------------------------Constants--
041    //--Message-----------------------------------------------------------------
042
043    /** Empty array. */
044    private static final Object[] ARGUMENTS =
045    {
046    };
047
048    /**
049     * {@inheritDoc}
050     *
051     * @return an empty array, since the message has no arguments.
052     */
053    public Object[] getFormatArguments( final Locale locale )
054    {
055        return ARGUMENTS;
056    }
057
058    /**
059     * {@inheritDoc}
060     *
061     * @return The corresponding text from the message's {@code ResourceBundle}:
062     * <blockquote><pre>
063     * The application may not work correctly any more. A shutdown is recommended!
064     * Please close any open files and restart the application.
065     * </pre></blockquote>
066     */
067    public String getText( final Locale locale )
068    {
069        return this.getUndefinedApplicationStateMessage( locale );
070    }
071
072    //-----------------------------------------------------------------Message--
073    //--Messages----------------------------------------------------------------
074
075// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausMessages
076    // This section is managed by jdtaus-container-mojo.
077
078    /**
079     * Gets the text of message <code>undefinedApplicationState</code>.
080     * <blockquote><pre>Die Anwendung arbeitet eventuell nicht mehr korrekt weiter. Ein Neustart wird empfohlen. Bitte schließen Sie alle momentan geöffneten Dateien und starten die Anwendung erneut.</pre></blockquote>
081     * <blockquote><pre>The application may not work correctly any more. A restart is recommended. Please close any open files and restart the application.</pre></blockquote>
082     *
083     * @param locale The locale of the message instance to return.
084     *
085     * @return Information about an illegal application state.
086     */
087    private String getUndefinedApplicationStateMessage( final Locale locale )
088    {
089        return ContainerFactory.getContainer().
090            getMessage( this, "undefinedApplicationState", locale, null );
091
092    }
093
094// </editor-fold>//GEN-END:jdtausMessages
095
096    //----------------------------------------------------------------Messages--
097}