Class EnvServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.storage.servlet.EnvServlet
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
OA4MPServlet
public abstract class EnvServlet extends edu.uiuc.ncsa.security.servlet.AbstractServletThis 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 StringERROR_NOTIFICATION_BODY_KEYServlet context key that points to the fully qualified file which contains the message body to be used in cases of server-side exceptions.static StringERROR_NOTIFICATION_SUBJECT_KEYServlet 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>notificationListenersstatic booleanstoreUpdatesDone
-
Constructor Summary
Constructors Constructor Description EnvServlet()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static voidaddNotificationListener(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)voidloadEnvironment()ServiceEnvironmentImplloadProperties2()voidprocessStoreCheck(edu.uiuc.ncsa.security.core.Store store)static booleanremoveNotificationListener(edu.uiuc.ncsa.security.servlet.NotificationListener notificationListener)abstract voidstoreUpdates()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, getInitialization, getMyLogger, getRequestIPAddress, handleException, info, init, isDebugOn, logOK, logOK, 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
-
-
-
-
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
-
-
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)
-
loadProperties2
public ServiceEnvironmentImpl loadProperties2() throws IOException
- Throws:
IOException
-
loadEnvironment
public void loadEnvironment() throws IOException- Specified by:
loadEnvironmentin classedu.uiuc.ncsa.security.servlet.AbstractServlet- Throws:
IOException
-
storeUpdates
public abstract void storeUpdates() throws IOException, SQLExceptionThis 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 flagstoreUpdatesDonewhich 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:
IOExceptionSQLException
-
processStoreCheck
public void processStoreCheck(edu.uiuc.ncsa.security.core.Store store) throws SQLException- Throws:
SQLException
-
-