com.ibm.commerce.server
Class ServerConfiguration

java.lang.Object
  |
  +--com.ibm.commerce.server.ServerConfiguration
All Implemented Interfaces:
java.io.Serializable

public class ServerConfiguration
extends java.lang.Object
implements java.io.Serializable

This class reads the xml configuration file in and holds all the configuration node the server needs to operatate on.

See Also:
Serialized Form

Field Summary
 java.util.Hashtable configCache
           
 org.w3c.dom.Node configDOMTree
           
static javax.servlet.ServletContext servletContext
           
 
Method Summary
 org.w3c.dom.Node getConfigCache(java.lang.String key)
          Returns a node with the given name.
 java.lang.String getConfigFileName()
          Gets the name of the configuration file.
static javax.servlet.ServletContext getServletContext()
          Gets the servlet context.
 void initialize(java.lang.String filename)
          Initializes the config cache.
 void setConfigCache(java.lang.String key, org.w3c.dom.Node value)
          Adds the node to the cache.
 void setConfigFileName(java.lang.String fileName)
          Sets the configuration file name
static void setServletContext(javax.servlet.ServletContext val)
          Sets the servlet context.
static ServerConfiguration singleton()
          Returns a singleton instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configCache

public java.util.Hashtable configCache

configDOMTree

public org.w3c.dom.Node configDOMTree

servletContext

public static javax.servlet.ServletContext servletContext
Method Detail

getConfigCache

public org.w3c.dom.Node getConfigCache(java.lang.String key)
Returns a node with the given name.

Parameters:
key - String - name of a node
Returns:
Node

getConfigFileName

public java.lang.String getConfigFileName()
Gets the name of the configuration file.

Returns:
String - name of file

getServletContext

public static javax.servlet.ServletContext getServletContext()
Gets the servlet context.
Returns:
ServletContext

initialize

public void initialize(java.lang.String filename)
                throws java.lang.Exception
Initializes the config cache.

setConfigCache

public void setConfigCache(java.lang.String key,
                           org.w3c.dom.Node value)
Adds the node to the cache.

Parameters:
key - String - name of node
value - Node - the dom node

setConfigFileName

public void setConfigFileName(java.lang.String fileName)
Sets the configuration file name

Parameters:
fileName - String - name of file

setServletContext

public static void setServletContext(javax.servlet.ServletContext val)
Sets the servlet context.
Parameters:
val - javax.servlet.ServletContext

singleton

public static ServerConfiguration singleton()
Returns a singleton instance of this class.
Returns:
javax.servlet.ServletContext