net.trajano.twiff.internal.servlet
Class LocaleHttpServletRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by net.trajano.twiff.internal.servlet.LocaleHttpServletRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public final class LocaleHttpServletRequest
extends HttpServletRequestWrapper

This wraps the servlet request with some if its returned elements that modified by the filter.


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
LocaleHttpServletRequest(HttpServletRequest request, Locale locale, String servletPath, String pathInfo)
           
LocaleHttpServletRequest(HttpServletRequest request, String servletPath)
           
 
Method Summary
 Locale getLocale()
          Returns the overridden locale.
 Enumeration getLocales()
          Returns the list of locales, with the overridden one being the first in the enumeration.
 String getPathInfo()
          Returns the path info.
 String getServletPath()
          Returns the servlet path.
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

LocaleHttpServletRequest

public LocaleHttpServletRequest(HttpServletRequest request,
                                String servletPath)
Parameters:
request - the servlet request.
servletPath -

LocaleHttpServletRequest

public LocaleHttpServletRequest(HttpServletRequest request,
                                Locale locale,
                                String servletPath,
                                String pathInfo)
Parameters:
request - the servlet request.
locale - locale.
servletPath -
pathInfo -
Method Detail

getLocale

public Locale getLocale()
Returns the overridden locale.

Specified by:
getLocale in interface ServletRequest
Overrides:
getLocale in class ServletRequestWrapper
Returns:
locale.

getLocales

public Enumeration getLocales()
Returns the list of locales, with the overridden one being the first in the enumeration.

Specified by:
getLocales in interface ServletRequest
Overrides:
getLocales in class ServletRequestWrapper
Returns:
enumeration of locales.

getPathInfo

public String getPathInfo()
Returns the path info.

Specified by:
getPathInfo in interface HttpServletRequest
Overrides:
getPathInfo in class HttpServletRequestWrapper
Returns:
the path info,

getServletPath

public String getServletPath()
Returns the servlet path.

Specified by:
getServletPath in interface HttpServletRequest
Overrides:
getServletPath in class HttpServletRequestWrapper
Returns:
the servlet path.


Copyright © 2004-2005 trajano.net. All Rights Reserved.