scriptella.driver.spring
Class EtlExecutorBean

java.lang.Object
  extended by scriptella.execution.EtlExecutor
      extended by scriptella.driver.spring.EtlExecutorBean
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Callable<ExecutionStatistics>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

public class EtlExecutorBean
extends EtlExecutor
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware

Implementation of EtlExecutor for Spring IoC container.

This class exposes a set of configurable properties and provides a Callable invocation interface to avoid dependency on Scriptella in application code.

Version:
1.0
Author:
Fyodor Kupolov

Constructor Summary
EtlExecutorBean()
          Creates scripts executor.
 
Method Summary
 void afterPropertiesSet()
           
 ExecutionStatistics call()
          Simply calls execute().
 ExecutionStatistics execute()
          Executes ETL based on a specified configuration.
 ExecutionStatistics execute(ProgressIndicator indicator)
          Executes ETL based on a specified configuration.
 java.util.Map<java.lang.String,?> getProperties()
           
 void setAutostart(boolean autostart)
          Sets autostart property.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setConfigLocation(org.springframework.core.io.Resource resource)
          Sets configuration location.
 void setProgressIndicator(ProgressIndicator progressIndicator)
          Sets progress indicator to use.
 void setProperties(java.util.Map<java.lang.String,?> properties)
           
 
Methods inherited from class scriptella.execution.EtlExecutor
getConfiguration, isJmxEnabled, newExecutor, newExecutor, newExecutor, prepare, run, setConfiguration, setJmxEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtlExecutorBean

public EtlExecutorBean()
Creates scripts executor.

Method Detail

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

setAutostart

public void setAutostart(boolean autostart)
Sets autostart property.

Parameters:
autostart - true if executor must be automatically runned after initialization. Default value is false.

setProgressIndicator

public void setProgressIndicator(ProgressIndicator progressIndicator)
Sets progress indicator to use.

By default no progress shown.

Parameters:
progressIndicator - progress indicator to use.

setConfigLocation

public void setConfigLocation(org.springframework.core.io.Resource resource)
                       throws java.io.IOException
Sets configuration location.

Parameters:
resource - configuration resource.
Throws:
java.io.IOException

getProperties

public java.util.Map<java.lang.String,?> getProperties()

setProperties

public void setProperties(java.util.Map<java.lang.String,?> properties)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

call

public ExecutionStatistics call()
                         throws EtlExecutorException
Simply calls execute().

Specified by:
call in interface java.util.concurrent.Callable<ExecutionStatistics>
Overrides:
call in class EtlExecutor
Throws:
EtlExecutorException

execute

public ExecutionStatistics execute()
                            throws EtlExecutorException
Description copied from class: EtlExecutor
Executes ETL based on a specified configuration.

Overrides:
execute in class EtlExecutor
Returns:
execution statistics for ETL execution.
Throws:
EtlExecutorException - if ETL fails.
See Also:
EtlExecutor.execute(scriptella.interactive.ProgressIndicator)

execute

public ExecutionStatistics execute(ProgressIndicator indicator)
                            throws EtlExecutorException
Description copied from class: EtlExecutor
Executes ETL based on a specified configuration.

Overrides:
execute in class EtlExecutor
Parameters:
indicator - progress indicator to use.
Returns:
execution statistics for ETL execution.
Throws:
EtlExecutorException - if ETL fails.


Copyright © Copyright 2006-2007 The Scriptella Project Team.