Class EtlExecutorBean

java.lang.Object
scriptella.execution.EtlExecutor
scriptella.driver.spring.EtlExecutorBean
All Implemented Interfaces:
Runnable, Callable<ExecutionStatistics>, org.springframework.beans.factory.Aware, 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 Details

    • EtlExecutorBean

      public EtlExecutorBean()
      Creates scripts executor.
  • Method Details

    • 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 IOException
      Sets configuration location.
      Parameters:
      resource - configuration resource.
      Throws:
      IOException
    • getProperties

      public Map<String,?> getProperties()
    • setProperties

      public void setProperties(Map<String,?> properties)
    • afterPropertiesSet

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

      Simply calls execute().
      Specified by:
      call in interface 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:
    • 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.