Class 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 Detail

      • CommandMain

        public CommandMain()
    • Method Detail

      • getParameters

        public List<String> getParameters()
      • isUsage

        public boolean isUsage()
      • 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())