Class ConfigurationDBAdapterParser

java.lang.Object
com.espertech.esperio.db.config.ConfigurationDBAdapterParser

public class ConfigurationDBAdapterParser extends Object
  • Constructor Details

    • ConfigurationDBAdapterParser

      public ConfigurationDBAdapterParser()
  • Method Details

    • doConfigure

      protected static void doConfigure(ConfigurationDBAdapter configuration, InputStream stream, String resourceName) throws RuntimeException
      Use the configuration specified in the given input stream.
      Parameters:
      configuration - is the configuration object to populate
      stream - Inputstream to be read from
      resourceName - The name to use in warning/error messages
      Throws:
      RuntimeException - is thrown when the configuration could not be parsed
    • getDocument

      protected static Document getDocument(InputStream stream, String resourceName) throws RuntimeException
      Returns the document.
      Parameters:
      stream - to read
      resourceName - resource in stream
      Returns:
      document
      Throws:
      RuntimeException - if the document could not be loaded or parsed
    • doConfigure

      protected static void doConfigure(ConfigurationDBAdapter configuration, Document doc) throws RuntimeException
      Parse the W3C DOM document.
      Parameters:
      configuration - is the configuration object to populate
      doc - to parse
      Throws:
      RuntimeException - to indicate parse errors
    • getResourceAsStream

      protected static InputStream getResourceAsStream(String resource)
      Returns an input stream from an application resource in the classpath.
      Parameters:
      resource - to get input stream for
      Returns:
      input stream for resource