diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index ecf179e4c0..0fbea9b6f6 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/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; } diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 5a13ce2adc..9bde927d8f 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/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; + } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java index 09503086f8..8ab88bbf99 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java @@ -336,7 +336,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha private List getHasAuthConnections() { List authConnections = new ArrayList<>(); Set allConnections = ConnectionConfigProviderFactory.getConfigProvider().getConnections().keySet(); - // todo 待实现 + // 待实现 Collection noAuthConnections = new ArrayList<>(); if (noAuthConnections == null) { return authConnections; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java index f76ec5a4a2..72ed0808b9 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java +++ b/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 specialCharParam = new HashSet<>(); // 将参数转义等 diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java index ab652177e4..d9b03ba7f1 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java +++ b/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); } diff --git a/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java b/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java index 4326ea366d..d2a708e390 100644 --- a/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java +++ b/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java @@ -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; diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 77c5cc6229..07bd8dd0cc 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/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() { // @Override // public String callHandler(RPCInvokerExceptionInfo exceptionInfo) { diff --git a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java index b7a0ba795b..564039a254 100644 --- a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java +++ b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java @@ -173,7 +173,7 @@ public enum TestConnectionResult { @Override public String errorCode() { - // todo result具体逻辑需要同产品确认 + // result具体逻辑需要同产品确认 return "UserPasswordNeedUpdateException.ERROR_CODE"; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java index 66b906ee52..aa5ce8ed50 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java +++ b/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 wmsNames = new ArrayList<>(); list.clear(); for (String layer : wmsNames) { diff --git a/designer-realize/src/main/java/com/fanruan/boot/mem/MemConfigRepository.java b/designer-realize/src/main/java/com/fanruan/boot/mem/MemConfigRepository.java index 23059ea214..c88241794d 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/mem/MemConfigRepository.java +++ b/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 { diff --git a/designer-realize/src/main/java/com/fanruan/boot/pre/DesignConfigComponent.java b/designer-realize/src/main/java/com/fanruan/boot/pre/DesignConfigComponent.java index 8b58aa2549..6282d0c85b 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/pre/DesignConfigComponent.java +++ b/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()); diff --git a/designer-realize/src/main/java/com/fanruan/boot/show/DesignFsComponent.java b/designer-realize/src/main/java/com/fanruan/boot/show/DesignFsComponent.java new file mode 100644 index 0000000000..43555a7fbb --- /dev/null +++ b/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); + } +} diff --git a/designer-realize/src/main/java/com/fanruan/boot/show/DesignerComponent.java b/designer-realize/src/main/java/com/fanruan/boot/show/DesignerComponent.java index 72dfb30253..db3659e5b4 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/show/DesignerComponent.java +++ b/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 { } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java index e1a6914b04..faf01f9f30 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java +++ b/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(); } diff --git a/designer-realize/src/main/java/com/fr/start/SplashContext.java b/designer-realize/src/main/java/com/fr/start/SplashContext.java index e89d3eb51a..bda4f4f783 100644 --- a/designer-realize/src/main/java/com/fr/start/SplashContext.java +++ b/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);