Package org.apache.wicket.pageStore
Class CryptingPageStore
- java.lang.Object
-
- org.apache.wicket.pageStore.DelegatingPageStore
-
- org.apache.wicket.pageStore.CryptingPageStore
-
- All Implemented Interfaces:
IPageStore
public class CryptingPageStore extends DelegatingPageStore
A store that encrypts all pages before delegating and vice versa.All pages passing through this store are restricted to be
SerializedPage
s. You can achieve this with- a
SerializingPageStore
delegating to this store and - delegating to a store that does not deserialize its pages, e.g. a
DiskPageStore
.
-
-
Constructor Summary
Constructors Constructor Description CryptingPageStore(IPageStore delegate, Application application)
-
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.protected ICrypter
newCrypter()
Create a newICrypter
.boolean
supportsVersioning()
Pages are always serialized, so versioning is supported.-
Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, end, getDelegate, removeAllPages, removePage, revertPage
-
-
-
-
Constructor Detail
-
CryptingPageStore
public CryptingPageStore(IPageStore delegate, Application application)
- Parameters:
delegate
- store to delegate toapplication
- the application
-
-
Method Detail
-
supportsVersioning
public boolean supportsVersioning()
Pages are always serialized, so versioning is supported.- 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
-
newCrypter
protected ICrypter newCrypter()
Create a newICrypter
.
-
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.
-
-