org.apache.wicket.pageStore
Interface IPageStore

All Known Implementing Classes:
DefaultPageStore

public interface IPageStore

IPageStore role is to mediate the storing and loading of pages done by IDataStore s. IPageStore may pre-process the pages before passing them to IDataStore.storeData(String, int, byte[]) and to post-process them after IDataStore.getData(String, int).

See Also:
IDataStore

Method Summary
 IManageablePage convertToPage(java.lang.Object page)
          Converts a page representation to an instance of IManageablePage
 void destroy()
          Destroy the store.
 IManageablePage getPage(java.lang.String sessionId, int pageId)
          Restores a page from the persistent layer.
 java.io.Serializable prepareForSerialization(java.lang.String sessionId, java.lang.Object page)
          Process the page before the it gets serialized.
 void removePage(java.lang.String sessionId, int pageId)
          Removes a page from the persistent layer.
 java.lang.Object restoreAfterSerialization(java.io.Serializable serializable)
          This method should restore the serialized page to intermediate object that can be converted to real page instance using convertToPage(Object).
 void storePage(java.lang.String sessionId, IManageablePage page)
          Stores the page to a persistent layer.
 void unbind(java.lang.String sessionId)
          The page store should cleanup all the pages for that sessionid.
 

Method Detail

destroy

void destroy()
Destroy the store.


getPage

IManageablePage getPage(java.lang.String sessionId,
                        int pageId)
Restores a page from the persistent layer.

Parameters:
sessionId - The session of the page that must be removed
pageId - The id of the page.
Returns:
The page

removePage

void removePage(java.lang.String sessionId,
                int pageId)
Removes a page from the persistent layer.

Parameters:
sessionId - The session of the page that must be removed
pageId - The id of the page.

storePage

void storePage(java.lang.String sessionId,
               IManageablePage page)
Stores the page to a persistent layer. The page should be stored under the id and the version number.

Parameters:
sessionId - The session of the page that must be removed
page - The page to store

unbind

void unbind(java.lang.String sessionId)
The page store should cleanup all the pages for that sessionid.

Parameters:
sessionId - The session of the page that must be removed

prepareForSerialization

java.io.Serializable prepareForSerialization(java.lang.String sessionId,
                                             java.lang.Object page)
Process the page before the it gets serialized. The page can be either real page instance or object returned by restoreAfterSerialization(Serializable).

Parameters:
sessionId - The session of the page that must be removed
page -
Returns:
The Page itself or a SerializedContainer for that page

restoreAfterSerialization

java.lang.Object restoreAfterSerialization(java.io.Serializable serializable)
This method should restore the serialized page to intermediate object that can be converted to real page instance using convertToPage(Object).

Parameters:
sessionId - The session of the page that must be removed
serializable -
Returns:
Page

convertToPage

IManageablePage convertToPage(java.lang.Object page)
Converts a page representation to an instance of IManageablePage

Parameters:
page - some kind of page representation
Returns:
page


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.