org.apache.wicket.request
Class RequestParameters

java.lang.Object
  extended by org.apache.wicket.request.RequestParameters
All Implemented Interfaces:
Serializable, IClusterable

public class RequestParameters
extends Object
implements IClusterable

Object that abstracts common request parameters. It consists of possible optional parameters that can be translated from e.g. servlet request parameters and serves as a strongly typed variant of these that is to be created by the IRequestCycleProcessor's IRequestCodingStrategy.

Though this object can be extended and hence more parameter options can be used, anything other than in this implementation must be supported by specific IRequestCycleProcessor implementations and thus are not supported by default implementations.

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
RequestParameters()
          Construct.
 
Method Summary
 String getBehaviorId()
          Gets the component registration id of any behavior.
 String getBookmarkablePageClass()
          Gets any bookmarkable page class.
 String getComponentId()
          Gets any id of a non-page target component.
 String getComponentPath()
          Gets the full path to a component (might be just the page)..
 RequestListenerInterface getInterface()
           
 String getInterfaceName()
          Gets any callable interface name (e.g.
 String getPageMapName()
          Gets any name of the page map.
 Map<String,?> getParameters()
          Gets free-to-use map of non-reserved parameters.
 String getPath()
          Gets path info.
 String getQueryString()
           
 String getResourceKey()
          Gets any resource key.
 int getUrlDepth()
          Gets the depth for relative URLs.
 int getVersionNumber()
          Gets any version information string.
 boolean isOnlyProcessIfPathActive()
          Tells wicket whether this request should only be processed if the page + version specified are pointing to the last page the user accessed.
 boolean isStateless()
           
 void setBehaviorId(String behaviorId)
          Sets the component registration id of any behavior.
 void setBookmarkablePageClass(String bookmarkablePageClass)
          Sets any bookmarkable page class.
 void setComponentId(String componentId)
          Sets any id of a non-page target component.
 void setComponentPath(String componentPath)
          Sets the full path to a component (might be just the page)..
 void setInterfaceName(String interfaceName)
          Sets any callable interface name (e.g.
 void setOnlyProcessIfPathActive(boolean onlyProcessIfPathActive)
          Sets the only-process-if-path-active flag
 void setPageMapName(String pageMapName)
          Sets any name of the page map.
 void setParameters(Map<String,?> parameters)
          Sets free-to-use map of non-reserved parameters.
 void setPath(String pathInfo)
          Sets path info.
 void setQueryString(String queryString)
           
 void setResourceKey(String resourceKey)
          Sets any resource key.
 void setStateless(boolean stateless)
          Sets whether or not this request can be processed without a session present.
 void setUrlDepth(int urlDepth)
          Sets the depth for relative URLs.
 void setVersionNumber(int versionNumber)
          Sets any version information string.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestParameters

public RequestParameters()
Construct.

Method Detail

getBehaviorId

public String getBehaviorId()
Gets the component registration id of any behavior.

Returns:
behaviorId the id

getBookmarkablePageClass

public String getBookmarkablePageClass()
Gets any bookmarkable page class.

Returns:
any bookmarkable page class

getComponentId

public String getComponentId()
Gets any id of a non-page target component.

Returns:
any id of a non-page target component

getComponentPath

public String getComponentPath()
Gets the full path to a component (might be just the page)..

Returns:
the full path to a component (might be just the page).

getInterface

public RequestListenerInterface getInterface()
Returns:
The interface named by these request parameters

getInterfaceName

public String getInterfaceName()
Gets any callable interface name (e.g. ILinkListener).

Returns:
any callable interface name (e.g. ILinkListener)

getPageMapName

public String getPageMapName()
Gets any name of the page map.

Returns:
any name of the page map

getParameters

public Map<String,?> getParameters()
Gets free-to-use map of non-reserved parameters.

Returns:
free-to-use map of non-reserved parameters

getPath

public String getPath()
Gets path info.

Returns:
path info

getResourceKey

public String getResourceKey()
Gets any resource key.

Returns:
any resource key

getVersionNumber

public int getVersionNumber()
Gets any version information string.

Returns:
any version information string

isOnlyProcessIfPathActive

public boolean isOnlyProcessIfPathActive()
Tells wicket whether this request should only be processed if the page + version specified are pointing to the last page the user accessed.

Returns:
the only-process-if-path-active flag
See Also:
WebRequestCodingStrategy.IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME

setBehaviorId

public void setBehaviorId(String behaviorId)
Sets the component registration id of any behavior.

Parameters:
behaviorId - the id

setBookmarkablePageClass

public void setBookmarkablePageClass(String bookmarkablePageClass)
Sets any bookmarkable page class.

Parameters:
bookmarkablePageClass - any bookmarkable page class

setComponentId

public void setComponentId(String componentId)
Sets any id of a non-page target component.

Parameters:
componentId - any id of a non-page target component

setComponentPath

public void setComponentPath(String componentPath)
Sets the full path to a component (might be just the page)..

Parameters:
componentPath - the full path to a component (might be just the page).

setInterfaceName

public void setInterfaceName(String interfaceName)
Sets any callable interface name (e.g. ILinkListener).

Parameters:
interfaceName - any callable interface name (e.g. ILinkListener)

setOnlyProcessIfPathActive

public void setOnlyProcessIfPathActive(boolean onlyProcessIfPathActive)
Sets the only-process-if-path-active flag

Parameters:
onlyProcessIfPathActive -
See Also:
isOnlyProcessIfPathActive()

setPageMapName

public void setPageMapName(String pageMapName)
Sets any name of the page map.

Parameters:
pageMapName - any name of the page map

setParameters

public void setParameters(Map<String,?> parameters)
Sets free-to-use map of non-reserved parameters.

Parameters:
parameters - free-to-use map of non-reserved parameters

setPath

public void setPath(String pathInfo)
Sets path info.

Parameters:
pathInfo - path info

setResourceKey

public void setResourceKey(String resourceKey)
Sets any resource key.

Parameters:
resourceKey - any resource key

setVersionNumber

public void setVersionNumber(int versionNumber)
Sets any version information string.

Parameters:
versionNumber - any version information string

getUrlDepth

public int getUrlDepth()
Gets the depth for relative URLs. Used in AJAX requests.

Returns:
depth (number of slashes)

setUrlDepth

public void setUrlDepth(int urlDepth)
Sets the depth for relative URLs. Used in AJAX requests.

Parameters:
urlDepth - Number of slashes deep the page is that an AJAX request is made from.

isStateless

public boolean isStateless()
Returns:
stateless flag
See Also:
setStateless(boolean)

setStateless

public void setStateless(boolean stateless)
Sets whether or not this request can be processed without a session present. If a url is encoded for a request with these parameters jsessionid will be stripped, this is useful when rendering urls to packaged resources and other artifacts that do not require a session.

Parameters:
stateless -

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getQueryString

public String getQueryString()
Returns:
request query string

setQueryString

public void setQueryString(String queryString)
Parameters:
queryString -


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.