use of com.sldeditor.extension.filesystem.database.client.DatabaseClientInterface in project sldeditor by robward-scisys.
the class DatabaseInput method updateConnectionDetails.
/*
* (non-Javadoc)
*
* @see com.sldeditor.datasource.extension.filesystem.DatabaseConnectUpdateInterface#updateConnectionDetails(com.sldeditor.common.data.
* DatabaseConnection, com.sldeditor.common.data.DatabaseConnection)
*/
@Override
public void updateConnectionDetails(DatabaseConnection originalConnectionDetails, DatabaseConnection newConnectionDetails) {
if ((originalConnectionDetails == null) || (newConnectionDetails == null)) {
return;
}
logger.debug("Updating connection : " + newConnectionDetails.getConnectionName());
DatabaseClientInterface client = DatabaseConnectionManager.getInstance().getConnectionMap().remove(originalConnectionDetails);
if (client != null) {
disconnectFromDatabase(client);
}
progress.updateConnection(originalConnectionDetails, newConnectionDetails);
DatabaseConnectionManager.getInstance().addNewConnection(progress, newConnectionDetails);
if (toolMgr != null) {
toolMgr.refreshSelection();
}
updatePropertyFile();
}
Aggregations