View Javadoc

1   /*
2    *  jDTAUS Core RI Servlet Container
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.container.ri.servlet;
22  
23  import java.util.Locale;
24  
25  /**
26   * {@code java.util.Locale} implementation.
27   * <p>This class overwrites the automatically discovered default
28   * {@code java.util.Locale} implementation and is used to provide the locale of
29   * the current servlet request in service.</p>
30   *
31   * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
32   * @version $JDTAUS: ServletRequestLocale.java 8641 2012-09-27 06:45:17Z schulte $
33   */
34  public class ServletRequestLocale
35  {
36      //--Constructors------------------------------------------------------------
37  
38  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors
39      // This section is managed by jdtaus-container-mojo.
40  
41      /** Standard implementation constructor <code>org.jdtaus.core.container.ri.servlet.ServletRequestLocale</code>. */
42      public ServletRequestLocale()
43      {
44          super();
45      }
46  
47  // </editor-fold>//GEN-END:jdtausConstructors
48  
49      //------------------------------------------------------------Constructors--
50      //--ServletRequestLocale----------------------------------------------------
51  
52      /**
53       * Gets the current thread's locale from the servlet filter.
54       *
55       * @return The current thread's locale from the servlet filter.
56       *
57       * @see ServletFilter#getLocale()
58       */
59      public Locale java_util_Locale()
60      {
61          return ServletFilter.getLocale();
62      }
63  
64      //----------------------------------------------------ServletRequestLocale--
65  }