Class RevisionInfoSetup
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.config.RevisionInfoSetup
-
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
public class RevisionInfoSetup extends Object implements javax.servlet.ServletContextListener
Read the revision information, and store it in the servlet context. - The revision information is in a file in the classpath. - The name of the file is in RESOURCE_PATH, below. - The first line is the build date, with a format as in DATE_FORMAT, below. - Each additional non-blank line holds revision info for one application level: - level info is from inner (vitro) to outer (top-level product). - level info appears as product name, release name and revision level, delimited by " ~ ". - additional white space before and after info values is ignored. Example file: 2010-11-14 23:58:00 vitroCore ~ Release 1.1 ~ 6604 nihvivo ~ Release 1.1 ~ 1116
-
-
Constructor Summary
Constructors Constructor Description RevisionInfoSetup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent sce)On shutdown, clean up.voidcontextInitialized(javax.servlet.ServletContextEvent sce)On startup, read the revision info from the resource file in the classpath.
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
On startup, read the revision info from the resource file in the classpath. If we can't find the file, or can't parse it, store an empty bean. Don't allow any Exceptions to percolate up past this point.- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
On shutdown, clean up.- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
-