Class SessionSafeFunctionHandler

  • All Implemented Interfaces:
    FunctionHandler

    public abstract class SessionSafeFunctionHandler
    extends Object
    implements FunctionHandler
    A SessionSafeFunctionHandler must be used to prevent conflicts in HTTP Session when user navigate using several windows sharing the same session.
    Author:
    Ludovic Bertin
    • Constructor Detail

      • SessionSafeFunctionHandler

        public SessionSafeFunctionHandler()
    • Method Detail

      • generateTokenId

        protected void generateTokenId​(ProcessManagerSessionController session,
                                       javax.servlet.http.HttpServletRequest request)
        Generate random UUID and store it in request as attribute and in process manager session controller
        Parameters:
        session - the process manager session controller
        request - the http servlet request
      • resetTokenId

        protected void resetTokenId​(ProcessManagerSessionController session,
                                    javax.servlet.http.HttpServletRequest request)
        Reset token Id.
        Parameters:
        session - the process manager session controller
        request - the http servlet request
      • computeDestination

        protected abstract String computeDestination​(String function,
                                                     ProcessManagerSessionController session,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     List<org.apache.commons.fileupload.FileItem> items)
                                              throws ProcessManagerException
        Main scenario to be implemented by handler.
        Parameters:
        function - the name of use case to realize
        session - the process manager session controller
        request - the http servlet request
        items - eventual submitted items
        Returns:
        the JSP servlet to be forwarded to.
        Throws:
        ProcessManagerException