public abstract class AbstractComponentMapper extends AbstractMapper implements IRequestMapper
Constructor and Description |
---|
AbstractComponentMapper()
Construct.
|
Modifier and Type | Method and Description |
---|---|
protected String |
cleanClassName(String className)
Cleans the class name from any extra information that may be there.
|
protected void |
encodePageComponentInfo(Url url,
PageComponentInfo info)
Encodes the
PageComponentInfo instance as the first query string parameter to the
URL. |
protected IMapperContext |
getContext() |
protected Class<? extends IRequestablePage> |
getPageClass(String name)
Loads page class with given name.
|
protected PageComponentInfo |
getPageComponentInfo(Url url)
Extracts the
PageComponentInfo from the URL. |
protected void |
removeMetaParameter(Url urlCopy)
The new
IRequestMapper s use the first query parameter to hold meta information about
the request like page version, component version, locale, ... |
encodePageParameters, extractPageParameters, getMountSegments, getOptionalPlaceholder, getPlaceholder, getPlaceholder, resolveLocale, safeSegmentGetter, urlStartsWith
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCompatibilityScore, mapHandler, mapRequest
protected IMapperContext getContext()
protected PageComponentInfo getPageComponentInfo(Url url)
PageComponentInfo
from the URL. The PageComponentInfo
is encoded
as the very first query parameter and the parameter consists of name only (no value).url
- null
otherwise.protected void encodePageComponentInfo(Url url, PageComponentInfo info)
PageComponentInfo
instance as the first query string parameter to the
URL.url
- info
- protected Class<? extends IRequestablePage> getPageClass(String name)
name
- protected String cleanClassName(String className)
className
- The raw class name parsed from the urlprotected void removeMetaParameter(Url urlCopy)
IRequestMapper
s use the first query parameter to hold meta information about
the request like page version, component version, locale, ... The actual
IRequestMapper
implementation can decide whether the this parameter should be removed
before creating PageParameters
from the current query
parameters
Removes the first query parameter only if PageComponentInfo.parse(String)
returns
non-null instanceremoveMetaParameter
in class AbstractMapper
urlCopy
- the Url
that first query parameter has no valueCopyright © 2006–2022 Apache Software Foundation. All rights reserved.