org.objectweb.telosys.common
Class TelosysPropertiesLoader

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysPropertiesLoader

public class TelosysPropertiesLoader
extends java.lang.Object

Utility class to load the Telosys properties


Constructor Summary
TelosysPropertiesLoader()
           
 
Method Summary
protected static java.io.InputStream getInputStream(java.lang.String sName, int iOrigin, javax.servlet.ServletContext servletContext)
           
static TelosysProperties load()
          Try to load 'telosys.properties' via CLASSPATH
static TelosysProperties load(javax.servlet.ServletContext servletContext)
          Try to load the main TELOSYS properties file
Step 1 - Find init parameter of the "web.xml" (file or resource name)
Step 1.1 - try to load it from the filesystem
Step 1.2 - try to load it from the WebApp context
Step 2 - Try to load the standard "/WEB-INF/conf/telosys.properties"
Step 3 - Try to load the standard "telosys.properties" via the CLASSPATH
static TelosysProperties load(java.lang.String sFile)
          Try to load a specific properties file from the filesystem
protected static TelosysProperties loadProperties(java.lang.String sName, int iOrigin, javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelosysPropertiesLoader

public TelosysPropertiesLoader()
Method Detail

load

public static TelosysProperties load(javax.servlet.ServletContext servletContext)
Try to load the main TELOSYS properties file
Step 1 - Find init parameter of the "web.xml" (file or resource name)
Step 1.1 - try to load it from the filesystem
Step 1.2 - try to load it from the WebApp context
Step 2 - Try to load the standard "/WEB-INF/conf/telosys.properties"
Step 3 - Try to load the standard "telosys.properties" via the CLASSPATH

Parameters:
servletContext - : the ServletContext to use for 'web.xml' parameters and 'WEB-INF/conf/telosys.properties'( can be null )
Returns:

load

public static TelosysProperties load()
Try to load 'telosys.properties' via CLASSPATH

Returns:

load

public static TelosysProperties load(java.lang.String sFile)
Try to load a specific properties file from the filesystem

Parameters:
sFile -
Returns:

loadProperties

protected static TelosysProperties loadProperties(java.lang.String sName,
                                                  int iOrigin,
                                                  javax.servlet.ServletContext servletContext)

getInputStream

protected static java.io.InputStream getInputStream(java.lang.String sName,
                                                    int iOrigin,
                                                    javax.servlet.ServletContext servletContext)