org.apache.wicket.core.request.mapper
Class AbstractResourceReferenceMapper

java.lang.Object
  extended by org.apache.wicket.request.mapper.AbstractMapper
      extended by org.apache.wicket.core.request.mapper.AbstractComponentMapper
          extended by org.apache.wicket.core.request.mapper.AbstractResourceReferenceMapper
All Implemented Interfaces:
IRequestMapper
Direct Known Subclasses:
BasicResourceReferenceMapper

public abstract class AbstractResourceReferenceMapper
extends AbstractComponentMapper

Base class for encoding and decoding ResourceReferences

Author:
Matej Knopp

Constructor Summary
AbstractResourceReferenceMapper()
           
 
Method Summary
protected  ResourceReference.UrlAttributes decodeResourceReferenceAttributes(String attributes)
           
protected  String encodeResourceReferenceAttributes(ResourceReference.UrlAttributes attributes)
           
protected  void encodeResourceReferenceAttributes(Url url, ResourceReference reference)
           
static CharSequence escapeAttributesSeparator(String attribute)
          Escapes any occurrences of - character in the style and variation attributes with ~.
protected  ResourceReference.UrlAttributes getResourceReferenceAttributes(Url url)
           
protected  void removeMetaParameter(Url urlCopy)
           Removes the first query parameter only if PageComponentInfo.parse(String) returns non-null instance
static String unescapeAttributesSeparator(String attribute)
          Reverts the escaping applied by escapeAttributesSeparator(String) - unescapes occurrences of ~ character in the style and variation attributes with -.
 
Methods inherited from class org.apache.wicket.core.request.mapper.AbstractComponentMapper
encodePageComponentInfo, getContext, getPageClass, getPageComponentInfo, requestListenerInterfaceFromString, requestListenerInterfaceToString
 
Methods inherited from class org.apache.wicket.request.mapper.AbstractMapper
encodePageParameters, extractPageParameters, getMountSegments, getOptionalPlaceholder, getPlaceholder, getPlaceholder, urlStartsWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.request.IRequestMapper
getCompatibilityScore, mapHandler, mapRequest
 

Constructor Detail

AbstractResourceReferenceMapper

public AbstractResourceReferenceMapper()
Method Detail

escapeAttributesSeparator

public static CharSequence escapeAttributesSeparator(String attribute)
Escapes any occurrences of - character in the style and variation attributes with ~. Any occurrence of ~ is encoded as ~~.

Parameters:
attribute - the attribute to escape
Returns:
the attribute with escaped separator character

unescapeAttributesSeparator

public static String unescapeAttributesSeparator(String attribute)
Reverts the escaping applied by escapeAttributesSeparator(String) - unescapes occurrences of ~ character in the style and variation attributes with -.

Parameters:
attribute - the attribute to unescape
Returns:
the attribute with escaped separator character

encodeResourceReferenceAttributes

protected final String encodeResourceReferenceAttributes(ResourceReference.UrlAttributes attributes)

decodeResourceReferenceAttributes

protected final ResourceReference.UrlAttributes decodeResourceReferenceAttributes(String attributes)

encodeResourceReferenceAttributes

protected void encodeResourceReferenceAttributes(Url url,
                                                 ResourceReference reference)

getResourceReferenceAttributes

protected ResourceReference.UrlAttributes getResourceReferenceAttributes(Url url)

removeMetaParameter

protected void removeMetaParameter(Url urlCopy)
Removes the first query parameter only if PageComponentInfo.parse(String) returns non-null instance Remove the first parameter because it brings meta information like locale

Overrides:
removeMetaParameter in class AbstractComponentMapper


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.