Class AbstractComponentMapper

  • All Implemented Interfaces:
    org.apache.wicket.request.IRequestMapper
    Direct Known Subclasses:
    AbstractBookmarkableMapper, AbstractResourceReferenceMapper, PageInstanceMapper

    public abstract class AbstractComponentMapper
    extends org.apache.wicket.request.mapper.AbstractMapper
    implements org.apache.wicket.request.IRequestMapper
    Convenience class for implementing page/components related encoders.
    Author:
    Matej Knopp
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String cleanClassName​(java.lang.String className)
      Cleans the class name from any extra information that may be there.
      protected void encodePageComponentInfo​(org.apache.wicket.request.Url url, org.apache.wicket.request.mapper.info.PageComponentInfo info)
      Encodes the PageComponentInfo instance as the first query string parameter to the URL.
      protected IMapperContext getContext()  
      protected java.lang.Class<? extends IRequestablePage> getPageClass​(java.lang.String name)
      Loads page class with given name.
      protected org.apache.wicket.request.mapper.info.PageComponentInfo getPageComponentInfo​(org.apache.wicket.request.Url url)
      Extracts the PageComponentInfo from the URL.
      protected void removeMetaParameter​(org.apache.wicket.request.Url urlCopy)
      Removes the first query parameter only if PageComponentInfo.parse(String) returns non-null instance
      • Methods inherited from class org.apache.wicket.request.mapper.AbstractMapper

        encodePageParameters, extractPageParameters, getMountSegments, getOptionalPlaceholder, getPlaceholder, getPlaceholder, resolveLocale, safeSegmentGetter, 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

      • AbstractComponentMapper

        public AbstractComponentMapper()
        Construct.
    • Method Detail

      • getPageComponentInfo

        protected org.apache.wicket.request.mapper.info.PageComponentInfo getPageComponentInfo​(org.apache.wicket.request.Url url)
        Extracts the PageComponentInfo from the URL. The PageComponentInfo is encoded as the very first query parameter and the parameter consists of name only (no value).
        Parameters:
        url -
        Returns:
        PageComponentInfo instance if one was encoded in URL, null otherwise.
      • encodePageComponentInfo

        protected void encodePageComponentInfo​(org.apache.wicket.request.Url url,
                                               org.apache.wicket.request.mapper.info.PageComponentInfo info)
        Encodes the PageComponentInfo instance as the first query string parameter to the URL.
        Parameters:
        url -
        info -
      • getPageClass

        protected java.lang.Class<? extends IRequestablePage> getPageClass​(java.lang.String name)
        Loads page class with given name.
        Parameters:
        name -
        Returns:
        class
      • cleanClassName

        protected java.lang.String cleanClassName​(java.lang.String className)
        Cleans the class name from any extra information that may be there.
        Parameters:
        className - The raw class name parsed from the url
        Returns:
        The cleaned class name
      • removeMetaParameter

        protected void removeMetaParameter​(org.apache.wicket.request.Url urlCopy)
        Removes the first query parameter only if PageComponentInfo.parse(String) returns non-null instance
        Overrides:
        removeMetaParameter in class org.apache.wicket.request.mapper.AbstractMapper