Browse Source

REPORT-84645 lic限制数据库类型-报表配合

【问题原因】rt
【改动思路】设计器中测试数据库连接时,根据lic中数据库类型限制,给出相应的错误提示
feature/x
Leo.Qin 2 years ago
parent
commit
dc7f9fee24
  1. 15
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

15
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -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(

Loading…
Cancel
Save