pt.digitalis.dif.controller.objects
Class NavigationHistoryImpl

java.lang.Object
  extended by pt.digitalis.dif.controller.objects.NavigationHistoryImpl
All Implemented Interfaces:
INavigationHistory

public class NavigationHistoryImpl
extends Object
implements INavigationHistory

The default navigation history implementation

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
2008/07/20

Constructor Summary
NavigationHistoryImpl()
           
 
Method Summary
 void addBreadcrumb(Breadcrumb crumb)
          Adds a breadcrumb to the history
 void addStage(IStageInstance stage)
          Adds a stage to the history
 void cleanUpAfterLogout(IDIFSession session)
          Cleans up the navigation history after a logout process.
 List<Breadcrumb> getHistoryFirstAccess()
           
 List<Breadcrumb> getHistoryLastAccessed()
           
 Breadcrumb getPreviousForByFirstAccess(String stageToFindPrevious)
          Finds the previous breadcrumb for a given stage by first access
 Breadcrumb getPreviousForByLastAccess(String stageToFindPrevious)
          Finds the previous breadcrumb for a given stage by last access
 boolean isEmpty()
           
 void removeStage(String stage)
          Removes a stage from the history
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationHistoryImpl

public NavigationHistoryImpl()
Method Detail

addBreadcrumb

public void addBreadcrumb(Breadcrumb crumb)
Description copied from interface: INavigationHistory
Adds a breadcrumb to the history

Specified by:
addBreadcrumb in interface INavigationHistory
Parameters:
crumb - the crumb to add
See Also:
INavigationHistory.addBreadcrumb(pt.digitalis.dif.controller.objects.Breadcrumb)

addStage

public void addStage(IStageInstance stage)
Description copied from interface: INavigationHistory
Adds a stage to the history

Specified by:
addStage in interface INavigationHistory
Parameters:
stage - the stage to add
See Also:
INavigationHistory.addStage(pt.digitalis.dif.dem.interfaces.IStageInstance)

cleanUpAfterLogout

public void cleanUpAfterLogout(IDIFSession session)
Description copied from interface: INavigationHistory
Cleans up the navigation history after a logout process. Stages that are no longer accessible are discarded from the list. Will parse if the current user can access each stage, or if no user logged if the stages are publicly accessible.

Specified by:
cleanUpAfterLogout in interface INavigationHistory
Parameters:
session - the current user session
See Also:
INavigationHistory.cleanUpAfterLogout(pt.digitalis.dif.controller.interfaces.IDIFSession)

getHistoryFirstAccess

public List<Breadcrumb> getHistoryFirstAccess()
Specified by:
getHistoryFirstAccess in interface INavigationHistory
Returns:
all current gathered breadcrumbs ordered by first access time
See Also:
INavigationHistory.getHistoryFirstAccess()

getHistoryLastAccessed

public List<Breadcrumb> getHistoryLastAccessed()
Specified by:
getHistoryLastAccessed in interface INavigationHistory
Returns:
all current gathered breadcrumbs ordered by last access time
See Also:
INavigationHistory.getHistoryLastAccessed()

getPreviousForByFirstAccess

public Breadcrumb getPreviousForByFirstAccess(String stageToFindPrevious)
Description copied from interface: INavigationHistory
Finds the previous breadcrumb for a given stage by first access

Specified by:
getPreviousForByFirstAccess in interface INavigationHistory
Returns:
the previous stage ID (for the given stage)
See Also:
INavigationHistory.getPreviousForByFirstAccess(java.lang.String)

getPreviousForByLastAccess

public Breadcrumb getPreviousForByLastAccess(String stageToFindPrevious)
Description copied from interface: INavigationHistory
Finds the previous breadcrumb for a given stage by last access

Specified by:
getPreviousForByLastAccess in interface INavigationHistory
Returns:
the previous stage ID (for the given stage)
See Also:
INavigationHistory.getPreviousForByLastAccess(java.lang.String)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface INavigationHistory
Returns:
T is the history is empty
See Also:
INavigationHistory.isEmpty()

removeStage

public void removeStage(String stage)
Description copied from interface: INavigationHistory
Removes a stage from the history

Specified by:
removeStage in interface INavigationHistory
Parameters:
stage - the stage to remove
See Also:
INavigationHistory.removeStage(java.lang.String)


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.