org.appng.cli.commands

## Class CommandMain

- java.lang.Object
- - org.appng.cli.commands.CommandMain

-     public class CommandMain
      extends Object

  The main `appng` command.

       Usage: appng [options] [command] [command options]
         Options:
           -h, -help
              Prints the usage of the appNG Command Line Interface
              Default: false
           -initdatabase, -i
              Initializes the database. Use this in production. Must be executed also
              if connection parameters like user name or password of the database root
              connection have been changed.
              Default: false
           -managed, -m
              Make the root-connection managed by appNG
              Default: false
           -plainsql
              Do not format the SQL.
              Default: false
           -schemaexport
              Exports the schema to the database. Use only during development!
              Default: false
           -showsql
              Prints formatted SQL.
              Default: false

  Author:
    Matthias Herlitzius

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandMain()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.flywaydb.core.api.MigrationInfo` | `doInitDatabase(DatabaseService databaseService, Properties config)` Initializes the appNG root connection
    `Map<String,String>` | `getHibernateParams()`
    `List<String>` | `getParameters()`
    `boolean` | `isConnectionManaged()`
    `boolean` | `isInitDatabase()`
    `boolean` | `isSchemaExport()`
    `boolean` | `isUsage()`

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

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

- - ### Constructor Detail

    - #### CommandMain

          public CommandMain()

  - ### Method Detail

    - #### getParameters

          public List<String> getParameters()

    - #### isUsage

          public boolean isUsage()

    - #### getHibernateParams

          public Map<String,String> getHibernateParams()

    - #### isSchemaExport

          public boolean isSchemaExport()

    - #### isInitDatabase

          public boolean isInitDatabase()

    - #### isConnectionManaged

          public boolean isConnectionManaged()

    - #### doInitDatabase

          public org.flywaydb.core.api.MigrationInfo doInitDatabase(DatabaseService databaseService,
                                                                    Properties config)

      Initializes the appNG root connection
      Parameters:
        `databaseService` - a `DatabaseService`
        `config` - the properties read from "/conf/appNG.properties"
      Returns:
        the `MigrationInfo` for the current version of the database (see `MigrationInfoService.current()`)

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