Package org.pentaho.di.core
Class KettleEnvironment
java.lang.Object
org.pentaho.di.core.KettleEnvironment
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
init()
Initializes the Kettle environment.static void
init
(boolean simpleJndi) Initializes the Kettle environment.static void
static void
static boolean
Checks if the Kettle environment has been initialized.void
Loads the plugin registry.static void
reset()
static void
setExecutionInformation
(ExecutorInterface executor, Repository repository) Sets the executor's user and Server informationstatic void
shutdown()
-
Constructor Details
-
KettleEnvironment
public KettleEnvironment()
-
-
Method Details
-
init
public static void init() throws org.pentaho.di.core.exception.KettleExceptionInitializes the Kettle environment. This method will attempt to configure Simple JNDI, by simply calling init(true).- Throws:
org.pentaho.di.core.exception.KettleException
- Any errors that occur during initialization will throw a KettleException.- See Also:
-
init
public static void init(Class<? extends org.pentaho.di.core.plugins.PluginTypeInterface> pluginClasses) -
init
public static void init(boolean simpleJndi) throws org.pentaho.di.core.exception.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:
org.pentaho.di.core.exception.KettleException
- Any errors that occur during initialization will throw a KettleException.
-
init
public static void init(List<org.pentaho.di.core.plugins.PluginTypeInterface> pluginClasses, boolean simpleJndi) throws org.pentaho.di.core.exception.KettleException - Throws:
org.pentaho.di.core.exception.KettleException
-
shutdown
public static void shutdown() -
isInitialized
public static boolean isInitialized()Checks if the Kettle environment has been initialized.- Returns:
- true if initialized, false otherwise
-
loadPluginRegistry
public void loadPluginRegistry() throws org.pentaho.di.core.exception.KettlePluginExceptionLoads the plugin registry.- Throws:
org.pentaho.di.core.exception.KettlePluginException
- if any errors are encountered while loading the plugin registry.
-
setExecutionInformation
Sets the executor's user and Server information -
reset
public static void reset()
-