org.pentaho.di.core
Class KettleEnvironment

java.lang.Object
  extended by org.pentaho.di.core.KettleEnvironment

public class KettleEnvironment
extends Object

The KettleEnvironment class contains settings and properties for all of Kettle. Initialization of the environment is done by calling the init() method, which reads in properties file(s), registers plugins, etc. Initialization should be performed once at application startup; for example, Spoon's main() method calls KettleEnvironment.init() in order to prepare the environment for usage by Spoon.


Constructor Summary
KettleEnvironment()
           
 
Method Summary
static void createKettleHome()
          Creates the kettle home area, which is a directory containing a default kettle.properties file
static void init()
          Initializes the Kettle environment.
static void init(boolean simpleJndi)
          Initializes the Kettle environment.
static boolean isInitialized()
          Checks if the Kettle environment has been initialized.
 void loadPluginRegistry()
          Loads the plugin registry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KettleEnvironment

public KettleEnvironment()
Method Detail

init

public static void init()
                 throws KettleException
Initializes the Kettle environment. This method will attempt to configure Simple JNDI, by simply calling init(true).

Throws:
KettleException - Any errors that occur during initialization will throw a KettleException.
See Also:
init(boolean)

init

public static void init(boolean simpleJndi)
                 throws KettleException
Initializes the Kettle environment. This method performs the following operations: - Creates a Kettle "home" directory if it does not already exist - Reads in the kettle.properties file - Initializes the logging back-end - Sets the console log level to debug - If specified by parameter, configures Simple JNDI - Registers the native types and the plugins for the various plugin types - Reads the list of variables - Initializes the Lifecycle listeners

Parameters:
simpleJndi - true to configure Simple JNDI, false otherwise
Throws:
KettleException - Any errors that occur during initialization will throw a KettleException.

createKettleHome

public static void createKettleHome()
Creates the kettle home area, which is a directory containing a default kettle.properties file


isInitialized

public static boolean isInitialized()
Checks if the Kettle environment has been initialized.

Returns:
true if initialized, false otherwise

loadPluginRegistry

public void loadPluginRegistry()
                        throws KettlePluginException
Loads the plugin registry.

Throws:
KettlePluginException - if any errors are encountered while loading the plugin registry.