Class Main

java.lang.Object
nz.org.riskscape.engine.cli.Main
All Implemented Interfaces:
nz.org.riskscape.picocli.CommandLine.IVersionProvider

public class Main extends Object implements nz.org.riskscape.picocli.CommandLine.IVersionProvider

CLI Application entry point.

  • Field Details

    • LICENSE_NOTICE

      public static final String LICENSE_NOTICE
    • CLI_HELP_RESOURCE_BUNDLE_NAME

      public static final String CLI_HELP_RESOURCE_BUNDLE_NAME
      See Also:
    • cmd

      protected nz.org.riskscape.picocli.CommandLine cmd
    • terminal

      protected final nz.org.riskscape.cli.Terminal terminal
    • messages

      protected final nz.org.riskscape.engine.i18n.Messages messages
    • exithook

      protected final Consumer<Integer> exithook
    • pluginRepository

      protected final nz.org.riskscape.engine.plugin.PluginRepository pluginRepository
    • bootstrap

      protected final CliBootstrap bootstrap
  • Constructor Details

    • Main

      public Main()
    • Main

      public Main(org.jline.terminal.Terminal jlineTerminal, nz.org.riskscape.cli.Terminal terminal, nz.org.riskscape.engine.i18n.Messages messages, Consumer<Integer> exithook, nz.org.riskscape.engine.plugin.PluginRepository pluginRepository, CliBootstrap bootstrap)
  • Method Details

    • main

      public static void main(String[] args)

      Java app entry point.

    • lookupApplicationHome

      public static Path lookupApplicationHome()

      Standard logic for looking up where RiskScape seems to be installed

    • getVersion

      public String[] getVersion() throws Exception
      Specified by:
      getVersion in interface nz.org.riskscape.picocli.CommandLine.IVersionProvider
      Throws:
      Exception
    • runMain

      public void runMain(String[] args) throws Exception
      Throws:
      Exception
    • handleExitException

      protected void handleExitException(nz.org.riskscape.engine.cli.ExitException ex, boolean showStackTrace)
    • unhandledException

      protected void unhandledException(Exception ex, boolean showStackTrace)
    • processResult

      public void processResult(Object result)