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
          The default value for the configuration cache.
 org.w3c.dom.Node configDOMTree
          The default value for the configuration DOM tree.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static javax.servlet.ServletContext servletContext
          The default value for the servlet context.
 
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
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

configDOMTree

public org.w3c.dom.Node configDOMTree
The default value for the configuration DOM tree.

configCache

public java.util.Hashtable configCache
The default value for the configuration cache.

servletContext

public static javax.servlet.ServletContext servletContext
The default value for the servlet context.
Method Detail

getConfigCache

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

getConfigFileName

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

getServletContext

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

initialize

public void initialize(java.lang.String filename)
                throws java.lang.Exception
Initializes the config cache.
Parameters:
filename - configuration file name
Throws:
java.lang.Exception

setConfigCache

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

setConfigFileName

public void setConfigFileName(java.lang.String fileName)
Sets the configuration file name.
Parameters:
fileName - name of configuration file

setServletContext

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

singleton

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