|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.request.mapper.AbstractMapper org.apache.wicket.request.mapper.AbstractComponentMapper org.apache.wicket.request.mapper.AbstractBookmarkableMapper org.apache.wicket.request.mapper.MountedMapper
public class MountedMapper
Encoder for mounted URL. The mount path can contain parameter placeholders, i.e.
/mount/${foo}/path
. In that case the appropriate segment from the URL will be
accessible as named parameter "foo" in the PageParameters
. Similarly when the URL is
constructed, the second segment will contain the value of the "foo" named page parameter.
Decodes and encodes the following URLs:
Page Class - Render (BookmarkablePageRequestHandler for mounted pages) /mount/point (these will redirect to hybrid alternative if page is not stateless) IPage Instance - Render Hybrid (RenderPageRequestHandler for mounted pages) /mount/point?2 IPage Instance - Bookmarkable Listener (BookmarkableListenerInterfaceRequestHandler for mounted pages) /mount/point?2-click-foo-bar-baz /mount/point?2-5.click.1-foo-bar-baz (1 is behavior index, 5 is render count) (these will redirect to hybrid if page is not stateless)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.request.mapper.AbstractBookmarkableMapper |
---|
AbstractBookmarkableMapper.UrlInfo |
Constructor Summary | |
---|---|
MountedMapper(String mountPath,
Class<? extends IRequestablePage> pageClass)
Construct. |
|
MountedMapper(String mountPath,
Class<? extends IRequestablePage> pageClass,
IPageParametersEncoder pageParametersEncoder)
Construct. |
|
MountedMapper(String mountPath,
ClassProvider<? extends IRequestablePage> pageClassProvider)
Construct. |
|
MountedMapper(String mountPath,
ClassProvider<? extends IRequestablePage> pageClassProvider,
IPageParametersEncoder pageParametersEncoder)
Construct. |
Method Summary | |
---|---|
protected Url |
buildUrl(AbstractBookmarkableMapper.UrlInfo info)
Builds URL for the given AbstractBookmarkableMapper.UrlInfo instance. |
protected boolean |
checkPageClass(Class<? extends IRequestablePage> pageClass)
|
int |
getCompatibilityScore(Request request)
|
protected PageParameters |
newPageParameters()
|
protected boolean |
pageMustHaveBeenCreatedBookmarkable()
Indicates whether hybrid RenderPageRequestHandler URL for page will be generated only
if page has been created with bookmarkable URL. |
protected AbstractBookmarkableMapper.UrlInfo |
parseRequest(Request request)
Parse the given request to an AbstractBookmarkableMapper.UrlInfo instance. |
protected boolean |
redirectFromHomePage()
If this method returns true and application home page class is same as the class
mounted with this encoder, request to home page will result in a redirect to the mounted
path. |
Methods inherited from class org.apache.wicket.request.mapper.AbstractBookmarkableMapper |
---|
mapHandler, mapRequest |
Methods inherited from class org.apache.wicket.request.mapper.AbstractComponentMapper |
---|
encodePageComponentInfo, getContext, getPageClass, getPageComponentInfo, removeMetaParameter, requestListenerInterfaceFromString, requestListenerInterfaceToString |
Methods inherited from class org.apache.wicket.request.mapper.AbstractMapper |
---|
encodePageParameters, extractPageParameters, getMountSegments, getPlaceholder, urlStartsWith |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MountedMapper(String mountPath, Class<? extends IRequestablePage> pageClass)
mountPath
- pageClass
- public MountedMapper(String mountPath, ClassProvider<? extends IRequestablePage> pageClassProvider)
mountPath
- pageClassProvider
- public MountedMapper(String mountPath, Class<? extends IRequestablePage> pageClass, IPageParametersEncoder pageParametersEncoder)
mountPath
- pageClass
- pageParametersEncoder
- public MountedMapper(String mountPath, ClassProvider<? extends IRequestablePage> pageClassProvider, IPageParametersEncoder pageParametersEncoder)
mountPath
- pageClassProvider
- pageParametersEncoder
- Method Detail |
---|
protected AbstractBookmarkableMapper.UrlInfo parseRequest(Request request)
AbstractBookmarkableMapper
AbstractBookmarkableMapper.UrlInfo
instance.
parseRequest
in class AbstractBookmarkableMapper
null
if this encoder can not handle the requestAbstractBookmarkableMapper.parseRequest(org.apache.wicket.request.Request)
protected PageParameters newPageParameters()
protected Url buildUrl(AbstractBookmarkableMapper.UrlInfo info)
AbstractBookmarkableMapper
AbstractBookmarkableMapper.UrlInfo
instance. The URL this method produces must be
parseable by the AbstractBookmarkableMapper.parseRequest(Request)
method.
buildUrl
in class AbstractBookmarkableMapper
AbstractBookmarkableMapper.buildUrl(org.apache.wicket.request.mapper.AbstractBookmarkableMapper.UrlInfo)
protected boolean redirectFromHomePage()
true
and application home page class is same as the class
mounted with this encoder, request to home page will result in a redirect to the mounted
path.
protected boolean pageMustHaveBeenCreatedBookmarkable()
AbstractBookmarkableMapper
RenderPageRequestHandler
URL for page will be generated only
if page has been created with bookmarkable URL.
For generic bookmarkable encoders this method should return true
. For explicit
(mounted) encoders this method should return false
pageMustHaveBeenCreatedBookmarkable
in class AbstractBookmarkableMapper
true
if hybrid URL requires page created bookmarkable,
false
otherwise.AbstractBookmarkableMapper.pageMustHaveBeenCreatedBookmarkable()
public int getCompatibilityScore(Request request)
getCompatibilityScore
in interface IRequestMapper
getCompatibilityScore
in class AbstractBookmarkableMapper
AbstractBookmarkableMapper.getCompatibilityScore(org.apache.wicket.request.Request)
protected boolean checkPageClass(Class<? extends IRequestablePage> pageClass)
checkPageClass
in class AbstractBookmarkableMapper
AbstractBookmarkableMapper.checkPageClass(java.lang.Class)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |