public class

PageHistoryList

extends AbstractPersistable
java.lang.Object
   ↳ com.microstrategy.utils.serialization.AbstractPersistable
     ↳ com.microstrategy.web.app.beans.PageHistoryList

Class Overview

Class that represents the page history to be used on the Back/Forward buttons.
Contains a list of PageHistoryItem

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Constructors
PageHistoryList()
PageHistoryList(AppContext appContext)
Public Methods
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.
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.
void clearForwardPages()
Clear all pages after current position
List<String> getBackHistoryPages()
List<String> getForwardHistoryPages()
PageHistoryItem getPage(int relativePageNumber)
Return the page located at the relative index specified.
boolean isNextAvailable()
boolean isPreviousAvailable()
PageHistoryItem peekPage(int relativePageNumber)
Return the page located at the relative index specified.
void setCapacity(int capacity)
Sets the size of the page history list
void setOutOfBounds(boolean value)
Sets the list in an out of bounds state.
Protected Methods
void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
[Expand]
Inherited Methods
From class com.microstrategy.utils.serialization.AbstractPersistable
From class java.lang.Object
From interface com.microstrategy.utils.serialization.Persistable

Public Constructors

public PageHistoryList ()

public PageHistoryList (AppContext appContext)

Public Methods

public 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

public 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

public void clearForwardPages ()

Clear all pages after current position

public List<String> getBackHistoryPages ()

Returns
  • a List containing a collection of page titles located previously to the current one on the page history list.

public List<String> getForwardHistoryPages ()

Returns
  • a List containing a collection of page titles located subsecuently to the current one on the page history list.

public 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

public boolean isNextAvailable ()

Returns
  • whether there is a next (forward) element on the page history

public boolean isPreviousAvailable ()

Returns
  • whether there is a previous (back) element on the page history

public 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

public void setCapacity (int capacity)

Sets the size of the page history list

public 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

Protected Methods

protected void doFlatState (FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)