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 voidaddPage(IPageContext context, IManageablePage page)Stores the page-booleancanBeAsynchronous(IPageContext context)Supports asynchronous add if the delegate supports it.IManageablePagegetPage(IPageContext context, int id)Restores a page from storage.booleansupportsVersioning()Versioning is supported, since pages are always serialized.-
Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, getDelegate, removeAllPages, removePage
-
-
-
-
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:
supportsVersioningin interfaceIPageStore- Overrides:
supportsVersioningin 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:IPageStoreRestores a page from storage.- Specified by:
getPagein interfaceIPageStore- Overrides:
getPagein 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:IPageStoreStores the page-- Specified by:
addPagein interfaceIPageStore- Overrides:
addPagein classDelegatingPageStore- Parameters:
context- the context of the page
-
-