org.apache.wicket.page
Class AbstractPageManager

java.lang.Object
  extended by org.apache.wicket.page.AbstractPageManager
All Implemented Interfaces:
IPageManager
Direct Known Subclasses:
PageStoreManager

public abstract class AbstractPageManager
extends java.lang.Object
implements IPageManager

Convenience class for IPageManager implementations. Subclass should extend RequestAdapter and override #newRequestAdater() method to return it's RequestAdapter implementation.

Author:
Matej Knopp

Constructor Summary
AbstractPageManager(IPageManagerContext context)
          Construct.
 
Method Summary
 void commitRequest()
          Commits the changes to external storage if the manager uses it.
 IPageManagerContext getContext()
           
 IManageablePage getPage(int id)
          Retrieve page instance with given id.
protected  RequestAdapter getRequestAdapter()
           
protected abstract  RequestAdapter newRequestAdapter(IPageManagerContext context)
           
 void newSessionCreated()
          Invoked when new session has been created.
abstract  void sessionExpired(java.lang.String sessionId)
          Invoked when the session has been expired.
abstract  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
 
Methods inherited from interface org.apache.wicket.page.IPageManager
destroy
 

Constructor Detail

AbstractPageManager

public AbstractPageManager(IPageManagerContext context)
Construct.

Parameters:
context -
Method Detail

newRequestAdapter

protected abstract RequestAdapter newRequestAdapter(IPageManagerContext context)
Parameters:
context -
Returns:
a new request adapter

supportsVersioning

public abstract 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
See Also:
IPageManager.supportsVersioning()

sessionExpired

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

Specified by:
sessionExpired in interface IPageManager
See Also:
IPageManager.sessionExpired(java.lang.String)

getContext

public IPageManagerContext getContext()
Specified by:
getContext in interface IPageManager
Returns:
The page manager context

getRequestAdapter

protected RequestAdapter getRequestAdapter()
Returns:
the request adapter
See Also:
newRequestAdapter(IPageManagerContext)

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
See Also:
IPageManager.commitRequest()

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
See Also:
IPageManager.getPage(int)

newSessionCreated

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

Specified by:
newSessionCreated in interface IPageManager
See Also:
IPageManager.newSessionCreated()

touchPage

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

Specified by:
touchPage in interface IPageManager
See Also:
IPageManager.touchPage(org.apache.wicket.page.IManageablePage)


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