Coverage Report - pt.digitalis.dif.controller.interfaces.INavigationHistory
 
Classes in this File Line Coverage Branch Coverage Complexity
INavigationHistory
N/A
N/A
1
 
 1  
 /**
 2  
  * 2008, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos
 3  
  * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt
 4  
  */
 5  
 
 6  
 package pt.digitalis.dif.controller.interfaces;
 7  
 
 8  
 import java.util.List;
 9  
 
 10  
 import pt.digitalis.dif.controller.objects.Breadcrumb;
 11  
 import pt.digitalis.dif.dem.interfaces.IStageInstance;
 12  
 
 13  
 /**
 14  
  * Tracks all navigation history for a single session
 15  
  *
 16  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a>
 17  
  * @created 2008/07/20
 18  
  */
 19  
 public interface INavigationHistory {
 20  
 
 21  
     /**
 22  
      * Adds a breadcrumb to the history
 23  
      *
 24  
      * @param crumb
 25  
      *            the crumb to add
 26  
      */
 27  
     public void addBreadcrumb(Breadcrumb crumb);
 28  
 
 29  
     /**
 30  
      * Adds a stage to the history
 31  
      *
 32  
      * @param stage
 33  
      *            the stage to add
 34  
      */
 35  
     public void addStage(IStageInstance stage);
 36  
 
 37  
     /**
 38  
      * Cleans up the navigation history after a logout process. Stages that are no longer accessible are discarded from
 39  
      * the list. Will parse if the current user can access each stage, or if no user logged if the stages are publicly
 40  
      * accessible.
 41  
      *
 42  
      * @param session
 43  
      *            the current user session
 44  
      */
 45  
     public void cleanUpAfterLogout(IDIFSession session);
 46  
 
 47  
     /**
 48  
      * @return all current gathered breadcrumbs ordered by first access time
 49  
      */
 50  
     List<Breadcrumb> getHistoryFirstAccess();
 51  
 
 52  
     /**
 53  
      * @return all current gathered breadcrumbs ordered by last access time
 54  
      */
 55  
     List<Breadcrumb> getHistoryLastAccessed();
 56  
 
 57  
     /**
 58  
      * Finds the previous breadcrumb for a given stage by first access
 59  
      *
 60  
      * @param stageToFindPrevious
 61  
      * @return the previous stage ID (for the given stage)
 62  
      */
 63  
     public Breadcrumb getPreviousForByFirstAccess(String stageToFindPrevious);
 64  
 
 65  
     /**
 66  
      * Finds the previous breadcrumb for a given stage by last access
 67  
      *
 68  
      * @param stageToFindPrevious
 69  
      * @return the previous stage ID (for the given stage)
 70  
      */
 71  
     public Breadcrumb getPreviousForByLastAccess(String stageToFindPrevious);
 72  
 
 73  
     /**
 74  
      * @return T is the history is empty
 75  
      */
 76  
     public boolean isEmpty();
 77  
 
 78  
     /**
 79  
      * Removes a stage from the history
 80  
      *
 81  
      * @param stage
 82  
      *            the stage to remove
 83  
      */
 84  
     public void removeStage(String stage);
 85  
 }