public abstract class AbstractPageManager extends Object implements IPageManager
IPageManager
implementations. Subclass should extend
RequestAdapter
and override newRequestAdapter(IPageManagerContext)
method to return it's
RequestAdapter
implementation.Constructor and Description |
---|
AbstractPageManager(IPageManagerContext context)
Construct.
|
Modifier and Type | Method and Description |
---|---|
void |
commitRequest()
Commits the changes to external storage if the manager uses it.
|
void |
endRequest()
End the current request.
|
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.
|
void |
removePage(IManageablePage page)
Removes a page from the
IPageStore and
IDataStore . |
void |
touchPage(IManageablePage page)
Marks page as changed.
|
void |
untouchPage(IManageablePage page)
Marks page as non-changed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, destroy, supportsVersioning
public AbstractPageManager(IPageManagerContext context)
context
- protected abstract RequestAdapter newRequestAdapter(IPageManagerContext context)
context
- public IPageManagerContext getContext()
getContext
in interface IPageManager
protected RequestAdapter getRequestAdapter()
newRequestAdapter(IPageManagerContext)
public void endRequest()
IPageManager
endRequest
in interface IPageManager
public void commitRequest()
IPageManager
commitRequest
in interface IPageManager
public IManageablePage getPage(int id)
IPageManager
getPage
in interface IPageManager
id
- the id of the page to loadnull
public void removePage(IManageablePage page)
IPageManager
IPageStore
and
IDataStore
. Any attempt to access it later
will lead to PageExpiredException
removePage
in interface IPageManager
page
- The page instance to remove from the storespublic void newSessionCreated()
IPageManager
newSessionCreated
in interface IPageManager
public void touchPage(IManageablePage page)
IPageManager
Note:Only stateful pages are stored.
touchPage
in interface IPageManager
page
- the page that should be stored in the page stores at the end of the request.public void untouchPage(IManageablePage page)
IPageManager
untouchPage
in interface IPageManager
page
- the page that should not be stored in the page stores at the end of the request.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.