Class EnvServlet

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    ClientServlet, MyProxyDelegationServlet, OIDCCMServlet, RFC8628AuthorizationServer

    public abstract class EnvServlet
    extends edu.uiuc.ncsa.security.servlet.AbstractServlet
    This servlet loads the environment for all servlets. Any servlet that requires a service environment should extend this.

    Created by Jeff Gaynor
    on 10/6/16 at 11:43 AM

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ERROR_NOTIFICATION_BODY_KEY
      Servlet context key that points to the fully qualified file which contains the message body to be used in cases of server-side exceptions.
      static String ERROR_NOTIFICATION_SUBJECT_KEY
      Servlet context key that points to the fully qualified file which contains the message subject to be used in cases of server-side exceptions.
      protected static List<edu.uiuc.ncsa.security.servlet.NotificationListener> notificationListeners  
      static boolean storeUpdatesDone  
      • Fields inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet

        environment, initialization, PING_PARAMETER
    • Constructor Summary

      Constructors 
      Constructor Description
      EnvServlet()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static void addNotificationListener​(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)  
      void loadEnvironment()  
      ServiceEnvironmentImpl loadProperties2()  
      void processStoreCheck​(edu.uiuc.ncsa.security.core.Store store)  
      static boolean removeNotificationListener​(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)  
      abstract void storeUpdates()
      This will be invoked at init before anything else and should include code to seamlessly upgrade stores from earlier versions.
      • Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet

        checkContentType, CONST, debug, doGet, doIt, doPing, doPost, error, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getFirstParameterValue, getInitialization, getMyLogger, handleException, info, init, isDebugOn, printAllParameters, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Field Detail

      • ERROR_NOTIFICATION_BODY_KEY

        public static final String ERROR_NOTIFICATION_BODY_KEY
        Servlet context key that points to the fully qualified file which contains the message body to be used in cases of server-side exceptions.
        See Also:
        Constant Field Values
      • ERROR_NOTIFICATION_SUBJECT_KEY

        public static final String ERROR_NOTIFICATION_SUBJECT_KEY
        Servlet context key that points to the fully qualified file which contains the message subject to be used in cases of server-side exceptions.
        See Also:
        Constant Field Values
      • notificationListeners

        protected static List<edu.uiuc.ncsa.security.servlet.NotificationListener> notificationListeners
      • storeUpdatesDone

        public static boolean storeUpdatesDone
    • Constructor Detail

      • EnvServlet

        public EnvServlet()
    • Method Detail

      • addNotificationListener

        public static void addNotificationListener​(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)
      • removeNotificationListener

        public static boolean removeNotificationListener​(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)
      • loadEnvironment

        public void loadEnvironment()
                             throws IOException
        Specified by:
        loadEnvironment in class edu.uiuc.ncsa.security.servlet.AbstractServlet
        Throws:
        IOException
      • storeUpdates

        public abstract void storeUpdates()
                                   throws IOException,
                                          SQLException
        This will be invoked at init before anything else and should include code to seamlessly upgrade stores from earlier versions. For instance, if a new column needs to be added to a table. This pre-supposes that the current user has the correct permissions to alter the table, btw. This also updates the internal flag storeUpdatesDone which should be checks in overrides. If you override this method and call super, let super manage this flag. If it is true, do not execute your method.
        Throws:
        IOException
        SQLException
      • processStoreCheck

        public void processStoreCheck​(edu.uiuc.ncsa.security.core.Store store)
                               throws SQLException
        Throws:
        SQLException