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() {