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
SerializedPages. You can achieve this with- a
SerializingPageStoredelegating 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)
-
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.protected ICrypternewCrypter(IPageContext context)Create a newICrypterfor the given context.booleansupportsVersioning()Pages are always serialized, so versioning is supported.-
Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, getDelegate, removeAllPages, removePage
-
-
-
-
Constructor Detail
-
CryptingPageStore
public CryptingPageStore(IPageStore delegate)
- Parameters:
delegate- store to delegate toapplicationName- name of application
-
-
Method Detail
-
supportsVersioning
public boolean supportsVersioning()
Pages are always serialized, so versioning is supported.- 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
-
newCrypter
protected ICrypter newCrypter(IPageContext context)
Create a newICrypterfor the given context.
-
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
-
-