org.apache.wicket.page
Interface IPageManager

All Known Implementing Classes:
AbstractPageManager, MockPageManager, PageManagerDecorator, PageStoreManager

public interface IPageManager

Page manager.

Author:
Matej Knopp

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(String sessionId)
          Invoked when the session has been expired.
 boolean supportsVersioning()
          Returns whether this manager supports versioning.
 void touchPage(IManageablePage page)
          Marks page as changed.
 

Method Detail

getContext

IPageManagerContext getContext()
Returns:
the page manager context

getPage

IManageablePage getPage(int id)
                        throws CouldNotLockPageException
Retrieve page instance with given id.

Parameters:
id - the id of the page to load
Returns:
page instance or null
Throws:
CouldNotLockPageException - if the page is already locked by another thread and the lock cannot be acquired for some timeout

touchPage

void touchPage(IManageablePage page)
               throws CouldNotLockPageException
Marks page as changed.

Note:Only stateful pages are stored.

Parameters:
page - the page that should be stored in the page stores at the end of the request.
Throws:
CouldNotLockPageException - if the page is already locked by another thread and the lock cannot be acquired for some timeout

supportsVersioning

boolean supportsVersioning()
Returns whether this manager supports versioning. Managers that support versioning must store page snapshots.

Returns:
whether this page manager supports versioning

commitRequest

void commitRequest()
Commits the changes to external storage if the manager uses it. Should also detach all pages that were touched during this request.


newSessionCreated

void newSessionCreated()
Invoked when new session has been created.


sessionExpired

void sessionExpired(String sessionId)
Invoked when the session has been expired.

Parameters:
sessionId - the id of the expired session

destroy

void destroy()
Destroy the page manager.



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