Class AbstractComponentMapper
- java.lang.Object
-
- org.apache.wicket.request.mapper.AbstractMapper
-
- org.apache.wicket.core.request.mapper.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.IRequestMapperConvenience class for implementing page/components related encoders.- Author:
- Matej Knopp
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentMapper()Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcleanClassName(java.lang.String className)Cleans the class name from any extra information that may be there.protected voidencodePageComponentInfo(org.apache.wicket.request.Url url, org.apache.wicket.request.mapper.info.PageComponentInfo info)Encodes thePageComponentInfoinstance as the first query string parameter to the URL.protected IMapperContextgetContext()protected java.lang.Class<? extends IRequestablePage>getPageClass(java.lang.String name)Loads page class with given name.protected org.apache.wicket.request.mapper.info.PageComponentInfogetPageComponentInfo(org.apache.wicket.request.Url url)Extracts thePageComponentInfofrom the URL.protected voidremoveMetaParameter(org.apache.wicket.request.Url urlCopy)Removes the first query parameter only ifPageComponentInfo.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
-
-
-
-
Method Detail
-
getContext
protected IMapperContext getContext()
-
getPageComponentInfo
protected org.apache.wicket.request.mapper.info.PageComponentInfo getPageComponentInfo(org.apache.wicket.request.Url url)
Extracts thePageComponentInfofrom the URL. ThePageComponentInfois 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,
nullotherwise.
-
encodePageComponentInfo
protected void encodePageComponentInfo(org.apache.wicket.request.Url url, org.apache.wicket.request.mapper.info.PageComponentInfo info)Encodes thePageComponentInfoinstance 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 ifPageComponentInfo.parse(String)returns non-null instance- Overrides:
removeMetaParameterin classorg.apache.wicket.request.mapper.AbstractMapper
-
-