Interface PageFlowStore

  • All Known Implementing Classes:
    HttpSessionPageFlowStore

    public interface PageFlowStore
    Backend Page Flow Store abstraction.

    The backend could be anything that can store PageFlow instances and read PageFlow instances back. For example, in web application environment, one of the simplest implementation could use javax.servlet.http.HttpSession for a visitor.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      PageFlow getPageFlow​(javax.servlet.http.HttpServletRequest request, String flowId)
      Find and retrieve the PageFlow instance by the identifier of the PageFlow (flowId) from the backend storage.
      boolean removePageFlow​(javax.servlet.http.HttpServletRequest request, String flowId)
      Remove the associated pageFlow from the backend storage by the flowId.
      boolean storePageFlow​(javax.servlet.http.HttpServletRequest request, String flowId, PageFlow pageFlow)
      Store the pageFlow into the backend storage by the flowId.
    • Method Detail

      • getPageFlow

        PageFlow getPageFlow​(javax.servlet.http.HttpServletRequest request,
                             String flowId)
                      throws PageFlowException
        Find and retrieve the PageFlow instance by the identifier of the PageFlow (flowId) from the backend storage. Return null if not found.
        Parameters:
        request - HttpServletRequest object
        flowId - the identifier of the PageFlow
        Returns:
        the PageFlow instance by the identifier of the PageFlow (flowId) from the backend storage, or null if not found
        Throws:
        PageFlowException - if any exception occurs
      • storePageFlow

        boolean storePageFlow​(javax.servlet.http.HttpServletRequest request,
                              String flowId,
                              PageFlow pageFlow)
                       throws PageFlowException
        Store the pageFlow into the backend storage by the flowId.
        Parameters:
        request - HttpServletRequest object
        flowId - the identifier of the PageFlow
        pageFlow - PageFlow instance
        Returns:
        true if stored
        Throws:
        PageFlowException - if any exception occurs
      • removePageFlow

        boolean removePageFlow​(javax.servlet.http.HttpServletRequest request,
                               String flowId)
                        throws PageFlowException
        Remove the associated pageFlow from the backend storage by the flowId.
        Parameters:
        request - HttpServletRequest object
        flowId - the identifier of the PageFlow
        Returns:
        true if removed
        Throws:
        PageFlowException - if any exception occurs