org.appng.cli

## Class CliBootstrap

- java.lang.Object
- - org.appng.cli.CliBootstrap

-     public class CliBootstrap
      extends Object

  Main entry-point to the appNG command line interface, responsible for bootstrapping. Creates an `ApplicationContext` and delegates to `CliCore`.
  Author:
    Matthias Herlitzius

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `APPNG_HOME`
    `static String` | `CURRENT_COMMAND`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CliBootstrap()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] args)` Runs the command line interface and calls `System#exit(int)` with the status provided by `run(String[])`.
    `static int` | `run(String[] args)` Runs the command line interface

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CURRENT_COMMAND

          public static String CURRENT_COMMAND

    - #### APPNG_HOME

          public static final String APPNG_HOME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CliBootstrap

          public CliBootstrap()

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws IOException

      Runs the command line interface and calls `System#exit(int)` with the status provided by `run(String[])`.
      Parameters:
        `args` - the command line arguments
      Throws:
        `IOException` - if "/conf/appNG.properties" could not be found
      See Also:
        `run(String[])`

    - #### run

          public static int run(String[] args)
                         throws IOException

      Runs the command line interface
      Parameters:
        `args` - the command line arguments
      Returns:
        the execution status:
        - 0 - if everything went well
        - 9 - if the database is in an erroneous state
        - 10 - if an error occurred while executing the command
        - 11 - if there is no such command
        - 12 - if an invalid option was added to the command
        - 13 - if the command is missing some options
      Throws:
        `IOException` - if "/conf/appNG.properties" could not be found

Copyright © 2011–2023 aiticon GmbH. All rights reserved.