org.apache.wicket.mock
Class MockPageManager

java.lang.Object
  extended by org.apache.wicket.mock.MockPageManager
All Implemented Interfaces:
IPageManager

public class MockPageManager
extends java.lang.Object
implements IPageManager

Simple IPageManager used for testing.

Author:
Matej Knopp

Constructor Summary
MockPageManager()
          Construct.
 
Method Summary
 void commitRequest()
          Commits the changes to external storage if the manager uses it.
 void destroy()
          Destroy the page manager.
 IPageManagerContext getContext()
           
 IManageablePage getPage(int id)
          Retrieve page instance with given id.
 void newSessionCreated()
          Invoked when new session has been created.
 void sessionExpired(java.lang.String sessionId)
          Invoked when the session has been expired.
 void setContext(IPageManagerContext context)
           
 boolean supportsVersioning()
          Returns whether this manager supports versioning.
 void touchPage(IManageablePage page)
          Marks page as changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPageManager

public MockPageManager()
Construct.

Method Detail

commitRequest

public void commitRequest()
Description copied from interface: IPageManager
Commits the changes to external storage if the manager uses it. Should also detach all pages that were touched during this request.

Specified by:
commitRequest in interface IPageManager

destroy

public void destroy()
Description copied from interface: IPageManager
Destroy the page manager.

Specified by:
destroy in interface IPageManager

getPage

public IManageablePage getPage(int id)
Description copied from interface: IPageManager
Retrieve page instance with given id.

Specified by:
getPage in interface IPageManager
Returns:
page instance or null

newSessionCreated

public void newSessionCreated()
Description copied from interface: IPageManager
Invoked when new session has been created.

Specified by:
newSessionCreated in interface IPageManager

sessionExpired

public void sessionExpired(java.lang.String sessionId)
Description copied from interface: IPageManager
Invoked when the session has been expired.

Specified by:
sessionExpired in interface IPageManager

setContext

public void setContext(IPageManagerContext context)
Parameters:
context -

supportsVersioning

public boolean supportsVersioning()
Description copied from interface: IPageManager
Returns whether this manager supports versioning. Managers that support versioning must store page snapshots.

Specified by:
supportsVersioning in interface IPageManager
Returns:
whether this page manager supports versioning

touchPage

public void touchPage(IManageablePage page)
Description copied from interface: IPageManager
Marks page as changed.

Specified by:
touchPage in interface IPageManager

getContext

public IPageManagerContext getContext()
Specified by:
getContext in interface IPageManager
Returns:
the page manager context
See Also:
IPageManager.getContext()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.