org.yasl.arch.impl.application.config
Class ConfigUtils

java.lang.Object
  extended byorg.yasl.arch.impl.application.config.ConfigUtils

public class ConfigUtils
extends Object

Version:
1.0
Author:
Jeff Chapman

Method Summary
static InputSource getInputSource(File configFile)
           
static InputSource getInputSource(String configFileName)
          Convenience method for obtaining an input source object.
static InputSource getInputSource(String configFileName, ClassLoader classLoader)
          Convenience method for obtaining an input source object.
static void initFromConfigFile(ContentHandler handler, InputSource inputSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initFromConfigFile

public static void initFromConfigFile(ContentHandler handler,
                                      InputSource inputSource)
                               throws YASLApplicationException
Throws:
YASLApplicationException

getInputSource

public static InputSource getInputSource(String configFileName)
                                  throws YASLApplicationException
Convenience method for obtaining an input source object.

Parameters:
configFileName - String
Returns:
InputSource
Throws:
YASLApplicationException

getInputSource

public static InputSource getInputSource(String configFileName,
                                         ClassLoader classLoader)
                                  throws YASLApplicationException
Convenience method for obtaining an input source object. This method should be used if the class loader for the resource is different from that used for the ConfigUtils class. For example, if a resource is dynamically loaded from a jar file.

The address for the resource must be in absolute form, for example: "/org/yasl/testapp/config/yaslTestAppConfig.xml"

Parameters:
configFileName - String
classLoader - ClassLoader
Returns:
InputSource
Throws:
YASLApplicationException

getInputSource

public static InputSource getInputSource(File configFile)
                                  throws YASLApplicationException
Throws:
YASLApplicationException