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 8743 2012-10-07 03:06:20Z 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    //--UndefinedApplicationStateMessage----------------------------------------
074
075    /** Creates a new {@code UndefinedApplicationStateMessage} instance. */
076    public UndefinedApplicationStateMessage()
077    {
078        super();
079    }
080
081    //----------------------------------------UndefinedApplicationStateMessage--
082    //--Messages----------------------------------------------------------------
083
084// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausMessages
085    // This section is managed by jdtaus-container-mojo.
086
087    /**
088     * Gets the text of message <code>undefinedApplicationState</code>.
089     * <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>
090     * <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>
091     *
092     * @param locale The locale of the message instance to return.
093     *
094     * @return Information about an illegal application state.
095     */
096    private String getUndefinedApplicationStateMessage( final Locale locale )
097    {
098        return ContainerFactory.getContainer().
099            getMessage( this, "undefinedApplicationState", locale, null );
100
101    }
102
103// </editor-fold>//GEN-END:jdtausMessages
104
105    //----------------------------------------------------------------Messages--
106}