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

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

public class SharedResourceRequestTargetUrlCodingStrategy
extends AbstractRequestTargetUrlCodingStrategy

Encodes and decodes mounts for a single resource class.

Author:
Gili Tzabari

Constructor Summary
SharedResourceRequestTargetUrlCodingStrategy(String mountPath, String resourceKey)
          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.
 String getResourceKey()
           
 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
 

Constructor Detail

SharedResourceRequestTargetUrlCodingStrategy

public SharedResourceRequestTargetUrlCodingStrategy(String mountPath,
                                                    String resourceKey)
Construct.

Parameters:
mountPath -
resourceKey -
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)

getResourceKey

public String getResourceKey()
Returns:
the shared resource key for this mount

toString

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


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