|
|
|
@ -8,6 +8,8 @@ import com.fr.data.impl.JDBCDatabaseConnection;
|
|
|
|
|
import com.fr.data.impl.JNDIDatabaseConnection; |
|
|
|
|
import com.fr.data.metric.utils.DatabaseConnectionMetricHandler; |
|
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
|
import com.fr.decision.record.OperateConstants; |
|
|
|
|
import com.fr.decision.record.OperateMessage; |
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
import com.fr.design.data.MapCompareUtils; |
|
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
@ -21,9 +23,11 @@ import com.fr.event.EventDispatcher;
|
|
|
|
|
import com.fr.file.ConnectionConfig; |
|
|
|
|
import com.fr.file.ConnectionOperator; |
|
|
|
|
import com.fr.general.NameObject; |
|
|
|
|
import com.fr.intelli.record.MetricRegistry; |
|
|
|
|
import com.fr.license.database.DBTypes; |
|
|
|
|
import com.fr.license.database.DataBaseTypePointManager; |
|
|
|
|
import com.fr.license.exception.DataBaseNotSupportedException; |
|
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.Nameable; |
|
|
|
@ -350,10 +354,16 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
|
|
|
|
|
return Configurations.modify(new WorkerFacade(ConnectionConfig.class) { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
removedConnNames.forEach(n -> ConnectionConfig.getInstance().removeConnection(n)); |
|
|
|
|
removedConnNames.forEach(n -> { |
|
|
|
|
MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Data_Connection", "Dec-Data_Connection_Design", |
|
|
|
|
n, OperateConstants.DELETE, InterProviderFactory.getProvider().getLocText("Dec-Designer_User"), null, null)); |
|
|
|
|
ConnectionConfig.getInstance().removeConnection(n); |
|
|
|
|
}); |
|
|
|
|
int innerRemaining = remaining; |
|
|
|
|
for (ConnectionBean cb : addedOrUpdatedConnections) { |
|
|
|
|
if (innerRemaining > 0) { |
|
|
|
|
MetricRegistry.getMetric().submit(OperateMessage.build("Dec-Data_Connection", "Dec-Data_Connection_Design", |
|
|
|
|
cb.getName(), OperateConstants.ADD, InterProviderFactory.getProvider().getLocText("Dec-Designer_User"), null, null)); |
|
|
|
|
ConnectionConfig.getInstance().addConnectionWithoutCheck(cb.getName(), cb.getConnection()); |
|
|
|
|
innerRemaining--; |
|
|
|
|
} else { |
|
|
|
|