docs: public void setupDb(boolean createDb, boolean createTables, boolean dropDb) throws Exception {
  
          if (m_setupBean.isInitialized()) {
              System.out.println("Setup-Bean initialized successfully.");
              CmsSetupDb db = new CmsSetupDb(m_setupBean.getWebAppRfsPath());
              try {
                  // try to connect as the runtime user
                  db.setConnection(
                      m_setupBean.getDbDriver(),
                      m_setupBean.getDbWorkConStr(),
                      m_setupBean.getDbConStrParams(),
                      m_setupBean.getDbWorkUser(),
                      m_setupBean.getDbWorkPwd(),
                      false);
                  if (!db.noErrors()) {
  
                      // try to connect as the setup user
                      db.closeConnection();
                      db.clearErrors();
                      db.setConnection(
                          m_setupBean.getDbDriver(),
                          m_setupBean.getDbCreateConStr(),
                          m_setupBean.getDbConStrParams(),
                          m_setupBean.getDbCreateUser(),
                          m_setupBean.getDbCreatePwd());
                  }
                  if (!db.noErrors() || !m_setupBean.validateJdbc()) {
                      throw new DBException("DB connection test failed.", db.getErrors());
                  }
              } finally {
                  db.clearErrors();
                  db.closeConnection();
              }
          }
  
          System.out.println("DB connection tested successfully.");
  
          CmsSetupDb db = null;
          boolean dbExists = false;
          if (m_setupBean.isInitialized()) {
              if (createDb || createTables) {
                  db = new CmsSetupDb(m_setupBean.getWebAppRfsPath());
                  // check if database exists
                  if (m_setupBean.getDatabase().startsWith("oracle")
                      || m_setupBean.getDatabase().startsWith("db2")
                      || m_setupBean.getDatabase().startsWith("as400")) {
                      setWorkConnection(db);
                  } else {
                      db.setConnection(
                          m_setupBean.getDbDriver(),
                          m_setupBean.getDbWorkConStr(),
                          m_setupBean.getDbConStrParams(),
                          m_setupBean.getDbCreateUser(),
                          m_setupBean.getDbCreatePwd(),
                          false);
                      dbExists = db.noErrors();
                      if (dbExists) {
                          db.closeConnection();
                      } else {
                          db.clearErrors();
                      }
                  }
                  if (!dbExists || dropDb) {
                      db.closeConnection();
                      if (!m_setupBean.getDatabase().startsWith("db2")
                          && !m_setupBean.getDatabase().startsWith("as400")) {
                          db.setConnection(
                              m_setupBean.getDbDriver(),
                              m_setupBean.getDbCreateConStr(),
                              m_setupBean.getDbConStrParams(),
                              m_setupBean.getDbCreateUser(),
                              m_setupBean.getDbCreatePwd());
                      }
                  }
              }
          }
          if (!createDb && !createTables && !dbExists) {
              throw new Exception("You have not created the Alkacon OpenCms database.");
          }
          if (dbExists && createTables && !dropDb && (db != null)) {
              throw new Exception("You have selected to not drop existing DBs, but a DB with the given name exists.");
          }
          if (dbExists && createDb && dropDb && (db != null)) {
              // drop the DB
              db.closeConnection();
              db.setConnection(
                  m_setupBean.getDbDriver(),
                  m_setupBean.getDbCreateConStr(),
                  m_setupBean.getDbConStrParams(),
                  m_setupBean.getDbCreateUser(),
                  m_setupBean.getDbCreatePwd());
              db.dropDatabase(m_setupBean.getDatabase(), m_setupBean.getReplacer());
              if (!db.noErrors()) {
                  List<String> errors = new ArrayList<>(db.getErrors());
                  db.clearErrors();
                  throw new DBException("Error occurred while dropping the DB!", errors);
              }
              System.out.println("Database dropped successfully.");
          }
  
          if (createDb && (db != null)) {
              // Create Database
              db.createDatabase(m_setupBean.getDatabase(), m_setupBean.getReplacer());
              if (!db.noErrors()) {
                  DBException ex = new DBException("Error occurred while creating the DB!", db.getErrors());
                  db.clearErrors();
                  throw ex;
              }
              db.closeConnection();
              System.out.println("Database created successfully.");
          }
  
          if (createTables && (db != null)) {
              setWorkConnection(db);
              //Drop Tables (intentionally quiet)
              db.dropTables(m_setupBean.getDatabase());
              db.clearErrors();
              db.closeConnection();
              // reopen the connection in order to display errors
              setWorkConnection(db);
              //Create Tables
              db.createTables(m_setupBean.getDatabase(), m_setupBean.getReplacer());
              if (!db.noErrors()) {
                  DBException ex = new DBException("Error occurred while creating the DB!", db.getErrors());
                  db.clearErrors();
                  throw ex;
              }
              db.closeConnection();
              System.out.println("Tables created successfully.");
          }
          if (db != null) {
              db.closeConnection();
          }
          System.out.println("Database setup was successful.");
          m_context.stepForward();
      }