psdi.webclient.system.controller

Class RequestManager

  • java.lang.Object
    • psdi.webclient.system.controller.RequestManager


  • public class RequestManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      RequestManager() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      WebClientSession authenticateRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) 
      WebClientSession checkSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Checks to see the the user is logged in, (has an valid connected MXSession).
      static boolean isXHRRequest(javax.servlet.http.HttpServletRequest request)
      Looks for the request parameter defined by the RequestManager XHR_REQUEST static final that tells the framework that it's an xhr request.
      void manageRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestManager

        public RequestManager()
    • Method Detail

      • authenticateRequest

        public WebClientSession authenticateRequest(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • manageRequest

        public void manageRequest(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
      • checkSession

        public WebClientSession checkSession(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
                                      throws java.io.IOException
        Checks to see the the user is logged in, (has an valid connected MXSession). If not, tries to log the user in, if the credentials are in the request or maximo is using appsever security. This method will redirect the user to the appropriate "page" based on their connection status. If the user is not logged in, and app server isn't using appserver security, the user will be redirected to the login page. If the user has timed out, either HttpSession WebClientSession, timeout the user will be redirected to the logout page. Returns the current WebCLientSession for the request. If there isn't one, one will be created upon successfully obtaining a MXSession connection and if the WebCLientSessionFactory has available sessions. If unable to create a new instance of MXSession or WebClientSession (if either one is needed), this method will return null and send a 503 (SC_SERVICE_UNAVAILABLE) error response to the client. This method will also return null if the user was redirected to another page (most likely the login, logout, or loginerror page).
        Parameters:
        request -
        response -
        Returns:
        WebClientSession for the request
        Throws:
        java.io.IOException
      • isXHRRequest

        public static boolean isXHRRequest(javax.servlet.http.HttpServletRequest request)
        Looks for the request parameter defined by the RequestManager XHR_REQUEST static final that tells the framework that it's an xhr request. Returns true if the parameter exists, false if it does not exist.
        Parameters:
        request - The HttpServletRequest to check if it's an XHR request
        Returns:
        true if the request is to be treated as an XHR request, false if not