wicket.request.target.coding
Class AbstractRequestTargetUrlCodingStrategy

java.lang.Object
  extended by wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
All Implemented Interfaces:
IMountableRequestTargetUrlCodingStrategy, IRequestTargetUrlCodingStrategy
Direct Known Subclasses:
BookmarkablePageRequestTargetUrlCodingStrategy, PackageRequestTargetUrlCodingStrategy, SharedResourceRequestTargetUrlCodingStrategy

public abstract class AbstractRequestTargetUrlCodingStrategy
extends java.lang.Object
implements IRequestTargetUrlCodingStrategy, IMountableRequestTargetUrlCodingStrategy

Abstract class for mount encoders that uses paths and forward slashes.

Author:
Eelco Hillenius, Igor Vaynberg (ivaynberg)

Constructor Summary
AbstractRequestTargetUrlCodingStrategy(java.lang.String mountPath)
          Construct.
 
Method Summary
protected  void appendParameters(AppendingStringBuffer url, java.util.Map parameters)
          Encodes Map into a url fragment and append that to the provided url buffer.
protected  ValueMap decodeParameters(java.lang.String urlFragment, java.util.Map urlParameters)
          Decodes parameters object from the provided url fragment
 java.lang.String getMountPath()
          Returns the path of the url where this request target is mounted on.
protected  java.lang.String urlDecode(java.lang.String value)
          Returns a decoded value of the given value
protected  java.lang.String urlEncode(java.lang.String string)
          Url encodes a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRequestTargetUrlCodingStrategy

public AbstractRequestTargetUrlCodingStrategy(java.lang.String mountPath)
Construct.

Parameters:
mountPath - the mount path
Method Detail

appendParameters

protected void appendParameters(AppendingStringBuffer url,
                                java.util.Map parameters)
Encodes Map into a url fragment and append that to the provided url buffer.

Parameters:
url - url so far
parameters - Map object to be encoded

decodeParameters

protected ValueMap decodeParameters(java.lang.String urlFragment,
                                    java.util.Map urlParameters)
Decodes parameters object from the provided url fragment

Parameters:
urlFragment - fragment of the url after the decoded path and before the query string
urlParameters - query string parameters
Returns:
Parameters created from the url fragment and query string

getMountPath

public final java.lang.String getMountPath()
Description copied from interface: IMountableRequestTargetUrlCodingStrategy
Returns the path of the url where this request target is mounted on.

Specified by:
getMountPath in interface IMountableRequestTargetUrlCodingStrategy
Returns:
String The path of the url
See Also:
IMountableRequestTargetUrlCodingStrategy.getMountPath()

urlDecode

protected java.lang.String urlDecode(java.lang.String value)
Returns a decoded value of the given value

Parameters:
value -
Returns:
Decodes the value

urlEncode

protected java.lang.String urlEncode(java.lang.String string)
Url encodes a string

Parameters:
string - string to be encoded
Returns:
encoded string


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