Class MountedMapper

  • All Implemented Interfaces:
    IRequestMapper
    Direct Known Subclasses:
    HomePageMapper

    public class MountedMapper
    extends AbstractBookmarkableMapper
    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. Optional parameters are denoted by using a # instead of $: /mount/#{foo}/path/${bar} has an optional foo parameter, a fixed /path/ part and a required bar parameter. When in doubt, parameters are matched from left to right, where required parameters are matched before optional parameters, and optional parameters eager (from left to right).

    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 (BookmarkableListenerRequestHandler 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)
     
    Author:
    Matej Knopp