Package org.apache.wicket.pageStore
Class SerializingPageStore
- java.lang.Object
-
- org.apache.wicket.pageStore.DelegatingPageStore
-
- org.apache.wicket.pageStore.SerializingPageStore
-
- All Implemented Interfaces:
IPageStore
public class SerializingPageStore extends DelegatingPageStore
A store that serializes all pages before delegating and vice versa.
-
-
Constructor Summary
Constructors Constructor Description SerializingPageStore(IPageStore delegate, ISerializer serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPage(IPageContext context, IManageablePage page)
Stores the page-boolean
canBeAsynchronous(IPageContext context)
Supports asynchronous add if the delegate supports it.IManageablePage
getPage(IPageContext context, int id)
Restores a page from storage.boolean
supportsVersioning()
Versioning is supported, since pages are always serialized.-
Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, end, getDelegate, removeAllPages, removePage, revertPage
-
-
-
-
Constructor Detail
-
SerializingPageStore
public SerializingPageStore(IPageStore delegate, ISerializer serializer)
- Parameters:
delegate
- store to delegate toserializer
- serializer to use if session gets persisted
-
-
Method Detail
-
supportsVersioning
public boolean supportsVersioning()
Versioning is supported, since pages are always serialized.- Specified by:
supportsVersioning
in interfaceIPageStore
- Overrides:
supportsVersioning
in classDelegatingPageStore
-
canBeAsynchronous
public boolean canBeAsynchronous(IPageContext context)
Supports asynchronous add if the delegate supports it.- Returns:
- whether
IPageStore.addPage(IPageContext, IManageablePage)
may be called asynchronously, default isfalse
-
getPage
public IManageablePage getPage(IPageContext context, int id)
Description copied from interface:IPageStore
Restores a page from storage.- Specified by:
getPage
in interfaceIPageStore
- Overrides:
getPage
in classDelegatingPageStore
- Parameters:
context
- the context of the pageid
- the id of the page.- Returns:
- the page
-
addPage
public void addPage(IPageContext context, IManageablePage page)
Description copied from interface:IPageStore
Stores the page-- Specified by:
addPage
in interfaceIPageStore
- Overrides:
addPage
in classDelegatingPageStore
- Parameters:
context
- the context of the pagepage
- the page.
-
-