Class EtlLauncher

java.lang.Object
scriptella.tools.launcher.EtlLauncher

public class EtlLauncher extends Object
Command line launcher.
Version:
1.0
Author:
Fyodor Kupolov
  • Field Details

  • Constructor Details

    • EtlLauncher

      public EtlLauncher()
  • Method Details

    • getOut

      protected PrintStream getOut()
      Stream used for launcher messages. Overridable in tests.
    • getErr

      protected PrintStream getErr()
      Stream used for launcher errors. Overridable in tests.
    • setNoStat

      public void setNoStat(boolean suppressStatistics)
      Parameters:
      suppressStatistics - true if statistics must be suppressed.
      See Also:
    • setNoJmx

      public void setNoJmx(boolean noJmx)
      Suppress JMX MBean registration for monitoring.
      Parameters:
      noJmx - true if JMX should be suppressed.
    • printVersion

      protected void printVersion()
    • printUsage

      protected void printUsage()
    • template

      protected EtlLauncher.ErrorCode template(List<String> args)
    • setProperties

      public void setProperties(Map<String,?> props)
      Sets additional properties available for ETL.

      By default System.getProperties() is used.

      Parameters:
      props - properties map.
    • setProgressIndicator

      public void setProgressIndicator(ProgressIndicator indicator)
    • execute

      public void execute(File file) throws EtlExecutorException
      Throws:
      EtlExecutorException
    • resolveFile

      public File resolveFile(File dir, String name) throws FileNotFoundException
      Resolves ETL file using the following rule: if specified file exists - it is returned, otherwise if file has no extension name+".etl.xml" file is checked for presence and returned.
      Parameters:
      dir - parent directory, may be null.
      name - file name, may be null in this case default name is used.
      Returns:
      resolved ETL file.
      Throws:
      FileNotFoundException - if ETL file cannot be found.
    • isFile

      protected boolean isFile(File file)
      Overridable for testing.
    • main

      public static void main(String[] args)