Search in sources :

Example 6 with DatabaseClientInterface

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();
}
Also used : DatabaseClientInterface(com.sldeditor.extension.filesystem.database.client.DatabaseClientInterface)

Aggregations

DatabaseClientInterface (com.sldeditor.extension.filesystem.database.client.DatabaseClientInterface)6 DataSourceConnectorInterface (com.sldeditor.common.DataSourceConnectorInterface)2 DataSourcePropertiesInterface (com.sldeditor.common.DataSourcePropertiesInterface)2 DatabaseConnection (com.sldeditor.common.data.DatabaseConnection)2 SLDDataInterface (com.sldeditor.common.SLDDataInterface)1 DataSourceInterface (com.sldeditor.datasource.DataSourceInterface)1 DatabaseInput (com.sldeditor.extension.filesystem.database.DatabaseInput)1 GeoServerConnectionTool (com.sldeditor.tool.geoserverconnection.GeoServerConnectionTool)1 ArrayList (java.util.ArrayList)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1