org.apache.wicket.page
Class RequestAdapter

java.lang.Object
  extended by org.apache.wicket.page.RequestAdapter
Direct Known Subclasses:
PageStoreManager.PersistentRequestAdapter

public abstract class RequestAdapter
extends java.lang.Object

Request scoped helper class for IPageManager.

Author:
Matej Knopp

Constructor Summary
RequestAdapter(IPageManagerContext context)
          Construct.
 
Method Summary
protected  void bind()
          Bind the session
protected  void commitRequest()
           
protected abstract  IManageablePage getPage(int id)
          Returns the page with specified id.
 java.io.Serializable getSessionAttribute(java.lang.String key)
           
 java.lang.String getSessionId()
           
protected abstract  void newSessionCreated()
          Notification on new session being created.
 void setSessionAttribute(java.lang.String key, java.io.Serializable value)
           
protected abstract  void storeTouchedPages(java.util.List<IManageablePage> touchedPages)
          Store the list of stateful pages.
protected  void touch(IManageablePage page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestAdapter

public RequestAdapter(IPageManagerContext context)
Construct.

Parameters:
context - The page manager context
Method Detail

getPage

protected abstract IManageablePage getPage(int id)
Returns the page with specified id. The page is then cached by RequestAdapter during the rest of request processing.

Parameters:
id -
Returns:
page instance or null if the page does not exist.

storeTouchedPages

protected abstract void storeTouchedPages(java.util.List<IManageablePage> touchedPages)
Store the list of stateful pages.

Parameters:
touchedPages -

newSessionCreated

protected abstract void newSessionCreated()
Notification on new session being created.


bind

protected void bind()
Bind the session

See Also:
IPageManagerContext.bind()

setSessionAttribute

public void setSessionAttribute(java.lang.String key,
                                java.io.Serializable value)
Parameters:
key -
value -
See Also:
IPageManagerContext.setSessionAttribute(String, Serializable)

getSessionAttribute

public java.io.Serializable getSessionAttribute(java.lang.String key)
Parameters:
key -
Returns:
the session attribute
See Also:
IPageManagerContext.getSessionAttribute(String)

getSessionId

public java.lang.String getSessionId()
Returns:
session id
See Also:
IPageManagerContext.getSessionId()

touch

protected void touch(IManageablePage page)
Parameters:
page -

commitRequest

protected void commitRequest()


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