Class Orchestrator

  • All Implemented Interfaces:
    com.ibm.dbb.metadata.cli.YamlBuildProcessor

    public class Orchestrator
    extends java.lang.Object
    implements com.ibm.dbb.metadata.cli.YamlBuildProcessor
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Orchestrator.Executor
      Used to load and cache AbstractLoader instances to be used as executors for actions.
    • Constructor Summary

      Constructors 
      Constructor Description
      Orchestrator()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int execute()
      Executes the lifecycle from the loadConfiguration method.
      org.apache.commons.cli.Options getCliOptions()  
      java.lang.String getCliUsage()  
      static java.lang.String getLastExecutedTask()  
      boolean loadConfiguration​(java.lang.String lifecycle, java.io.File sourceDir, java.lang.String[] args)
      Loads the build configuration from $DBB_BUILD, and the application configuration from include statements or, secondly, the input source directory.
      • Methods inherited from class java.lang.Object

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

      • REQUIRE_APPLICATION_CONFIGURATION

        public static final java.lang.String REQUIRE_APPLICATION_CONFIGURATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • Orchestrator

        public Orchestrator()
    • Method Detail

      • getCliOptions

        public org.apache.commons.cli.Options getCliOptions()
        Specified by:
        getCliOptions in interface com.ibm.dbb.metadata.cli.YamlBuildProcessor
      • getCliUsage

        public java.lang.String getCliUsage()
        Specified by:
        getCliUsage in interface com.ibm.dbb.metadata.cli.YamlBuildProcessor
      • loadConfiguration

        public boolean loadConfiguration​(java.lang.String lifecycle,
                                         java.io.File sourceDir,
                                         java.lang.String[] args)
                                  throws BuildException,
                                         ClassSourceException,
                                         java.io.IOException,
                                         org.apache.commons.cli.ParseException
        Loads the build configuration from $DBB_BUILD, and the application configuration from include statements or, secondly, the input source directory. CLI arguments are parsed here, tasks have their source classes/scripts validated, and the context values originating from the orchestrator are inserted.
        Specified by:
        loadConfiguration in interface com.ibm.dbb.metadata.cli.YamlBuildProcessor
        Parameters:
        lifecycle - the lifecycle to validate and use for execution.
        sourceDir - the directory of the application to execute on.
        args - the arguments passed in through the CLI.
        Returns:
        boolean indicating whether to continue to execution or not. true for continuation.
        Throws:
        BuildException
        ClassSourceException - on issues during the loading of task classes.
        java.io.IOException
        org.apache.commons.cli.ParseException - on issues during the parsing of CLI options.
      • execute

        public int execute()
                    throws java.lang.Exception
        Executes the lifecycle from the loadConfiguration method.
        Specified by:
        execute in interface com.ibm.dbb.metadata.cli.YamlBuildProcessor
        Throws:
        com.ibm.dbb.task.configuration.ConfigurationException
        BuildException
        ClassSourceException
        java.lang.Exception
      • getLastExecutedTask

        public static java.lang.String getLastExecutedTask()