Class LogonExitServletBase

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.ebasetech.ufs.security.authentication.LogonExitServletBase
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class LogonExitServletBase
extends javax.servlet.http.HttpServlet
Version:
1.0
Author:
Jon Rickard Base class for logon exits.
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String EBASE_SESSION  
  • Constructor Summary

    Constructors
    Constructor Description
    LogonExitServletBase()  
  • Method Summary

    Modifier and Type Method Description
    void clearCallingParameters​(javax.servlet.http.HttpServletRequest req)
    Clears all URL parameters - used in cleanup only
    void clearEbaseSession​(javax.servlet.http.HttpServletRequest req)
    Removes the Ebase session object from session state - cleanup only
    void clearInitialCallFlag​(javax.servlet.http.HttpServletRequest req)
    Clears the flag used by method isInitialCall()
    void displayErrorPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String message)
    Displays an error page to the end user containing the passed error message
    void displayIllegalCallPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Displays an error page to the end user with text "Illegal request"
    com.ebasetech.ufs.kernel.EbaseSession getEbaseSession​(javax.servlet.http.HttpServletRequest req)
    Returns the Ebase session object
    boolean isInitialCall​(javax.servlet.http.HttpServletRequest req)
    Answers the question is this the first call to this servlet for this http session
    boolean isRequestLegal​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
    Check the request is legal.
    void linkToPage​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String page)
    Displays the page to the end user as specified by the passed URL
    void returnToEbase​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
    Returns to Ebase by forwarding the URL to the ufsmain servlet and re-attaching all parameters attached to the original URL.
    void saveCallingParameters​(javax.servlet.http.HttpServletRequest req)
    Saves all parameters attached to the initial URL.
    static void saveEbaseSession​(javax.servlet.http.HttpServletRequest req)
    Saves the Ebase session in session state
    static void saveSubjectInEbaseSession​(javax.servlet.http.HttpServletRequest req, javax.security.auth.Subject subject)
    Saves the subject in the Ebase session object
    void setHTTPResponseHeader​(javax.servlet.http.HttpServletResponse response)
    Sets response headers to ensure that no caching takes place

    Methods inherited from class javax.servlet.http.HttpServlet

    service

    Methods inherited from class javax.servlet.GenericServlet

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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LogonExitServletBase

      public LogonExitServletBase()
  • Method Details

    • isInitialCall

      public boolean isInitialCall​(javax.servlet.http.HttpServletRequest req)
      Answers the question is this the first call to this servlet for this http session
    • clearInitialCallFlag

      public void clearInitialCallFlag​(javax.servlet.http.HttpServletRequest req)
      Clears the flag used by method isInitialCall()
    • saveCallingParameters

      public void saveCallingParameters​(javax.servlet.http.HttpServletRequest req)
      Saves all parameters attached to the initial URL. These are automatically added to the URL used to return to the Ebase system in method returnToEbase()
    • clearCallingParameters

      public void clearCallingParameters​(javax.servlet.http.HttpServletRequest req)
      Clears all URL parameters - used in cleanup only
    • returnToEbase

      public void returnToEbase​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
      Returns to Ebase by forwarding the URL to the ufsmain servlet and re-attaching all parameters attached to the original URL.
      Throws:
      javax.servlet.ServletException
      java.io.IOException
    • isRequestLegal

      public boolean isRequestLegal​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
      Check the request is legal. This is true when the servlet has not been directly invoked
    • getEbaseSession

      public com.ebasetech.ufs.kernel.EbaseSession getEbaseSession​(javax.servlet.http.HttpServletRequest req)
      Returns the Ebase session object
    • clearEbaseSession

      public void clearEbaseSession​(javax.servlet.http.HttpServletRequest req)
      Removes the Ebase session object from session state - cleanup only
    • setHTTPResponseHeader

      public void setHTTPResponseHeader​(javax.servlet.http.HttpServletResponse response)
      Sets response headers to ensure that no caching takes place
    • linkToPage

      public void linkToPage​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String page) throws javax.servlet.ServletException, java.io.IOException
      Displays the page to the end user as specified by the passed URL
      Throws:
      javax.servlet.ServletException
      java.io.IOException
    • displayErrorPage

      public void displayErrorPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String message) throws javax.servlet.ServletException, java.io.IOException
      Displays an error page to the end user containing the passed error message
      Throws:
      javax.servlet.ServletException
      java.io.IOException
    • displayIllegalCallPage

      public void displayIllegalCallPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
      Displays an error page to the end user with text "Illegal request"
      Throws:
      javax.servlet.ServletException
      java.io.IOException
    • saveSubjectInEbaseSession

      public static void saveSubjectInEbaseSession​(javax.servlet.http.HttpServletRequest req, javax.security.auth.Subject subject)
      Saves the subject in the Ebase session object
    • saveEbaseSession

      public static void saveEbaseSession​(javax.servlet.http.HttpServletRequest req)
      Saves the Ebase session in session state