Class DefaultPageFactory

  • All Implemented Interfaces:
    IPageFactory

    public final class DefaultPageFactory
    extends java.lang.Object
    implements IPageFactory
    A factory that constructs Pages.
    Author:
    Juergen Donnerstag, Jonathan Locke
    See Also:
    IPageFactory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <C extends IRequestablePage>
      boolean
      isBookmarkable​(java.lang.Class<C> pageClass)
      Checks whether a page can be instantiated using a bookmarkable URL.
      <C extends IRequestablePage>
      C
      newPage​(java.lang.Class<C> pageClass)
      Creates a new page using a page class.
      <C extends IRequestablePage>
      C
      newPage​(java.lang.Class<C> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)
      Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultPageFactory

        public DefaultPageFactory()
    • Method Detail

      • newPage

        public final <C extends IRequestablePage> C newPage​(java.lang.Class<C> pageClass)
        Description copied from interface: IPageFactory
        Creates a new page using a page class.
        Specified by:
        newPage in interface IPageFactory
        Type Parameters:
        C - the type of the page class
        Parameters:
        pageClass - The page class to instantiate
        Returns:
        The page
      • newPage

        public final <C extends IRequestablePage> C newPage​(java.lang.Class<C> pageClass,
                                                            org.apache.wicket.request.mapper.parameter.PageParameters parameters)
        Description copied from interface: IPageFactory
        Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists. If no such constructor exists and the parameters argument is null or empty, then any available default constructor will be used.
        Specified by:
        newPage in interface IPageFactory
        Type Parameters:
        C - the type of the page class
        Parameters:
        pageClass - The class of Page to create
        parameters - Any parameters to pass to the Page's constructor
        Returns:
        The new page
      • isBookmarkable

        public <C extends IRequestablePage> boolean isBookmarkable​(java.lang.Class<C> pageClass)
        Description copied from interface: IPageFactory
        Checks whether a page can be instantiated using a bookmarkable URL.
        Specified by:
        isBookmarkable in interface IPageFactory
        Type Parameters:
        C - the type of the page class
        Parameters:
        pageClass - The class of page to check for bookmarkability
        Returns:
        true if the page can be instantiated by this IPageFactory