wicket.protocol.http
Class NullWebRequest

java.lang.Object
  extended bywicket.Request
      extended bywicket.protocol.http.WebRequest
          extended bywicket.protocol.http.NullWebRequest

class NullWebRequest
extends WebRequest

A placeholder WebRequest where all methods do nothing. This class is not accessible outside this package because it is intended to be used as a singleton. To gain access to a NullWebRequest instance, just access the static final field WebRequest.NULL.

Author:
Jonathan Locke
See Also:
WebRequest.NULL

Field Summary
 
Fields inherited from class wicket.protocol.http.WebRequest
NULL
 
Constructor Summary
(package private) NullWebRequest()
          Private constructor to force use of static factory method.
 
Method Summary
 java.lang.String getContextPath()
          Gets the application context path.
 java.util.Locale getLocale()
          Returns the preferred Locale that the client will accept content in, based on the Accept-Language header.
 java.lang.String getParameter(java.lang.String key)
          Gets the request parameter with the given key.
 java.util.Map getParameterMap()
          Gets the request parameters.
 java.lang.String[] getParameters(java.lang.String key)
          Gets the request parameters with the given key.
 java.lang.String getPath()
           
 java.lang.String getRelativeURL()
          Gets the relative url (url without the context path and without a leading '/').
 java.lang.String getServletPath()
          Gets the servlet path.
 java.lang.String getURL()
          Retrieves the URL of this request for local use.
 WebRequest newMultipartWebRequest(Bytes maxsize)
          Create a runtime context type specific (e.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullWebRequest

NullWebRequest()
Private constructor to force use of static factory method.

Method Detail

getContextPath

public java.lang.String getContextPath()
Description copied from class: WebRequest
Gets the application context path.

Specified by:
getContextPath in class WebRequest
Returns:
application context path
See Also:
WebRequest.getContextPath()

getParameter

public java.lang.String getParameter(java.lang.String key)
Description copied from class: WebRequest
Gets the request parameter with the given key.

Specified by:
getParameter in class WebRequest
Parameters:
key - Parameter name
Returns:
Parameter value
See Also:
Request.getParameter(java.lang.String)

getParameterMap

public java.util.Map getParameterMap()
Description copied from class: WebRequest
Gets the request parameters.

Specified by:
getParameterMap in class WebRequest
Returns:
Map of parameters
See Also:
Request.getParameterMap()

getParameters

public java.lang.String[] getParameters(java.lang.String key)
Description copied from class: WebRequest
Gets the request parameters with the given key.

Specified by:
getParameters in class WebRequest
Parameters:
key - Parameter name
Returns:
Parameter values
See Also:
Request.getParameters(java.lang.String)

getPath

public java.lang.String getPath()
Specified by:
getPath in class Request
Returns:
Path info for request
See Also:
Request.getPath()

getServletPath

public java.lang.String getServletPath()
Description copied from class: WebRequest
Gets the servlet path.

Specified by:
getServletPath in class WebRequest
Returns:
Servlet path
See Also:
WebRequest.getServletPath()

getURL

public java.lang.String getURL()
Description copied from class: WebRequest
Retrieves the URL of this request for local use.

Overrides:
getURL in class WebRequest
Returns:
The request URL for local use, which is the context path + the relative url
See Also:
Request.getURL()

toString

public java.lang.String toString()
See Also:
Object.toString()

getRelativeURL

public java.lang.String getRelativeURL()
Description copied from class: WebRequest
Gets the relative url (url without the context path and without a leading '/'). Use this method to load resources using the servlet context.

Specified by:
getRelativeURL in class WebRequest
Returns:
Request URL
See Also:
WebRequest.getRelativeURL()

newMultipartWebRequest

public WebRequest newMultipartWebRequest(Bytes maxsize)
Description copied from class: WebRequest
Create a runtime context type specific (e.g. Servlet or Portlet) MultipartWebRequest wrapper for handling multipart content uploads.

Specified by:
newMultipartWebRequest in class WebRequest
Parameters:
maxsize - the maximum size this request may be
Returns:
new WebRequest wrapper implementing MultipartWebRequest
See Also:
WebRequest.newMultipartWebRequest(wicket.util.lang.Bytes)

getLocale

public java.util.Locale getLocale()
Description copied from class: WebRequest
Returns the preferred Locale that the client will accept content in, based on the Accept-Language header. If the client request doesn't provide an Accept-Language header, this method returns the default locale for the server.

Specified by:
getLocale in class WebRequest
Returns:
the preferred Locale for the client
See Also:
Request.getLocale()


Copyright © 2004-2006 Wicket developers. All Rights Reserved.