Class JavascriptTasklet

  • All Implemented Interfaces:
    org.springframework.batch.core.step.tasklet.StoppableTasklet, org.springframework.batch.core.step.tasklet.Tasklet, org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.StepListener, org.springframework.beans.factory.InitializingBean

    public class JavascriptTasklet
    extends org.springframework.batch.core.listener.StepExecutionListenerSupport
    implements org.springframework.batch.core.step.tasklet.StoppableTasklet, org.springframework.beans.factory.InitializingBean
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String reportDir  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution contribution, org.springframework.batch.core.scope.context.ChunkContext chunkContext)  
      void setAddProperties​(boolean addProperties)
      Add Spring properties as environment variables when executing the script.
      void setEnvironmentParams​(java.util.Map<java.lang.String,​java.lang.String> envp)  
      void setExecutable​(java.lang.String executable)  
      void setPropertyRegex​(java.lang.String propertyRegex)
      If addProperties is set to true, only Spring properties matching the provided regexp will be added as environment variables.
      void setScriptDir​(java.lang.String dir)  
      void setScriptFile​(java.lang.String scriptFile)  
      void setScriptFiles​(java.util.List<java.lang.String> scriptFiles)  
      void setScriptParameters​(java.util.List<java.lang.String> scriptParameters)  
      void setTerminationCheckInterval​(long checkInterval)  
      void setTimeout​(long timeout)  
      void stop()  
      • Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport

        afterStep, beforeStep
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • reportDir

        @Value("${bauta.reportDir}")
        protected java.lang.String reportDir
    • Constructor Detail

      • JavascriptTasklet

        public JavascriptTasklet()
    • Method Detail

      • execute

        public org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution contribution,
                                                                     org.springframework.batch.core.scope.context.ChunkContext chunkContext)
                                                              throws java.lang.Exception
        Specified by:
        execute in interface org.springframework.batch.core.step.tasklet.Tasklet
        Throws:
        java.lang.Exception
      • setExecutable

        public void setExecutable​(java.lang.String executable)
      • setEnvironmentParams

        public void setEnvironmentParams​(java.util.Map<java.lang.String,​java.lang.String> envp)
      • setScriptDir

        public void setScriptDir​(java.lang.String dir)
      • afterPropertiesSet

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

        public void setTimeout​(long timeout)
      • setTerminationCheckInterval

        public void setTerminationCheckInterval​(long checkInterval)
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.batch.core.step.tasklet.StoppableTasklet
      • setScriptFile

        public void setScriptFile​(java.lang.String scriptFile)
      • setScriptFiles

        public void setScriptFiles​(java.util.List<java.lang.String> scriptFiles)
      • setScriptParameters

        public void setScriptParameters​(java.util.List<java.lang.String> scriptParameters)
      • setAddProperties

        public void setAddProperties​(boolean addProperties)
        Add Spring properties as environment variables when executing the script. If you dont want to add all properties, see setPropertyRegex(String)
        Parameters:
        addProperties -
      • setPropertyRegex

        public void setPropertyRegex​(java.lang.String propertyRegex)
        If addProperties is set to true, only Spring properties matching the provided regexp will be added as environment variables.
        Parameters:
        propertyRegex -