|
|
@ -22,6 +22,7 @@ import com.fr.file.ConnectionConfig; |
|
|
|
import com.fr.file.ConnectionOperator; |
|
|
|
import com.fr.file.ConnectionOperator; |
|
|
|
import com.fr.general.NameObject; |
|
|
|
import com.fr.general.NameObject; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
import com.fr.regist.FRCoreContext; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
@ -118,17 +119,25 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh |
|
|
|
* @return 菜单项 |
|
|
|
* @return 菜单项 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public NameableCreator[] createNameableCreators() { |
|
|
|
public NameableCreator[] createNameableCreators() { |
|
|
|
NameableCreator[] creators = new NameableCreator[]{new NameObjectCreator( |
|
|
|
NameObjectCreator jdbc = new NameObjectCreator( |
|
|
|
"JDBC", |
|
|
|
"JDBC", |
|
|
|
"/com/fr/design/images/data/source/jdbcTableData.png", |
|
|
|
"/com/fr/design/images/data/source/jdbcTableData.png", |
|
|
|
JDBCDatabaseConnection.class, |
|
|
|
JDBCDatabaseConnection.class, |
|
|
|
DatabaseConnectionPane.JDBC.class |
|
|
|
DatabaseConnectionPane.JDBC.class |
|
|
|
), new NameObjectCreator( |
|
|
|
); |
|
|
|
|
|
|
|
NameObjectCreator jndi = new NameObjectCreator( |
|
|
|
"JNDI", |
|
|
|
"JNDI", |
|
|
|
"/com/fr/design/images/data/source/jdbcTableData.png", |
|
|
|
"/com/fr/design/images/data/source/jdbcTableData.png", |
|
|
|
JNDIDatabaseConnection.class, |
|
|
|
JNDIDatabaseConnection.class, |
|
|
|
DatabaseConnectionPane.JNDI.class |
|
|
|
DatabaseConnectionPane.JNDI.class |
|
|
|
)}; |
|
|
|
); |
|
|
|
|
|
|
|
NameableCreator[] creators; |
|
|
|
|
|
|
|
if (FRCoreContext.getLicense().limitDatabaseType()) { |
|
|
|
|
|
|
|
// 不支持JDNI,屏蔽接口
|
|
|
|
|
|
|
|
creators = new NameableCreator[]{jdbc}; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
creators = new NameableCreator[]{jdbc, jndi}; |
|
|
|
|
|
|
|
} |
|
|
|
Set<ConnectionProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ConnectionProvider.XML_TAG); |
|
|
|
Set<ConnectionProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ConnectionProvider.XML_TAG); |
|
|
|
for (ConnectionProvider provider : pluginCreators) { |
|
|
|
for (ConnectionProvider provider : pluginCreators) { |
|
|
|
NameObjectCreator creator = new NameObjectCreator( |
|
|
|
NameObjectCreator creator = new NameObjectCreator( |
|
|
|