public abstract class AbstractMapper extends Object implements IRequestMapper
| Constructor and Description |
|---|
AbstractMapper()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected Url |
encodePageParameters(Url url,
PageParameters pageParameters,
IPageParametersEncoder encoder)
Encodes the given
PageParameters to the URL using the given
IPageParametersEncoder. |
protected PageParameters |
extractPageParameters(Request request,
int segmentsToSkip,
IPageParametersEncoder encoder)
Extracts
PageParameters from the URL using the given IPageParametersEncoder . |
protected String[] |
getMountSegments(String mountPath)
Convenience method for representing mountPath as array of segments
|
protected String |
getOptionalPlaceholder(String s)
If the string is in an optional parameter placeholder format #{key} this method returns the
key.
|
protected String |
getPlaceholder(String s)
If the string is in a placeholder format ${key} this method returns the key.
|
protected String |
getPlaceholder(String s,
char startChar)
If the string is in a placeholder format x{key}, where 'x' can be specified, this method
returns the key.
|
protected void |
removeMetaParameter(Url urlCopy)
The new
IRequestMappers use the first query parameter to hold meta information about
the request like page version, component version, locale, ... |
protected boolean |
urlStartsWith(Url url,
String... segments)
Returns true if the given url starts with specified segments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCompatibilityScore, mapHandler, mapRequestprotected String getPlaceholder(String s)
s - null if string is not in right formatprotected String getOptionalPlaceholder(String s)
s - null if string is not in right formatprotected String getPlaceholder(String s, char startChar)
s - startChar - the character used to indicate the start of the placeholdernull if string is not in right formatprotected boolean urlStartsWith(Url url, String... segments)
url - segments - true if the URL starts with the specified segments, false
otherwiseprotected PageParameters extractPageParameters(Request request, int segmentsToSkip, IPageParametersEncoder encoder)
PageParameters from the URL using the given IPageParametersEncoder .request - segmentsToSkip - how many URL segments should be skipped because they "belong" to the
IRequestMapperencoder - protected void removeMetaParameter(Url urlCopy)
IRequestMappers 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
parametersurlCopy - the Url that first query parameter has no valueprotected Url encodePageParameters(Url url, PageParameters pageParameters, IPageParametersEncoder encoder)
PageParameters to the URL using the given
IPageParametersEncoder. The original URL object is unchanged.url - pageParameters - encoder - Copyright © 2006–2014 Apache Software Foundation. All rights reserved.