Class ConfigPlugIn

java.lang.Object
com.softslate.commerce.customer.core.ConfigPlugIn
All Implemented Interfaces:
org.apache.struts.action.PlugIn

public class ConfigPlugIn extends Object implements org.apache.struts.action.PlugIn
Initializes singleton objects in the application scope. Called by Struts as a PlugIn as the application is loaded, and by BaseRequestProcessor at the beginning of a request, if the singletons are found to be missing.
Author:
David Tobey
  • Field Details

    • log

      static org.apache.commons.logging.Log log
    • servlet

      private javax.servlet.GenericServlet servlet
  • Constructor Details

    • ConfigPlugIn

      public ConfigPlugIn()
    • ConfigPlugIn

      public ConfigPlugIn(org.apache.struts.action.ActionServlet servlet)
    • ConfigPlugIn

      public ConfigPlugIn(javax.servlet.GenericServlet servlet)
  • Method Details

    • getServlet

      public javax.servlet.GenericServlet getServlet()
    • setServlet

      public void setServlet(javax.servlet.GenericServlet servlet)
    • init

      public void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig moduleConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface org.apache.struts.action.PlugIn
      Throws:
      javax.servlet.ServletException
    • initPropertyUtilsConfig

      protected void initPropertyUtilsConfig()
    • initializeAppSettings

      public void initializeAppSettings()
      Creates an instance of java.util.Properties representing application settings in the application scope. Reads in the properties from the "/WEB-INF/classes/appSettings.properties" file, using AppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext).
    • initializeAppComponents

      public void initializeAppComponents() throws javax.servlet.ServletException
      Creates an instance of java.util.Properties representing component settings in the application scope. Component settings define which classes implement the various application interfaces used by the application's code. Reads in the properties from the "/WEB-INF/classes/appComponents.properties" file, using AppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext).
      Throws:
      javax.servlet.ServletException
    • initializeDAOFactory

      public void initializeDAOFactory()
      Creates a configured instance of DAOFactory in the application scope.

      If successful, the "daoFactory" attribute of the servlet context will contain a DAOFactory that allows the DAOs it creates to to communicate with the database through Hibernate.

    • processLiquibaseUpdates

      protected void processLiquibaseUpdates()
    • destroy

      public void destroy()
      Close the Hibernate SessionFactory as the application shuts down.
      Specified by:
      destroy in interface org.apache.struts.action.PlugIn
    • processPreDatabaseUpgrades

      public void processPreDatabaseUpgrades()
    • processPostDatabaseUpgrades

      public void processPostDatabaseUpgrades()
    • processUpgrade2dot1

      public void processUpgrade2dot1()
    • processUpgrade2dot2

      public void processUpgrade2dot2()
    • processUpgrade2dot2dot5

      public void processUpgrade2dot2dot5()
    • processUpgrade2dot3dot5

      public void processUpgrade2dot3dot5()
    • processUpgrade3dot0dot0

      public void processUpgrade3dot0dot0()
    • saveComponents

      public void saveComponents(Properties appComponents) throws Exception
      Saves a new set of properties to the /WEB-INF/classes/appComponents.properties file.
      Parameters:
      appComponents - The new set of properties to be saved.
      Throws:
      Exception