wicket
Class Request

java.lang.Object
  extended by wicket.Request
Direct Known Subclasses:
WebRequest, WicketPortletRequest

public abstract class Request
extends java.lang.Object

Base class for page request implementations allowing access to request parameters. A Request has a URL and a parameter map. You can retrieve the URL of the request with getURL(). The entire parameter map can be retrieved via getParameterMap(). Individual parameters can be retrieved via getParameter(String). If multiple values are available for a given parameter, they can be retrieved via getParameters(String).

Author:
Jonathan Locke

Constructor Summary
Request()
          Construct.
 
Method Summary
 java.lang.String decodeURL(java.lang.String url)
          An implementation of this method is only required if a subclass wishes to support sessions via URL rewriting.
abstract  java.util.Locale getLocale()
           
 Page getPage()
           
abstract  java.lang.String getParameter(java.lang.String key)
          Gets a given (query) parameter by name.
abstract  java.util.Map getParameterMap()
          Gets a map of (query) parameters sent with the request.
abstract  java.lang.String[] getParameters(java.lang.String key)
          Gets an array of multiple parameters by name.
abstract  java.lang.String getPath()
           
abstract  java.lang.String getRelativeURL()
          Gets the relative (to some root) url (e.g.
 RequestParameters getRequestParameters()
          Gets the request parameters object using the instance of IRequestCodingStrategy of the provided request cycle processor.
abstract  java.lang.String getURL()
          Retrieves the absolute URL of this request for local use.
 void setPage(Page page)
          THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Request

public Request()
Construct.

Method Detail

decodeURL

public java.lang.String decodeURL(java.lang.String url)
An implementation of this method is only required if a subclass wishes to support sessions via URL rewriting. This default implementation simply returns the URL String it is passed.

Parameters:
url - The URL to decode
Returns:
The decoded url

getLocale

public abstract java.util.Locale getLocale()
Returns:
The locale for this request

getPage

public Page getPage()
Returns:
Any Page for this request

getParameter

public abstract java.lang.String getParameter(java.lang.String key)
Gets a given (query) parameter by name.

Parameters:
key - Parameter name
Returns:
Parameter value

getParameterMap

public abstract java.util.Map getParameterMap()
Gets a map of (query) parameters sent with the request.

Returns:
Map of parameters

getParameters

public abstract java.lang.String[] getParameters(java.lang.String key)
Gets an array of multiple parameters by name.

Parameters:
key - Parameter name
Returns:
Parameter values

getPath

public abstract java.lang.String getPath()
Returns:
Path info for request

getRelativeURL

public abstract java.lang.String getRelativeURL()
Gets the relative (to some root) url (e.g. in a servlet environment, the url without the context path and without a leading '/'). Use this method e.g. to load resources using the servlet context.

Returns:
Request URL

getURL

public abstract java.lang.String getURL()
Retrieves the absolute URL of this request for local use.

Returns:
The absolute request URL for local use

setPage

public void setPage(Page page)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.

Parameters:
page - The Page for this request

getRequestParameters

public final RequestParameters getRequestParameters()
Gets the request parameters object using the instance of IRequestCodingStrategy of the provided request cycle processor.

Returns:
the request parameters object


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