Class SessionSafeFunctionHandler
java.lang.Object
org.silverpeas.processmanager.servlets.SessionSafeFunctionHandler
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringcomputeDestination(String function, ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest request, List<org.silverpeas.core.util.file.FileItem> items) Main scenario to be implemented by handler.protected voidgenerateTokenId(ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest request) Generate random UUID and store it in request as attribute and in process manager session controllerfinal StringgetDestination(String function, ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest req) Process the request and returns the response url.protected voidresetTokenId(ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest request) Reset token identifier.
-
Constructor Details
-
SessionSafeFunctionHandler
public SessionSafeFunctionHandler()
-
-
Method Details
-
getDestination
public final String getDestination(String function, ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest req) throws ProcessManagerException Description copied from interface:FunctionHandlerProcess the request and returns the response url.- Specified by:
getDestinationin interfaceFunctionHandler- Parameters:
function- the user request namesession- the user request contextreq- the user request params- Throws:
ProcessManagerException
-
generateTokenId
protected void generateTokenId(ProcessManagerSessionController session, jakarta.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 controllerrequest- the http servlet request
-
resetTokenId
protected void resetTokenId(ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest request) Reset token identifier.- Parameters:
session- the process manager session controllerrequest- the http servlet request
-
computeDestination
protected abstract String computeDestination(String function, ProcessManagerSessionController session, jakarta.servlet.http.HttpServletRequest request, List<org.silverpeas.core.util.file.FileItem> items) throws ProcessManagerException Main scenario to be implemented by handler.- Parameters:
function- the name of use case to realizesession- the process manager session controllerrequest- the http servlet requestitems- eventual submitted items- Returns:
- the JSP servlet to be forwarded to.
- Throws:
ProcessManagerException- if an error occurs while computing the next destination of the user navigation in the workflow.
-