|
|
|
@ -1,9 +1,7 @@
|
|
|
|
|
package com.fr.design.data.datapane; |
|
|
|
|
|
|
|
|
|
import com.fanruan.config.impl.data.ConnectionConfigProviderFactory; |
|
|
|
|
import com.fr.base.TableData; |
|
|
|
|
import com.fr.data.core.DataCoreUtils; |
|
|
|
|
import com.fr.data.core.db.DBUtils; |
|
|
|
|
import com.fr.data.core.db.TableProcedure; |
|
|
|
|
import com.fr.data.core.db.dialect.Dialect; |
|
|
|
|
import com.fr.data.core.db.dialect.DialectFactory; |
|
|
|
@ -39,14 +37,9 @@ import com.fr.general.IOUtils;
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; |
|
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionRepository; |
|
|
|
|
|
|
|
|
|
import javax.swing.JList; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JTree; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import javax.swing.event.PopupMenuEvent; |
|
|
|
@ -56,21 +49,14 @@ import javax.swing.tree.DefaultTreeCellRenderer;
|
|
|
|
|
import javax.swing.tree.DefaultTreeModel; |
|
|
|
|
import javax.swing.tree.TreeCellRenderer; |
|
|
|
|
import javax.swing.tree.TreePath; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.FocusAdapter; |
|
|
|
|
import java.awt.event.FocusEvent; |
|
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
|
import java.awt.event.ItemListener; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Collection; |
|
|
|
|
import java.util.Collections; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.concurrent.CancellationException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -339,20 +325,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<String> getHasAuthConnections() { |
|
|
|
|
List<String> authConnections = new ArrayList<>(); |
|
|
|
|
Set<String> allConnections = new HashSet<>(ConnectionRepository.getInstance().getConnNames()); |
|
|
|
|
// 待实现
|
|
|
|
|
Collection<String> noAuthConnections = RemoteAuthorityRepository.getInstance().getNoAuthConnections(); |
|
|
|
|
if (noAuthConnections == null) { |
|
|
|
|
return authConnections; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (String name : allConnections) { |
|
|
|
|
if (!noAuthConnections.contains(name)) { |
|
|
|
|
authConnections.add(name); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return authConnections; |
|
|
|
|
return ConnectionRepository.getInstance().getConnNames(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|