org.utgenome.gwt.utgb.server
Class UTGBMaster

java.lang.Object
  extended by org.utgenome.gwt.utgb.server.UTGBMaster
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public class UTGBMaster
extends Object
implements javax.servlet.ServletContextListener

UTGB Master loads the configuration files, and set up shared variables, database access, etc.

Author:
leo

Constructor Summary
UTGBMaster()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
           
protected static String getContextProperty(String key, String defaultValue)
           
static org.xerial.db.sql.DatabaseAccess getDatabaseAccess(String databaseID)
           
protected  org.xerial.db.sql.DatabaseAccess getDatabaseAccessInternal(String databaseID)
           
static UTGBMaster getInstance()
           
static String getProjectRootFolder()
           
static UTGBConfig getUTGBConfig()
           
static
<T> T
getVariable(String name)
           
protected static UTGBConfig loadUTGBConfig()
           
static BufferedReader openServletReader(javax.servlet.http.HttpServletRequest request, String path)
           
static void setVariable(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UTGBMaster

public UTGBMaster()
Method Detail

getInstance

public static UTGBMaster getInstance()

getVariable

public static <T> T getVariable(String name)

setVariable

public static void setVariable(String name,
                               Object value)

getUTGBConfig

public static UTGBConfig getUTGBConfig()

getProjectRootFolder

public static String getProjectRootFolder()
                                   throws UTGBException
Throws:
UTGBException

loadUTGBConfig

protected static UTGBConfig loadUTGBConfig()
                                    throws UTGBException
Throws:
UTGBException

getContextProperty

protected static String getContextProperty(String key,
                                           String defaultValue)

getDatabaseAccess

public static org.xerial.db.sql.DatabaseAccess getDatabaseAccess(String databaseID)
                                                          throws UTGBException
Throws:
UTGBException

getDatabaseAccessInternal

protected org.xerial.db.sql.DatabaseAccess getDatabaseAccessInternal(String databaseID)
                                                              throws UTGBException
Throws:
UTGBException

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

openServletReader

public static BufferedReader openServletReader(javax.servlet.http.HttpServletRequest request,
                                               String path)
                                        throws javax.servlet.ServletException,
                                               IOException
Throws:
javax.servlet.ServletException
IOException


Copyright © 2007-2012 utgenome.org. All Rights Reserved.