class RepositoryConnectController implements IConnectedRepositoryInstance {

  public boolean isDatabaseWithNameExist( DatabaseMeta databaseMeta, boolean isNew ) {
    RepositoriesMeta repositoriesMeta = getRepositoriesMeta();
    for ( int i = 0; i < repositoriesMeta.nrDatabases(); i++ ) {
      final DatabaseMeta iterDatabase = repositoriesMeta.getDatabase( i );
      if ( iterDatabase.getName().trim().equalsIgnoreCase( databaseMeta.getName().trim() ) ) {
        if ( isNew || databaseMeta != iterDatabase ) { // do not check the same instance
          return true;
        }
      }
    }
    return false;
  }

  public  RepositoryConnectController( PluginRegistry pluginRegistry, Supplier<Spoon> spoonSupplier );
  public  RepositoryConnectController();

}