- All Known Subinterfaces:
IPersistentPageStore
- All Known Implementing Classes:
AbstractPersistentPageStore
,AsynchronousPageStore
,CachingPageStore
,CryptingPageStore
,DelegatingPageStore
,DiskPageStore
,FilePageStore
,GroupingPageStore
,InMemoryPageStore
,InSessionPageStore
,MockPageStore
,NoopPageStore
,RequestPageStore
,SerializingPageStore
public interface IPageStore
A store of pages
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPage
(IPageContext context, IManageablePage page) Stores the page-default boolean
canBeAsynchronous
(IPageContext context) This method is called byAsynchronousPageStore
before any attempt to calladdPage(IPageContext, IManageablePage)
asynchronously.default void
destroy()
Destroy the store.default void
detach
(IPageContext context) Detach from the current context.default void
end
(IPageContext context) End the current context.getPage
(IPageContext context, int id) Restores a page from storage.void
removeAllPages
(IPageContext context) All pages should be removed from storage for the given context.void
removePage
(IPageContext context, IManageablePage page) Removes a page from storage.default void
revertPage
(IPageContext context, IManageablePage page) Revert adding a page - optional operation.boolean
Is versioning of pages supported, i.e. when an altered page instance has been stored in this store, can the previous state of that page still be retrieved under its former page id.
-
Method Details
-
supportsVersioning
boolean supportsVersioning()Is versioning of pages supported, i.e. when an altered page instance has been stored in this store, can the previous state of that page still be retrieved under its former page id. Most implementations achieve this by keeping a copy of the page instance, e.g. by means of serialization. -
canBeAsynchronous
This method is called byAsynchronousPageStore
before any attempt to calladdPage(IPageContext, IManageablePage)
asynchronously.A page store returning
true
must immediately access all required values from the context, since no additional values can be accessed whenaddPage(IPageContext, IManageablePage)
is called asynchronously afterwards.- Returns:
- whether
addPage(IPageContext, IManageablePage)
may be called asynchronously, default isfalse
-
addPage
Stores the page-- Parameters:
context
- the context of the pagepage
- the page.
-
removePage
Removes a page from storage.- Parameters:
context
- the context of the pagepage
- the page.
-
removeAllPages
All pages should be removed from storage for the given context.- Parameters:
context
- the context of the pages
-
revertPage
Revert adding a page - optional operation.- Parameters:
page
- the page that should be reverted
-
getPage
Restores a page from storage.- Parameters:
context
- the context of the pageid
- the id of the page.- Returns:
- the page
-
end
End the current context.- Parameters:
context
-
-
detach
Detach from the current context.- Parameters:
context
- the context of the pages
-
destroy
Destroy the store.
-