Browse Source

REPORT-114391 【微服务适配】远程&本地设计器能够正常启动 代码规范+设计器文件系统+数据集自测

mss/2.0
Destiny.Lin 8 months ago
parent
commit
92dc5f350d
  1. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
  2. 22
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  4. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  5. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
  6. 3
      designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java
  7. 2
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  8. 2
      designer-base/src/main/java/com/fr/env/TestConnectionResult.java
  9. 3
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java
  10. 1
      designer-realize/src/main/java/com/fanruan/boot/mem/MemConfigRepository.java
  11. 3
      designer-realize/src/main/java/com/fanruan/boot/pre/DesignConfigComponent.java
  12. 39
      designer-realize/src/main/java/com/fanruan/boot/show/DesignFsComponent.java
  13. 2
      designer-realize/src/main/java/com/fanruan/boot/show/DesignerComponent.java
  14. 2
      designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java
  15. 2
      designer-realize/src/main/java/com/fr/start/SplashContext.java

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java

@ -136,7 +136,7 @@ public class AlphaFineConfigManager implements XMLable {
public static boolean isALPHALicAvailable() {
// todo lic相关的被拆分了,需要再适配一下lic的api
// lic相关的被拆分了,需要再适配一下lic的api
return true;
}

22
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -39,6 +39,8 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.workspace.server.entity.tabledata.PreviewDataBean;
import com.fr.workspace.server.repository.tabledata.TableDataRepository;
import javax.swing.JFrame;
import javax.swing.event.ChangeEvent;
@ -570,7 +572,12 @@ public abstract class DesignTableDataManager {
parameter.setValue(parameterMap.get(parameter.getName()));
}
}
return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount);
PreviewDataBean bean = new PreviewDataBean();
TableDataSource source = TableDataSourceTailor.extractTableData(tableDataSource);
bean.setDataSource(source);
bean.setDataName(getTableDataName(source, tabledata));
bean.setParameterMap(parameterMap);
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(bean).getTableData();
} catch (Exception e) {
throw new TableDataException(e.getMessage(), e);
} finally {
@ -692,4 +699,17 @@ public abstract class DesignTableDataManager {
public static boolean isGlobalTableData(String tableDataName) {
return globalDsCache.containsKey(tableDataName);
}
private static String getTableDataName(TableDataSource source, TableData data) {
Iterator tableDataNameIterator = source.getTableDataNameIterator();
while (tableDataNameIterator.hasNext()) {
String tableDataName = (String) tableDataNameIterator.next();
TableData tableData = source.getTableData(tableDataName);
if (tableData.equals(data)) {
return tableDataName;
}
}
return StringUtils.EMPTY;
}
}

2
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -336,7 +336,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
private List<String> getHasAuthConnections() {
List<String> authConnections = new ArrayList<>();
Set<String> allConnections = ConnectionConfigProviderFactory.getConfigProvider().getConnections().keySet();
// todo 待实现
// 待实现
Collection<String> noAuthConnections = new ArrayList<>();
if (noAuthConnections == null) {
return authConnections;

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -191,7 +191,8 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
Parameter[] paras = processParameters(tableData, calculator);
// 所有被转义参数的集合
refreshEscapeSqlHelper();
// todo 待实现[check]EscapeSqlHelper.getInstance().getSpecialCharParam(paras);
// 待实现
// [check]EscapeSqlHelper.getInstance().getSpecialCharParam(paras);
Set<String> specialCharParam = new HashSet<>();
// 将参数转义等

3
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java

@ -8,7 +8,6 @@ import com.fr.data.impl.DBTableData;
import com.fr.data.impl.DecoratedTableData;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.FileTableData;
//import com.fr.data.impl.MultiFieldTableData;
import com.fr.data.impl.MultiTDTableData;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.storeproc.StoreProcedure;
@ -64,7 +63,7 @@ public abstract class TableDataFactory {
defaultMap.put(MultiTDTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", MultiTDTableData.class, MultiTDTableDataPane.class));
defaultMap.put(FileTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/file_normal.svg", FileTableData.class, FileTableDataPane.class));
defaultMap.put(RecursionTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/tree_normal.svg", RecursionTableData.class, TreeTableDataPane.class));
// todo 待实现
// 待实现
//defaultMap.put(MultiFieldTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/database_normal.svg", MultiFieldTableData.class, null));
map.putAll(defaultMap);
}

3
designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java vendored

@ -24,6 +24,9 @@ import java.util.UUID;
public class HttpWorkspaceConnector implements WorkspaceConnector {
private static final HttpWorkspaceConnector INSTANCE = new HttpWorkspaceConnector();
/**
* 获取单例
*/
public static HttpWorkspaceConnector getInstance() {
return INSTANCE;

2
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -198,7 +198,7 @@ public class VersionCheckUtils {
public static String getRemoteBranch(DesignerWorkspaceInfo selectedEnv) {
String remoteBranch;
// todo 微服务的branch还不确定,后面适配
// 微服务的branch还不确定,后面适配
//remoteBranch = WorkContext.getCurrent().get(VersionInfoOperator.class, new ExceptionHandler<String>() {
// @Override
// public String callHandler(RPCInvokerExceptionInfo exceptionInfo) {

2
designer-base/src/main/java/com/fr/env/TestConnectionResult.java vendored

@ -173,7 +173,7 @@ public enum TestConnectionResult {
@Override
public String errorCode() {
// todo result具体逻辑需要同产品确认
// result具体逻辑需要同产品确认
return "UserPasswordNeedUpdateException.ERROR_CODE";
}

3
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

@ -88,7 +88,8 @@ public class WMSLayerPane extends JPanel implements UIObserver {
@Override
protected Void doInBackground() {
// todo 待实现[check]MapEditService.getInstance().getWMSNames(wmsUrl.getText());
// 待实现
// MapEditService.getInstance().getWMSNames(wmsUrl.getText());
List<String> wmsNames = new ArrayList<>();
list.clear();
for (String layer : wmsNames) {

1
designer-realize/src/main/java/com/fanruan/boot/mem/MemConfigRepository.java

@ -16,6 +16,7 @@ import java.util.concurrent.ConcurrentHashMap;
* MemConfigRealm
*
* @author rinoux
* @since 11.0
* created on 2023-06-08
*/
public class MemConfigRepository implements ConfigRepositoryProvider {

3
designer-realize/src/main/java/com/fanruan/boot/pre/DesignConfigComponent.java

@ -19,6 +19,9 @@ import com.fanruan.boot.mem.MemConfigRepositoryBuilder;
@FineComponent(name = "design_universal_config")
public class DesignConfigComponent {
/**
* start注册config并设置基础的memConfigBuilder
*/
@Start
public void start() {
ConfigProviderFactory.getInstance().registerProvider(ConfigRealm.SHARE, new ShareConfigProviderImpl());

39
designer-realize/src/main/java/com/fanruan/boot/show/DesignFsComponent.java

@ -0,0 +1,39 @@
package com.fanruan.boot.show;
import com.fanruan.boot.FileServerComponent;
import com.fanruan.carina.annotions.DependsOn;
import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start;
import com.fanruan.carina.annotions.Stop;
import com.fanruan.fs.FileServer;
import com.fr.io.utils.ResourceIOUtils;
/**
* 设计器文件系统初始化
*
* @author Destiny.Lin
* @since 11.0
* Created on 2024/6/4
*/
@FineComponent(name = "design_fs")
@DependsOn(dependencies = {"design_conf_config"})
public class DesignFsComponent extends FileServerComponent {
/**
* start
*/
@Start
public void start() throws Exception {
super.start();
}
/**
* start
*/
@Stop
private void stop() {
ResourceIOUtils.setUnderlying(FileServer.local());
ResourceIOUtils.setIsolationMode(true);
}
}

2
designer-realize/src/main/java/com/fanruan/boot/show/DesignerComponent.java

@ -18,7 +18,7 @@ import com.fr.start.module.DesignerESDActivator;
* Created on 2024/5/28
*/
@FineComponent(name = "design")
@DependsOn(dependencies = {"design_core_supplemental", "design_dao", "design_conf_config", "design_function"})
@DependsOn(dependencies = {"design_core_supplemental", "design_dao", "design_conf_config","design_fs", "design_function"})
@ActivatorRefer(refer = {DesignerActivator.class, DesignerAppActivator.class, ChartDesignerActivator.class, DesignerESDActivator.class, DesignerAnalyzerActivator.class})
public class DesignerComponent {
}

2
designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java

@ -143,7 +143,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
*/
public void collectStartTime() {
this.current.setStartDate(dateToString());
// todo 收集信息先关掉,后面再适配
// 收集信息先关掉,后面再适配
//sendInfo();
}

2
designer-realize/src/main/java/com/fr/start/SplashContext.java

@ -152,7 +152,7 @@ public class SplashContext {
*/
private void showThanks() {
if (shouldShowThanks() && !hasShowThanks) {
// todo 涉及到云中心的都先放着
// 涉及到云中心的都先放着
//tryFetchOnline();
if (StringUtils.isNotEmpty(guest)) {
updateThanksLog(THANKS + guest);

Loading…
Cancel
Save