Class CommandLineHelper

java.lang.Object
org.apache.camel.dsl.jbang.core.common.CommandLineHelper

public final class CommandLineHelper extends Object
Helper for CLI command line.
  • Field Details

  • Method Details

    • augmentWithUserConfiguration

      public static void augmentWithUserConfiguration(picocli.CommandLine commandLine, String... args)
    • createPropertyFile

      public static void createPropertyFile() throws IOException
      Throws:
      IOException
    • loadProperties

      public static void loadProperties(Consumer<Properties> consumer)
    • storeProperties

      public static void storeProperties(Properties properties, Printer printer)
    • getHomeDir

      public static String getHomeDir()
      Gets the user home directory.
      Returns:
      the user home directory.
    • useHomeDir

      public static void useHomeDir(String homeDir)
      Adjust basic home directory where user properties and other settings will be stored. Unit tests may set this in order to create stable and independent tests.
      Parameters:
      homeDir - the home directory.
    • getCamelDir

      public static File getCamelDir()
      The basic Camel directory located in the user home directory.
      Returns:
      file pointing to the camel directory.
    • getWorkDir

      public static File getWorkDir()
      Gets the Camel JBang working directory.
      Returns:
      file pointing to the working directory.