java.lang.Object
org.apache.wicket.request.mapper.AbstractMapper
org.apache.wicket.core.request.mapper.AbstractComponentMapper
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper
org.apache.wicket.core.request.mapper.MountedMapper
org.apache.wicket.core.request.mapper.HomePageMapper
- All Implemented Interfaces:
IRequestMapper
A mapper that is used when a request to the home page ("/") is made
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper
AbstractBookmarkableMapper.MountPathSegment, AbstractBookmarkableMapper.UrlInfo
-
Field Summary
Fields inherited from class org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper
mountSegments, pageParametersEncoder, pathSegments
-
Constructor Summary
ConstructorDescriptionHomePageMapper
(Class<? extends IRequestablePage> pageClass) Construct.HomePageMapper
(Class<? extends IRequestablePage> pageClass, IPageParametersEncoder pageParametersEncoder) Construct.HomePageMapper
(Supplier<Class<? extends IRequestablePage>> pageClassProvider) Construct. -
Method Summary
Modifier and TypeMethodDescriptionint
getCompatibilityScore
(Request request) Use this mapper as a last option.protected AbstractBookmarkableMapper.UrlInfo
parseRequest
(Request request) Matches only when there are no segments/indexed parametersMethods inherited from class org.apache.wicket.core.request.mapper.MountedMapper
buildUrl, checkPageClass, mapHandler, pageMustHaveBeenCreatedBookmarkable, redirectFromHomePage, toString
Methods inherited from class org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper
checkPageInstance, extractPageParameters, getMatchedSegmentSizes, getPageInfo, getPathSegments, isCaseSensitiveMatch, isFixedSegment, mapRequest, newPageParameters, processBookmarkable, processHybrid, processListener, resolveUserLocale, segmentsMatch, setCaseSensitiveMatch, setPlaceholders, urlStartsWithMountedSegments
Methods inherited from class org.apache.wicket.core.request.mapper.AbstractComponentMapper
cleanClassName, encodePageComponentInfo, getContext, getPageClass, getPageComponentInfo, removeMetaParameter
Methods inherited from class org.apache.wicket.request.mapper.AbstractMapper
encodePageParameters, extractPageParameters, getMountSegments, getOptionalPlaceholder, getPlaceholder, getPlaceholder, resolveLocale, safeSegmentGetter, urlStartsWith
-
Constructor Details
-
HomePageMapper
Construct.- Parameters:
pageClass
- the class of the page which should handle requests to "/"
-
HomePageMapper
Construct.- Parameters:
pageClassProvider
- the class of the page which should handle requests to "/"
-
HomePageMapper
public HomePageMapper(Class<? extends IRequestablePage> pageClass, IPageParametersEncoder pageParametersEncoder) Construct.- Parameters:
pageClass
- the class of the page which should handle requests to "/"pageParametersEncoder
- the encoder that will be used to encode/decode the page parameters
-
-
Method Details
-
parseRequest
Matches only when there are no segments/indexed parameters- Overrides:
parseRequest
in classMountedMapper
- Returns:
- UrlInfo instance or
null
if this encoder can not handle the request - See Also:
-
getCompatibilityScore
Use this mapper as a last option. Let all other mappers to try to handle the request- Specified by:
getCompatibilityScore
in interfaceIRequestMapper
- Overrides:
getCompatibilityScore
in classAbstractBookmarkableMapper
- Returns:
- the compatibility score, e.g. count of matching segments
- See Also:
-