Package com.microstrategy.web.app.beans
Class PageHistoryList
- java.lang.Object
- 
- com.microstrategy.utils.serialization.AbstractPersistable
- 
- com.microstrategy.web.app.beans.PageHistoryList
 
 
- 
- All Implemented Interfaces:
- EnumWebPersistableState,- Persistable
 
 public class PageHistoryList extends AbstractPersistable Class that represents the page history to be used on the Back/Forward buttons.
 Contains a list ofPageHistoryItem- Since:
- MicroStrategy Web 9.0.0
 
- 
- 
Field Summary- 
Fields inherited from class com.microstrategy.utils.serialization.AbstractPersistablescriptEndTagEncoder
 - 
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableStateBARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
 
- 
 - 
Constructor SummaryConstructors Constructor Description PageHistoryList()PageHistoryList(AppContext appContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPage(PageHistoryItem page)Adds a page after the current page and clears the end of the collection if the page is different to the current page.voidaddPage(PageHistoryItem page, boolean replaceExistingPage)Adds a page after the current page and clears the end of the collection if the page is different to the current page.voidclearForwardPages()Clear all pages after current positionprotected voiddoFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)java.util.List<java.lang.String>getBackHistoryPages()java.util.List<java.lang.String>getForwardHistoryPages()PageHistoryItemgetPage(int relativePageNumber)Return the page located at the relative index specified.booleanisNextAvailable()booleanisPreviousAvailable()PageHistoryItempeekPage(int relativePageNumber)Return the page located at the relative index specified.voidsetCapacity(int capacity)Sets the size of the page history listvoidsetOutOfBounds(boolean value)Sets the list in an out of bounds state.- 
Methods inherited from class com.microstrategy.utils.serialization.AbstractPersistabledoFlatState, getStateHandler, isXMLStateZipped, restoreState, restoreState, restoreXMLState, saveState, saveState, saveState, saveState, saveXMLState, saveXMLState
 
- 
 
- 
- 
- 
Constructor Detail- 
PageHistoryListpublic PageHistoryList() 
 - 
PageHistoryListpublic PageHistoryList(AppContext appContext) 
 
- 
 - 
Method Detail- 
addPagepublic void addPage(PageHistoryItem page) Adds a page after the current page and clears the end of the collection if the page is different to the current page.
 If adding a page in the middle of the collection and the key of the new page is the same as the existing page in the collection, it will replace the page- Parameters:
- page- page to add
 
 - 
addPagepublic void addPage(PageHistoryItem page, boolean replaceExistingPage) Adds a page after the current page and clears the end of the collection if the page is different to the current page.
 If adding a page in the middle of the collection and the key of the new page is the same as the existing page in the collection, it will replace the page- Parameters:
- page- page to add
- replaceExistingPage- whether to replace the existing page
 
 - 
isNextAvailablepublic boolean isNextAvailable() - Returns:
- whether there is a next (forward) element on the page history
 
 - 
isPreviousAvailablepublic boolean isPreviousAvailable() - Returns:
- whether there is a previous (back) element on the page history
 
 - 
setOutOfBoundspublic void setOutOfBounds(boolean value) Sets the list in an out of bounds state. This mean that the current page is not being saved so going back means going to the current page- Parameters:
- value- whether the list is out of bounds
 
 - 
getPagepublic PageHistoryItem getPage(int relativePageNumber) Return the page located at the relative index specified.
 The page returned becomes the current page on the collection.- Parameters:
- relativePageNumber- the relative page number (0 for current, -1 for previous, +1 for next)
- Returns:
- the respective history page
 
 - 
peekPagepublic PageHistoryItem peekPage(int relativePageNumber) Return the page located at the relative index specified.- Parameters:
- relativePageNumber- the relative page number (0 for current, -1 for previous, +1 for next)
- Returns:
- the respective history page
 
 - 
getBackHistoryPagespublic java.util.List<java.lang.String> getBackHistoryPages() - Returns:
- a Listcontaining a collection of page titles located previously to the current one on the page history list.
 
 - 
getForwardHistoryPagespublic java.util.List<java.lang.String> getForwardHistoryPages() - Returns:
- a Listcontaining a collection of page titles located subsecuently to the current one on the page history list.
 
 - 
setCapacitypublic void setCapacity(int capacity) Sets the size of the page history list- Parameters:
- capacity-
 
 - 
clearForwardPagespublic void clearForwardPages() Clear all pages after current position
 - 
doFlatStateprotected void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer) - Overrides:
- doFlatStatein class- AbstractPersistable
 
 
- 
 
-