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 and holds all the data in the configuration node that the server needs for operation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      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 restServletContext
      The default value for the rest servlet context.
      static javax.servlet.ServletContext servletContext
      The default value for the servlet context.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      org.w3c.dom.Node getConfigCache(java.lang.String key)
      This method returns a node with the given name.
      java.lang.String getConfigFileName()
      This method gets the name of the configuration file.
      static javax.servlet.ServletContext getRestServletContext()
      This method gets the rst servlet context.
      static javax.servlet.ServletContext getServletContext()
      This method gets the servlet context.
      void initialize(java.lang.String filename)
      This method initializes the configuration cache.
      void setConfigCache(java.lang.String key, org.w3c.dom.Node value)
      This method adds the node to the cache.
      void setConfigFileName(java.lang.String fileName)
      This method sets the configuration file name.
      static void setRestServletContext(javax.servlet.ServletContext val)
      This method sets the servlet context for Rest.
      static void setServletContext(javax.servlet.ServletContext val)
      This method sets the servlet context.
      static ServerConfiguration singleton()
      This method returns a singleton instance of this class.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        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.
      • restServletContext

        public static javax.servlet.ServletContext restServletContext
        The default value for the rest servlet context.
    • Method Detail

      • getConfigCache

        public org.w3c.dom.Node getConfigCache(java.lang.String key)
        This method returns a node with the given name.
        Parameters:
        key - The name of the node.
        Returns:
        The Node object with the given name.
      • getConfigFileName

        public java.lang.String getConfigFileName()
        This method gets the name of the configuration file.
        Returns:
        The name of the file.
      • getServletContext

        public static javax.servlet.ServletContext getServletContext()
        This method gets the servlet context.
        Returns:
        The servlet context.
      • getRestServletContext

        public static javax.servlet.ServletContext getRestServletContext()
        This method gets the rst servlet context.
        Returns:
        The servlet context.
      • initialize

        public void initialize(java.lang.String filename)
                        throws java.lang.Exception
        This method initializes the configuration cache.
        Parameters:
        filename - The configuration file name.
        Throws:
        java.lang.Exception
      • setConfigCache

        public void setConfigCache(java.lang.String key,
                                   org.w3c.dom.Node value)
        This method adds the node to the cache.
        Parameters:
        key - The name of the node.
        value - The dom node.
      • setConfigFileName

        public void setConfigFileName(java.lang.String fileName)
        This method sets the configuration file name.
        Parameters:
        fileName - The name of the configuration file.
      • setServletContext

        public static void setServletContext(javax.servlet.ServletContext val)
        This method sets the servlet context.
        Parameters:
        val - The servlet context.
      • setRestServletContext

        public static void setRestServletContext(javax.servlet.ServletContext val)
        This method sets the servlet context for Rest.
        Parameters:
        val - The servlet context.
      • singleton

        public static ServerConfiguration singleton()
        This method returns a singleton instance of this class.
        Returns:
        A singleton instance of ServerConfiguration.