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<scriptella.execution.ExecutionStatistics>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

public class EtlExecutorBean
extends scriptella.execution.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()
           
 scriptella.execution.ExecutionStatistics call()
          Simply calls execute().
 scriptella.execution.ExecutionStatistics execute()
           
 scriptella.execution.ExecutionStatistics execute(scriptella.interactive.ProgressIndicator indicator)
           
 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(scriptella.interactive.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, isSuppressStatistics, newExecutor, newExecutor, newExecutor, prepare, run, setConfiguration, setJmxEnabled, setSuppressStatistics
 
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(scriptella.interactive.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 scriptella.execution.ExecutionStatistics call()
                                              throws scriptella.execution.EtlExecutorException
Simply calls execute().

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

execute

public scriptella.execution.ExecutionStatistics execute()
                                                 throws scriptella.execution.EtlExecutorException
Overrides:
execute in class scriptella.execution.EtlExecutor
Throws:
scriptella.execution.EtlExecutorException

execute

public scriptella.execution.ExecutionStatistics execute(scriptella.interactive.ProgressIndicator indicator)
                                                 throws scriptella.execution.EtlExecutorException
Overrides:
execute in class scriptella.execution.EtlExecutor
Throws:
scriptella.execution.EtlExecutorException


Copyright © Copyright 2006-2009 The Scriptella Project Team.