Package org.apache.wicket
Class DefaultMapperContext
- java.lang.Object
-
- org.apache.wicket.DefaultMapperContext
-
- All Implemented Interfaces:
IMapperContext
,IPageSource
public class DefaultMapperContext extends Object implements IMapperContext
Wicket's default implementation for the mapper context
-
-
Constructor Summary
Constructors Constructor Description DefaultMapperContext()
Constructor.DefaultMapperContext(Application application)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBookmarkableIdentifier()
Class<? extends IRequestablePage>
getHomePageClass()
Returns the home page class.String
getNamespace()
String
getPageIdentifier()
IRequestablePage
getPageInstance(int pageId)
Returns existing page instance if the page exists.String
getResourceIdentifier()
ResourceReferenceRegistry
getResourceReferenceRegistry()
IRequestablePage
newPageInstance(Class<? extends IRequestablePage> pageClass, PageParameters pageParameters)
Creates new page instance of page with given class.
-
-
-
Constructor Detail
-
DefaultMapperContext
public DefaultMapperContext()
Constructor. Uses the thread local Application
-
DefaultMapperContext
public DefaultMapperContext(Application application)
Constructor.- Parameters:
application
- the application instance to use
-
-
Method Detail
-
getBookmarkableIdentifier
public String getBookmarkableIdentifier()
- Specified by:
getBookmarkableIdentifier
in interfaceIMapperContext
- Returns:
- identifier for bookmarkable URLs
-
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interfaceIMapperContext
- Returns:
- the namespace for Wicket URLs.
-
getPageIdentifier
public String getPageIdentifier()
- Specified by:
getPageIdentifier
in interfaceIMapperContext
- Returns:
- identifier for non bookmarkable URLs
-
getResourceIdentifier
public String getResourceIdentifier()
- Specified by:
getResourceIdentifier
in interfaceIMapperContext
- Returns:
- identifier for resources
-
getResourceReferenceRegistry
public ResourceReferenceRegistry getResourceReferenceRegistry()
- Specified by:
getResourceReferenceRegistry
in interfaceIMapperContext
- Returns:
ResourceReferenceRegistry
-
newPageInstance
public IRequestablePage newPageInstance(Class<? extends IRequestablePage> pageClass, PageParameters pageParameters)
Description copied from interface:IPageSource
Creates new page instance of page with given class. The page should be marked as create bookmarkable, so subsequent calls toIRequestablePage.wasCreatedBookmarkable()
must returntrue
- Specified by:
newPageInstance
in interfaceIPageSource
- Returns:
- new page instance
-
getPageInstance
public IRequestablePage getPageInstance(int pageId)
Description copied from interface:IPageSource
Returns existing page instance if the page exists.- Specified by:
getPageInstance
in interfaceIPageSource
- Returns:
- page instance or
null
if the page does not exist.
-
getHomePageClass
public Class<? extends IRequestablePage> getHomePageClass()
Description copied from interface:IMapperContext
Returns the home page class.- Specified by:
getHomePageClass
in interfaceIMapperContext
- Returns:
- home page class
-
-