Package org.silverpeas.processmanager.servlets

## Class ProcessManagerRequestRouter

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet
      - - org.silverpeas.core.web.mvc.webcomponent.SilverpeasAuthenticatedHttpServlet
        - - org.silverpeas.core.web.mvc.route.ComponentRequestRouter<ProcessManagerSessionController>
          - - org.silverpeas.processmanager.servlets.ProcessManagerRequestRouter

- All Implemented Interfaces:
    `Serializable`, `javax.servlet.Servlet`, `javax.servlet.ServletConfig`

      public class ProcessManagerRequestRouter
      extends org.silverpeas.core.web.mvc.route.ComponentRequestRouter<ProcessManagerSessionController>

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet

      `org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet.HttpError, org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet.UserSessionStatus`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProcessManagerRequestRouter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ProcessManagerSessionController` | `createComponentSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)` | Return a new ProcessManagerSessionController which will be used for each request made in the given componentContext.
    `String` | `getDestination​(String function, ProcessManagerSessionController sessionController, org.silverpeas.core.web.http.HttpRequest request)` | Process the request and returns the response url.
    `String` | `getSessionControlBeanName()` | Returns the name used by the ComponentRequestRequest to store the session controller in the user session.
    `void` | `init​(javax.servlet.ServletConfig config)` | Init this servlet, before any request.

    - ### Methods inherited from class org.silverpeas.core.web.mvc.route.ComponentRequestRouter

      `checkUserAuthorization, doGet, doPost, emptyJsonResponse, getComponentId, getOrganizationController, hasTheSessionSecurityTokenToBeRenewed, sendJson, updateSessionManagement`

    - ### Methods inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasAuthenticatedHttpServlet

      `getMainSessionController, getSessionInfo, getSynchronizerTokenService, renewSessionSecurityToken, service, throwUserSessionExpiration`

    - ### Methods inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet

      `existOpenedUserSession, forbidden, notFound, preconditionFailed, redirectOrForwardService, sendError, sendError, throwHttpForbiddenError, throwHttpForbiddenError, throwHttpNotFoundError, throwHttpNotFoundError, throwHttpPreconditionFailedError, throwHttpPreconditionFailedError`

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessManagerRequestRouter

          public ProcessManagerRequestRouter()

  - ### Method Detail

    - #### getSessionControlBeanName

          public String getSessionControlBeanName()

      Returns the name used by the ComponentRequestRequest to store the session controller in the user session.
      Specified by:
        `getSessionControlBeanName` in class `org.silverpeas.core.web.mvc.route.ComponentRequestRouter<ProcessManagerSessionController>`

    - #### createComponentSessionController

          public ProcessManagerSessionController createComponentSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                                                                  org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)

      Return a new ProcessManagerSessionController which will be used for each request made in the given componentContext. Returns a ill session controller when the a fatal error occurs. This ill session controller can only display an error page.
      Specified by:
        `createComponentSessionController` in class `org.silverpeas.core.web.mvc.route.ComponentRequestRouter<ProcessManagerSessionController>`
      Parameters:
        `mainSessionCtrl` - the main session controller?
        `componentContext` - the component instance context.
      Returns:
        the process manager session controller.

    - #### getDestination

          public String getDestination​(String function,
                                       ProcessManagerSessionController sessionController,
                                       org.silverpeas.core.web.http.HttpRequest request)

      Process the request and returns the response url.
      Specified by:
        `getDestination` in class `org.silverpeas.core.web.mvc.route.ComponentRequestRouter<ProcessManagerSessionController>`
      Parameters:
        `function` - the user request name
        `sessionController` - the user request context
        `request` - the user request params

    - #### init

          public void init​(javax.servlet.ServletConfig config)
                    throws javax.servlet.ServletException

      Init this servlet, before any request.
      Specified by:
        `init` in interface `javax.servlet.Servlet`
      Overrides:
        `init` in class `javax.servlet.GenericServlet`
      Throws:
        `javax.servlet.ServletException`