org.kuali.rice.krad.web.form
Class HistoryFlow

java.lang.Object
  extended by org.kuali.rice.krad.web.form.HistoryFlow
All Implemented Interfaces:
Serializable

public class HistoryFlow
extends Object
implements Serializable

HistoryFlow represents the a flow of urls. When the flow is continued, the flow inherits the urls/breadcrumbs from a previous flow. Using a flow key it is possible to jump back to previous flows.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  BreadcrumbItem currentViewItem
           
protected  String flowKey
           
protected  String flowReturnPoint
           
protected  String flowStartPoint
           
protected  Stack<UrlInfo> flowUrls
           
protected  List<BreadcrumbItem> pastItems
           
 
Constructor Summary
HistoryFlow(String flowKey)
          Initialize a new HistoryFlow with a key
 
Method Summary
 void clear()
          Clear all urls on the history stack and accumulated breadcrumbs
 void continueFlow(HistoryFlow prevFlow)
          Continue a new flow from a previous flow.
 String getCurrentLocation()
          Get the last url on the history stack
 BreadcrumbItem getCurrentViewItem()
          Get the item which represents the most current BreadcrumbItem for the View for this flow
 String getFlowKey()
          The flowKey used to identify the HistoryFlow
 String getFlowReturnPoint()
          The returnPoint used to jump back to a previous flow
 String getFlowStartPoint()
           
 Stack<UrlInfo> getFlowUrls()
          Get all urls in the HistoryFlow stack
 List<BreadcrumbItem> getPastItems()
          Get all the past BreadcrumbItems (these represents the path to the current item)
 void push(String url)
          Push the url onto the history stack
 void push(UrlInfo urlInfo)
          Push the url onto the history stack
 void setCurrentViewItem(BreadcrumbItem currentViewItem)
          Set the current BreadcrumbItem
 void setFlowKey(String flowKey)
          Set the flowKey for this HistoryFlow
 void setFlowReturnPoint(String flowReturnPoint)
          Set the returnPoint for use to jump back to the previous flow
 void setFlowStartPoint(String flowStartPoint)
           
 void setFlowUrls(Stack<UrlInfo> flowUrls)
          Set the flowUrls for this HistoryFlow
 void setPastItems(List<BreadcrumbItem> pastItems)
          Set the past BreadcrumbItems
 void update(String url)
          Update the last url on the history stack with the new value
 void update(UrlInfo urlInfo)
          Update the last url on the history stack with the new value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flowKey

protected String flowKey

flowReturnPoint

protected String flowReturnPoint

flowStartPoint

protected String flowStartPoint

flowUrls

protected Stack<UrlInfo> flowUrls

currentViewItem

protected BreadcrumbItem currentViewItem

pastItems

protected List<BreadcrumbItem> pastItems
Constructor Detail

HistoryFlow

public HistoryFlow(String flowKey)
Initialize a new HistoryFlow with a key

Parameters:
flowKey - the flowKey to use
Method Detail

getFlowUrls

public Stack<UrlInfo> getFlowUrls()
Get all urls in the HistoryFlow stack

Returns:
the stack of HistoryFlow urls

setFlowUrls

public void setFlowUrls(Stack<UrlInfo> flowUrls)
Set the flowUrls for this HistoryFlow

Parameters:
flowUrls -

getFlowReturnPoint

public String getFlowReturnPoint()
The returnPoint used to jump back to a previous flow

Returns:
the flowReturnPoint

setFlowReturnPoint

public void setFlowReturnPoint(String flowReturnPoint)
Set the returnPoint for use to jump back to the previous flow

Parameters:
flowReturnPoint -

getFlowStartPoint

public String getFlowStartPoint()

setFlowStartPoint

public void setFlowStartPoint(String flowStartPoint)

getFlowKey

public String getFlowKey()
The flowKey used to identify the HistoryFlow

Returns:

setFlowKey

public void setFlowKey(String flowKey)
Set the flowKey for this HistoryFlow

Parameters:
flowKey -

push

public void push(String url)
Push the url onto the history stack

Parameters:
url - the url to push

push

public void push(UrlInfo urlInfo)
Push the url onto the history stack

Parameters:
urlInfo - the urlInfo object to push

update

public void update(String url)
Update the last url on the history stack with the new value

Parameters:
url - the url to update to

update

public void update(UrlInfo urlInfo)
Update the last url on the history stack with the new value

Parameters:
urlInfo - the UrlInfo object to update to

getCurrentLocation

public String getCurrentLocation()
Get the last url on the history stack

Returns:
the last url on the history stack

clear

public void clear()
Clear all urls on the history stack and accumulated breadcrumbs


continueFlow

public void continueFlow(HistoryFlow prevFlow)
Continue a new flow from a previous flow. This will copy the prevFlow's flow urls to flowUrls, pastItems and currentViewItem to the new flow's pastItems, and set the flowReturnPoint to the currentLocation of the prevFlow.

Parameters:
prevFlow -

getCurrentViewItem

public BreadcrumbItem getCurrentViewItem()
Get the item which represents the most current BreadcrumbItem for the View for this flow

Returns:
the View BreadcrumbItem

setCurrentViewItem

public void setCurrentViewItem(BreadcrumbItem currentViewItem)
Set the current BreadcrumbItem

Parameters:
currentViewItem -

getPastItems

public List<BreadcrumbItem> getPastItems()
Get all the past BreadcrumbItems (these represents the path to the current item)

Returns:
the past BreadcrumbItems

setPastItems

public void setPastItems(List<BreadcrumbItem> pastItems)
Set the past BreadcrumbItems

Parameters:
pastItems -


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.