Class HomePageMapper
- 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
public class HomePageMapper extends MountedMapper
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
Constructors Constructor Description HomePageMapper(Class<? extends IRequestablePage> pageClass)
Construct.HomePageMapper(Class<? extends IRequestablePage> pageClass, IPageParametersEncoder pageParametersEncoder)
Construct.HomePageMapper(Supplier<Class<? extends IRequestablePage>> pageClassProvider)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCompatibilityScore(Request request)
Use this mapper as a last option.protected AbstractBookmarkableMapper.UrlInfo
parseRequest(Request request)
Matches only when there are no segments/indexed parameters-
Methods 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 Detail
-
HomePageMapper
public HomePageMapper(Class<? extends IRequestablePage> pageClass)
Construct.- Parameters:
pageClass
- the class of the page which should handle requests to "/"
-
HomePageMapper
public HomePageMapper(Supplier<Class<? extends IRequestablePage>> pageClassProvider)
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 Detail
-
parseRequest
protected AbstractBookmarkableMapper.UrlInfo parseRequest(Request request)
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:
AbstractBookmarkableMapper.parseRequest(org.apache.wicket.request.Request)
-
getCompatibilityScore
public int getCompatibilityScore(Request request)
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:
AbstractBookmarkableMapper.getCompatibilityScore(org.apache.wicket.request.Request)
-
-