Class ConfigPlugIn
java.lang.Object
com.softslate.commerce.customer.core.ConfigPlugIn
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfigPlugIn(javax.servlet.GenericServlet servlet) ConfigPlugIn(org.apache.struts.action.ActionServlet servlet) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Close the Hibernate SessionFactory as the application shuts down.javax.servlet.GenericServletvoidinit(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig moduleConfig) voidCreates an instance ofjava.util.Propertiesrepresenting component settings in the application scope.voidCreates an instance ofjava.util.Propertiesrepresenting application settings in the application scope.voidCreates a configured instance ofDAOFactoryin the application scope.protected voidprotected voidvoidvoidvoidvoidvoidvoidvoidvoidsaveComponents(Properties appComponents) Saves a new set of properties to the /WEB-INF/classes/appComponents.properties file.voidsetServlet(javax.servlet.GenericServlet servlet)
-
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:
initin interfaceorg.apache.struts.action.PlugIn- Throws:
javax.servlet.ServletException
-
initPropertyUtilsConfig
protected void initPropertyUtilsConfig() -
initializeAppSettings
public void initializeAppSettings()Creates an instance ofjava.util.Propertiesrepresenting application settings in the application scope. Reads in the properties from the "/WEB-INF/classes/appSettings.properties" file, usingAppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext). -
initializeAppComponents
public void initializeAppComponents() throws javax.servlet.ServletExceptionCreates an instance ofjava.util.Propertiesrepresenting 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, usingAppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext).- Throws:
javax.servlet.ServletException
-
initializeDAOFactory
public void initializeDAOFactory()Creates a configured instance ofDAOFactoryin the application scope.If successful, the "daoFactory" attribute of the servlet context will contain a
DAOFactorythat 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:
destroyin interfaceorg.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
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
-