Package org.apache.wicket.pageStore
Interface IPageStore
-
- 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
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.IManageablePage
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
supportsVersioning()
Is versioning of pages supported, i.e.
-
-
-
Method Detail
-
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
default boolean canBeAsynchronous(IPageContext context)
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
void addPage(IPageContext context, IManageablePage page)
Stores the page-- Parameters:
context
- the context of the pagepage
- the page.
-
removePage
void removePage(IPageContext context, IManageablePage page)
Removes a page from storage.- Parameters:
context
- the context of the pagepage
- the page.
-
removeAllPages
void removeAllPages(IPageContext context)
All pages should be removed from storage for the given context.- Parameters:
context
- the context of the pages
-
revertPage
default void revertPage(IPageContext context, IManageablePage page)
Revert adding a page - optional operation.- Parameters:
page
- the page that should be reverted
-
getPage
IManageablePage getPage(IPageContext context, int id)
Restores a page from storage.- Parameters:
context
- the context of the pageid
- the id of the page.- Returns:
- the page
-
end
default void end(IPageContext context)
End the current context.- Parameters:
context
-
-
detach
default void detach(IPageContext context)
Detach from the current context.- Parameters:
context
- the context of the pages
-
destroy
default void destroy()
Destroy the store.
-
-