Package org.apache.wicket.pageStore
Class GroupingPageStore
- java.lang.Object
-
- org.apache.wicket.pageStore.DelegatingPageStore
-
- org.apache.wicket.pageStore.GroupingPageStore
-
- All Implemented Interfaces:
IPageStore
public abstract class GroupingPageStore extends DelegatingPageStore
AnIPageStorethat groups pages.By default all pages are stored in a single group, you'll have to override
getGroup(IManageablePage)to provide the actual group for a stored page, e.g. using a single group for all pages inside a single browser tab.
-
-
Constructor Summary
Constructors Constructor Description GroupingPageStore(IPageStore delegate, int maxGroups)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPage(IPageContext context, IManageablePage page)Stores the page-protected java.lang.StringgetGroup(IManageablePage page)Get the group of a page, default is"default"IManageablePagegetPage(IPageContext context, int id)Restores a page from storage.voidremoveAllPages(IPageContext context)All pages should be removed from storage for the given context.voidremovePage(IPageContext context, IManageablePage page)Removes a page from storage.GroupingPageStorewithStableGroups()Indicate that groups are stable, i.e.-
Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, getDelegate, supportsVersioning
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.pageStore.IPageStore
canBeAsynchronous
-
-
-
-
Constructor Detail
-
GroupingPageStore
public GroupingPageStore(IPageStore delegate, int maxGroups)
- Parameters:
delegate- store to delegate tomaxGroups- maximum groups to keep
-
-
Method Detail
-
withStableGroups
public GroupingPageStore withStableGroups()
Indicate that groups are stable, i.e. the group of a page never changes.
-
getGroup
protected java.lang.String getGroup(IManageablePage page)
Get the group of a page, default is"default"- Returns:
- group of page, must not be empty
-
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
-
removePage
public void removePage(IPageContext context, IManageablePage page)
Description copied from interface:IPageStoreRemoves a page from storage.- Specified by:
removePagein interfaceIPageStore- Overrides:
removePagein classDelegatingPageStore- Parameters:
context- the context of the page
-
removeAllPages
public void removeAllPages(IPageContext context)
Description copied from interface:IPageStoreAll pages should be removed from storage for the given context.- Specified by:
removeAllPagesin interfaceIPageStore- Overrides:
removeAllPagesin classDelegatingPageStore- Parameters:
context- the context of the pages
-
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
-
-