Search in sources :

Example 1 with DatabaseConfigItem

use of com.google.security.zynamics.binnavi.config.DatabaseConfigItem in project binnavi by google.

the class CMain method prepareDatabaseConnections.

/**
   * Loads all database connections that are loaded automatically on startup.
   */
private static void prepareDatabaseConnections() {
    NaviLogger.info("Initializing database connections");
    // Read database information from the configuration file.
    final CDatabaseManager manager = CDatabaseManager.instance();
    for (final DatabaseConfigItem database : ConfigManager.instance().getDatabases()) {
        manager.addDatabase(new CDatabase(database.getDescription(), database.getDriver(), database.getHost(), database.getName(), database.getUser(), database.getPassword(), database.getIdentity(), database.isSavePassword(), database.isAutoConnect()));
    }
}
Also used : CDatabase(com.google.security.zynamics.binnavi.Database.CDatabase) DatabaseConfigItem(com.google.security.zynamics.binnavi.config.DatabaseConfigItem) CDatabaseManager(com.google.security.zynamics.binnavi.Database.CDatabaseManager)

Aggregations

CDatabase (com.google.security.zynamics.binnavi.Database.CDatabase)1 CDatabaseManager (com.google.security.zynamics.binnavi.Database.CDatabaseManager)1 DatabaseConfigItem (com.google.security.zynamics.binnavi.config.DatabaseConfigItem)1