org.apache.wicket.request.target.coding
Class BookmarkablePageRequestTargetUrlCodingStrategy

java.lang.Object
  extended by org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
      extended by org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy
All Implemented Interfaces:
IMountableRequestTargetUrlCodingStrategy, IRequestTargetUrlCodingStrategy
Direct Known Subclasses:
CapturingBookmarkablePageRequestTargetUrlCodingStrategy, IndexedParamUrlCodingStrategy, MixedParamUrlCodingStrategy, QueryStringUrlCodingStrategy

public class BookmarkablePageRequestTargetUrlCodingStrategy
extends AbstractRequestTargetUrlCodingStrategy

Encodes and decodes mounts for a single bookmarkable page class.

Author:
Eelco Hillenius

Field Summary
protected  WeakReference<Class<? extends Page>> bookmarkablePageClassRef
          bookmarkable page class.
 
Constructor Summary
BookmarkablePageRequestTargetUrlCodingStrategy(String mountPath, Class<C> bookmarkablePageClass, String pageMapName)
          Construct.
 
Method Summary
 IRequestTarget decode(RequestParameters requestParameters)
          Gets the decoded request target.
 CharSequence encode(IRequestTarget requestTarget)
          Gets the encoded url for the provided request target.
 boolean matches(IRequestTarget requestTarget)
          Gets whether this mounter is applicable for the provided request target.
 String toString()
           
 
Methods inherited from class org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
appendParameters, appendPathParameter, decodeParameters, getMountPath, matches, urlDecode, urlDecodePathComponent, urlDecodeQueryComponent, urlEncode, urlEncodePathComponent, urlEncodeQueryComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bookmarkablePageClassRef

protected final WeakReference<Class<? extends Page>> bookmarkablePageClassRef
bookmarkable page class.

Constructor Detail

BookmarkablePageRequestTargetUrlCodingStrategy

public BookmarkablePageRequestTargetUrlCodingStrategy(String mountPath,
                                                      Class<C> bookmarkablePageClass,
                                                      String pageMapName)
Construct.

Type Parameters:
C - type of page.
Parameters:
mountPath - the mount path
bookmarkablePageClass - the class of the bookmarkable page
pageMapName - the page map name if any
Method Detail

decode

public IRequestTarget decode(RequestParameters requestParameters)
Description copied from interface: IRequestTargetUrlCodingStrategy
Gets the decoded request target.

Parameters:
requestParameters - the request parameters
Returns:
the decoded request target
See Also:
IRequestTargetUrlCodingStrategy.decode(org.apache.wicket.request.RequestParameters)

encode

public CharSequence encode(IRequestTarget requestTarget)
Description copied from interface: IRequestTargetUrlCodingStrategy
Gets the encoded url for the provided request target. Typically, the result will be prepended with a protocol specific prefix. In a servlet environment, the prefix typically is the context-path + servlet path, eg mywebapp/myservletname.

Parameters:
requestTarget - the request target to encode
Returns:
the encoded url
See Also:
IRequestTargetUrlCodingStrategy.encode(org.apache.wicket.IRequestTarget)

matches

public boolean matches(IRequestTarget requestTarget)
Description copied from interface: IRequestTargetUrlCodingStrategy
Gets whether this mounter is applicable for the provided request target.

Parameters:
requestTarget - the request target
Returns:
whether this mounter is applicable for the provided request target
See Also:
IRequestTargetUrlCodingStrategy.matches(org.apache.wicket.IRequestTarget)

toString

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


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