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

java.lang.Object
  extended by org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
      extended by org.apache.wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy
All Implemented Interfaces:
IMountableRequestTargetUrlCodingStrategy, IRequestTargetUrlCodingStrategy

public class PackageRequestTargetUrlCodingStrategy
extends AbstractRequestTargetUrlCodingStrategy

Encodes and decodes mounts for a whole package.

Author:
Eelco Hillenius, Igor Vaynberg

Constructor Summary
PackageRequestTargetUrlCodingStrategy(java.lang.String path, PackageName packageName)
          Construct.
 
Method Summary
 IRequestTarget decode(RequestParameters requestParameters)
          Gets the decoded request target.
 java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
appendParameters, 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
 

Constructor Detail

PackageRequestTargetUrlCodingStrategy

public PackageRequestTargetUrlCodingStrategy(java.lang.String path,
                                             PackageName packageName)
Construct.

Parameters:
path - the mount path
packageName - The name of the package to mount
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 final java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


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