View Javadoc

1   /*
2    *  jDTAUS Core Messages
3    *  Copyright (C) 2005 Christian Schulte
4    *  <cs@schulte.it>
5    *
6    *  This library is free software; you can redistribute it and/or
7    *  modify it under the terms of the GNU Lesser General Public
8    *  License as published by the Free Software Foundation; either
9    *  version 2.1 of the License, or any later version.
10   *
11   *  This library is distributed in the hope that it will be useful,
12   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   *  Lesser General Public License for more details.
15   *
16   *  You should have received a copy of the GNU Lesser General Public
17   *  License along with this library; if not, write to the Free Software
18   *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19   *
20   */
21  package org.jdtaus.core.messages;
22  
23  import java.util.Locale;
24  import org.jdtaus.core.container.ContainerFactory;
25  import org.jdtaus.core.text.Message;
26  
27  /**
28   * {@code Message} stating that the application's state is undefined.
29   *
30   * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
31   * @version $JDTAUS: UndefinedApplicationStateMessage.java 8743 2012-10-07 03:06:20Z schulte $
32   */
33  public final class UndefinedApplicationStateMessage extends Message
34  {
35      //--Contstants--------------------------------------------------------------
36  
37      /** Serial version UID for backwards compatibility with 1.0.x classes. */
38      private static final long serialVersionUID = -224877321182624137L;
39  
40      //---------------------------------------------------------------Constants--
41      //--Message-----------------------------------------------------------------
42  
43      /** Empty array. */
44      private static final Object[] ARGUMENTS =
45      {
46      };
47  
48      /**
49       * {@inheritDoc}
50       *
51       * @return an empty array, since the message has no arguments.
52       */
53      public Object[] getFormatArguments( final Locale locale )
54      {
55          return ARGUMENTS;
56      }
57  
58      /**
59       * {@inheritDoc}
60       *
61       * @return The corresponding text from the message's {@code ResourceBundle}:
62       * <blockquote><pre>
63       * The application may not work correctly any more. A shutdown is recommended!
64       * Please close any open files and restart the application.
65       * </pre></blockquote>
66       */
67      public String getText( final Locale locale )
68      {
69          return this.getUndefinedApplicationStateMessage( locale );
70      }
71  
72      //-----------------------------------------------------------------Message--
73      //--UndefinedApplicationStateMessage----------------------------------------
74  
75      /** Creates a new {@code UndefinedApplicationStateMessage} instance. */
76      public UndefinedApplicationStateMessage()
77      {
78          super();
79      }
80  
81      //----------------------------------------UndefinedApplicationStateMessage--
82      //--Messages----------------------------------------------------------------
83  
84  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausMessages
85      // This section is managed by jdtaus-container-mojo.
86  
87      /**
88       * Gets the text of message <code>undefinedApplicationState</code>.
89       * <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>
90       * <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>
91       *
92       * @param locale The locale of the message instance to return.
93       *
94       * @return Information about an illegal application state.
95       */
96      private String getUndefinedApplicationStateMessage( final Locale locale )
97      {
98          return ContainerFactory.getContainer().
99              getMessage( this, "undefinedApplicationState", locale, null );
100 
101     }
102 
103 // </editor-fold>//GEN-END:jdtausMessages
104 
105     //----------------------------------------------------------------Messages--
106 }