com.filenet.wcm.toolkit.server.util
Class ConfigurationUtil

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.ConfigurationUtil

public class ConfigurationUtil
extends java.lang.Object

ConfigurationUtil is a utility class that will be used by both the upgrade scripts and by the web application. It returns values from web.xml to the scripts and locates configuration files for the web application.


Method Summary
static java.lang.String getBootstrapFileValue(java.lang.String webInfFolder)
          Returns the bootstrap file value to the upgrade scripts.
static java.lang.String getCofigFileFullPath(java.lang.String configFileName)
           
static java.lang.String getConfigDirPath(java.lang.String webInfFolder)
          Returns the configuration directory path to the upgrade scripts.
static java.io.InputStream getConfigFileInputStream(java.lang.String configFileName)
          Returns the an inputstream to an input config file.
static java.io.InputStream getConfigFileInputStream(java.lang.String configFileName, javax.servlet.ServletContext servletContext)
          Deprecated. - Use getConfigFileInputStream(configFileName)
static java.io.OutputStream getConfigFileOutputStream(java.lang.String configFileName)
          Returns the an outputstream to an input config file.
static java.io.OutputStream getConfigFileOutputStream(java.lang.String configFileName, javax.servlet.ServletContext servletContext)
          Deprecated. - Use getConfigFileOutputStream(configFileName)
static java.lang.String getConfigurationDirPath()
           
static java.io.InputStream getResourceFileInputStream(java.lang.String relFilePath)
          Returns the an inputstream to a resource file.
static void initialize(javax.servlet.ServletContext application)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

public static void initialize(javax.servlet.ServletContext application)
                       throws java.net.MalformedURLException,
                              java.io.IOException,
                              org.xml.sax.SAXException,
                              javax.xml.parsers.ParserConfigurationException
Throws:
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

getConfigDirPath

public static java.lang.String getConfigDirPath(java.lang.String webInfFolder)
                                         throws java.lang.Exception
Returns the configuration directory path to the upgrade scripts.

Parameters:
webInfFolder - The WEB-INF file path.
Returns:
configDirPath The configuration directory path
Throws:
java.lang.Exception

getBootstrapFileValue

public static java.lang.String getBootstrapFileValue(java.lang.String webInfFolder)
                                              throws java.lang.Exception
Returns the bootstrap file value to the upgrade scripts.

Parameters:
webInfFolder - The WEB-INF file path.
Returns:
bootstrapValue The bootstrap file value.
Throws:
java.lang.Exception

getConfigFileInputStream

public static java.io.InputStream getConfigFileInputStream(java.lang.String configFileName,
                                                           javax.servlet.ServletContext servletContext)
                                                    throws java.lang.Exception
Deprecated. - Use getConfigFileInputStream(configFileName)

Throws:
java.lang.Exception

getCofigFileFullPath

public static java.lang.String getCofigFileFullPath(java.lang.String configFileName)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getConfigFileInputStream

public static java.io.InputStream getConfigFileInputStream(java.lang.String configFileName)
                                                    throws java.lang.Exception
Returns the an inputstream to an input config file.

Parameters:
configFileName - The configuration file name to be located.
Returns:
inputStream An inputstream to the config file, or null if not found.
Throws:
java.lang.Exception

getResourceFileInputStream

public static java.io.InputStream getResourceFileInputStream(java.lang.String relFilePath)
                                                      throws java.lang.Exception
Returns the an inputstream to a resource file.

Parameters:
relFilePath - The resource file name to be located.
Returns:
inputStream An inputstream to the config file, or null if not found.
Throws:
java.lang.Exception

getConfigFileOutputStream

public static java.io.OutputStream getConfigFileOutputStream(java.lang.String configFileName,
                                                             javax.servlet.ServletContext servletContext)
                                                      throws java.lang.Exception
Deprecated. - Use getConfigFileOutputStream(configFileName)

Throws:
java.lang.Exception

getConfigFileOutputStream

public static java.io.OutputStream getConfigFileOutputStream(java.lang.String configFileName)
                                                      throws java.lang.Exception
Returns the an outputstream to an input config file.

Parameters:
configFileName - The configuration file name to be located.
Returns:
outputStream An outputstream to the config file, or null if not found.
Throws:
java.lang.Exception

getConfigurationDirPath

public static java.lang.String getConfigurationDirPath()


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.