Module org.apache.wicket.core
Class AbstractComponentMapper
java.lang.Object
org.apache.wicket.request.mapper.AbstractMapper
org.apache.wicket.core.request.mapper.AbstractComponentMapper
- All Implemented Interfaces:
IRequestMapper
- Direct Known Subclasses:
AbstractBookmarkableMapper
,AbstractResourceReferenceMapper
,PageInstanceMapper
Convenience class for implementing page/components related encoders.
- Author:
- Matej Knopp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
cleanClassName
(String className) Cleans the class name from any extra information that may be there.protected void
encodePageComponentInfo
(Url url, PageComponentInfo info) Encodes thePageComponentInfo
instance as the first query string parameter to the URL.protected IMapperContext
protected Class<? extends IRequestablePage>
getPageClass
(String name) Loads page class with given name.protected PageComponentInfo
getPageComponentInfo
(Url url) Extracts thePageComponentInfo
from the URL.protected void
removeMetaParameter
(Url urlCopy) The newIRequestMapper
s use the first query parameter to hold meta information about the request like page version, component version, locale, ...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 Details
-
AbstractComponentMapper
public AbstractComponentMapper()Construct.
-
-
Method Details
-
getContext
-
getPageComponentInfo
Extracts thePageComponentInfo
from the URL. ThePageComponentInfo
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
Encodes thePageComponentInfo
instance as the first query string parameter to the URL.- Parameters:
url
-info
-
-
getPageClass
Loads page class with given name.- Parameters:
name
-- Returns:
- class
-
cleanClassName
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
The newIRequestMapper
s use the first query parameter to hold meta information about the request like page version, component version, locale, ... The actualIRequestMapper
implementation can decide whether the this parameter should be removed before creatingPageParameters
from the currentquery parameters
Removes the first query parameter only ifPageComponentInfo.parse(String)
returns non-null instance- Overrides:
removeMetaParameter
in classAbstractMapper
- Parameters:
urlCopy
- theUrl
that first query parameter has no value
-