public class InitializationFilter extends StartupFilter
WebConstants.SETUP_PAGE_URL if the
Listener wasn't able to find any runtime properties| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RELEASE_TESTING_MODULE_PATH |
AUTO_RUN_OPENMRS, errors, filterConfig, msgs, velocityEngine| Constructor and Description |
|---|
InitializationFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkLocaleAttributesForFirstTime(javax.servlet.http.HttpServletRequest httpRequest)
It sets locale parameter for current session when user is making first GET http request to
application.
|
protected void |
doGet(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Called by
StartupFilter.doFilter(ServletRequest, ServletResponse, FilterChain) on GET requests |
protected void |
doPost(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Called by
StartupFilter.doFilter(ServletRequest, ServletResponse, FilterChain) on POST requests |
protected java.lang.Object |
getModel()
The model that is used as the backer for all pages in this startup wizard.
|
protected java.lang.String |
getTemplatePrefix()
This string is prepended to all templateNames passed to
StartupFilter.renderTemplate(String, Map, HttpServletResponse) |
void |
init(javax.servlet.FilterConfig filterConfig) |
static boolean |
initializationRequired()
Public method that returns true if database+runtime properties initialization is required
|
protected static boolean |
isInstallationStarted() |
static java.lang.String |
loadDriver(java.lang.String connection,
java.lang.String databaseDriver)
Convenience method that loads the database driver
|
protected void |
setInitializationComplete(boolean initializationComplete) |
protected static void |
setInstallationStarted(boolean isInstallationStarted) |
boolean |
skipFilter(javax.servlet.http.HttpServletRequest httpRequest)
If this returns true, this filter fails early and quickly.
|
destroy, doFilter, getToolContext, renderTemplate, toJSONStringpublic static final java.lang.String RELEASE_TESTING_MODULE_PATH
protected void setInitializationComplete(boolean initializationComplete)
protected void doGet(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws java.io.IOException,
javax.servlet.ServletException
StartupFilter.doFilter(ServletRequest, ServletResponse, FilterChain) on GET requestsdoGet in class StartupFilterhttpRequest - httpResponse - java.io.IOExceptionjavax.servlet.ServletExceptionprotected void doPost(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws java.io.IOException,
javax.servlet.ServletException
StartupFilter.doFilter(ServletRequest, ServletResponse, FilterChain) on POST requestsdoPost in class StartupFilterhttpRequest - httpResponse - java.io.IOExceptionjavax.servlet.ServletExceptionpublic void checkLocaleAttributesForFirstTime(javax.servlet.http.HttpServletRequest httpRequest)
Locale.ENGLISH by defaulthttpRequest - the http request objectprotected java.lang.String getTemplatePrefix()
StartupFilterStartupFilter.renderTemplate(String, Map, HttpServletResponse)getTemplatePrefix in class StartupFilterStartupFilter.getTemplatePrefix()protected java.lang.Object getModel()
StartupFiltergetModel in class StartupFilterStartupFilter.getModel()public boolean skipFilter(javax.servlet.http.HttpServletRequest httpRequest)
StartupFilterskipFilter in class StartupFilterorg.openmrs.web.filter.StartupFilter#skipFilter()public static boolean initializationRequired()
protected static void setInstallationStarted(boolean isInstallationStarted)
isInstallationStarted - the value to setprotected static boolean isInstallationStarted()
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterinit in class StartupFilterjavax.servlet.ServletExceptionFilter.init(javax.servlet.FilterConfig)public static java.lang.String loadDriver(java.lang.String connection,
java.lang.String databaseDriver)
connection - the database connection stringdatabaseDriver - the database driver class name to loadCopyright © 2018 OpenMRS Inc.. All Rights Reserved.