ca.bc.gov.webade.j2ee
Class WebAppInitializationUtils

java.lang.Object
  extended byca.bc.gov.webade.j2ee.WebAppInitializationUtils

public final class WebAppInitializationUtils
extends java.lang.Object

Author:
jross

Field Summary
static java.lang.String WEBADE_APPLICATION
          The attribute name for the Application object in the HttpSession
static java.lang.String WEBADE_APPLICATION_ACRONYM
          The name of the servlet context init-parameter containing the application acronym.
static java.lang.String WEBADE_USER_INFO_SERVICE
          The attribute name for the UserInfoService object in the HttpSession
 
Method Summary
static java.lang.String getInitializationErrorMessage()
          Returns the initialization error message when the WebADE web application initialization failed on error.
static boolean hasInitializationFailed()
          Returns whether the WebADE web application initialization failed on error.
static void initializeWebApp(javax.servlet.ServletContext context, java.lang.String appCode)
          Initialize the WebADE web application's core settings.
static boolean isWebAppInitialized()
          Returns whether the WebADE web application has been initialized.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBADE_APPLICATION_ACRONYM

public static final java.lang.String WEBADE_APPLICATION_ACRONYM
The name of the servlet context init-parameter containing the application acronym.

See Also:
Constant Field Values

WEBADE_APPLICATION

public static final java.lang.String WEBADE_APPLICATION
The attribute name for the Application object in the HttpSession

See Also:
Constant Field Values

WEBADE_USER_INFO_SERVICE

public static final java.lang.String WEBADE_USER_INFO_SERVICE
The attribute name for the UserInfoService object in the HttpSession

See Also:
Constant Field Values
Method Detail

initializeWebApp

public static void initializeWebApp(javax.servlet.ServletContext context,
                                    java.lang.String appCode)
Initialize the WebADE web application's core settings.

Parameters:
context - Servlet context to create the application singleton in.
appCode - The application code used to load WebADE info for.

isWebAppInitialized

public static boolean isWebAppInitialized()
Returns whether the WebADE web application has been initialized. Even if the initialization failed on error, this method will return true.

Returns:
True if the WebAppInitializationUtils initializeWebApp method has been called.

hasInitializationFailed

public static boolean hasInitializationFailed()
Returns whether the WebADE web application initialization failed on error.

Returns:
True if the WebAppInitializationUtils initializeWebApp method has been called, and the call failed on error.

getInitializationErrorMessage

public static java.lang.String getInitializationErrorMessage()
Returns the initialization error message when the WebADE web application initialization failed on error.

Returns:
The error message to display.