From 25293200a50269c0cad89b3adedd5af0a9a12aaa Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Thu, 27 May 2021 16:04:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-52819=20=E5=8A=A0=E5=AF=86=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8A=A0=E8=BD=BD=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orManager.java => SharableCollectorManager.java} | 6 +++--- .../mainframe/share/util/SharableXMLUtils.java | 13 +++++++++++++ .../com/fr/design/share/SharableInitManager.java | 11 +++++++++++ .../java/com/fr/start/module/DesignerActivator.java | 3 ++- 4 files changed, 29 insertions(+), 4 deletions(-) rename designer-base/src/main/java/com/fr/design/mainframe/share/collect/{CollectorManager.java => SharableCollectorManager.java} (92%) create mode 100644 designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java create mode 100644 designer-realize/src/main/java/com/fr/design/share/SharableInitManager.java diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java similarity index 92% rename from designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java rename to designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java index 3ccb624297..1248a74c75 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java @@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit; /** * created by Harrison on 2020/03/25 **/ -public class CollectorManager { +public class SharableCollectorManager { /** * 1 天 @@ -32,10 +32,10 @@ public class CollectorManager { private ScheduledExecutorService service; private static class ConfigManagerHolder { - private static CollectorManager instance = new CollectorManager(); + private static SharableCollectorManager instance = new SharableCollectorManager(); } - public static CollectorManager getInstance() { + public static SharableCollectorManager getInstance() { return ConfigManagerHolder.instance; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java new file mode 100644 index 0000000000..baacf42722 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java @@ -0,0 +1,13 @@ +package com.fr.design.mainframe.share.util; + +import com.fr.form.share.encrypt.engine.SharableReadHelper; +import com.fr.stable.xml.XMLConf; +import com.fr.stable.xml.helper.XMLReadHelper; + +public class SharableXMLUtils { + public static synchronized void registerSharableReadHelper() { + XMLReadHelper readHelper = XMLConf.getReadHelper(); + XMLReadHelper helper = new SharableReadHelper(readHelper); + XMLConf.registerXMLHelper(helper); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/share/SharableInitManager.java b/designer-realize/src/main/java/com/fr/design/share/SharableInitManager.java new file mode 100644 index 0000000000..42870535b3 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/share/SharableInitManager.java @@ -0,0 +1,11 @@ +package com.fr.design.share; + +import com.fr.design.mainframe.share.collect.SharableCollectorManager; +import com.fr.design.mainframe.share.util.SharableXMLUtils; + +public class SharableInitManager { + public static void start() { + SharableXMLUtils.registerSharableReadHelper(); + SharableCollectorManager.getInstance().execute(); + } +} diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 5c7a20efca..43c0e720fe 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -60,12 +60,12 @@ import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.WorkBookParameterReader; +import com.fr.design.share.SharableInitManager; import com.fr.design.share.ui.config.ShareConfigPane; import com.fr.design.share.ui.generate.ShareGeneratePane; import com.fr.design.update.actions.RecoverForDesigner; import com.fr.design.update.push.DesignerPushUpdateManager; import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane; -import com.fr.form.stable.ElementCaseThumbnailProcessor; import com.fr.general.GeneralContext; import com.fr.general.xml.GeneralXMLTools; import com.fr.js.EmailJavaScript; @@ -205,6 +205,7 @@ public class DesignerActivator extends Activator { designerRegister(); InformationCollector.getInstance().collectStartTime(); + SharableInitManager.start(); } private void createPluginListener() {