diff --git a/build.gradle b/build.gradle index b9595e53e8..ac1e875184 100644 --- a/build.gradle +++ b/build.gradle @@ -90,6 +90,7 @@ allprojects { implementation 'com.fr.license:fine-license-api:' + apiVersion implementation 'com.fr.workplace:workplace:' + apiVersion implementation 'com.fr.cluster:fine-cluster-api:' + apiVersion + implementation 'com.fr.messenger:fine-messenger:' + carinaVersion implementation 'com.install4j:install4j-runtime:8.0.4' implementation 'com.fr.third:jxbrowser:6.23' implementation 'com.fr.third:jxbrowser-v7:7.22' diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index f52315372d..8e446f5963 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -32,6 +32,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ToolBarDef; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -217,7 +218,11 @@ public class ProcedureDataPane extends AbstractTableDataPane imp @Override public void done() { - editorPane.populate(storeprocedure.getParameters()); + if (editorPane != null) { + editorPane.populate(storeprocedure.getParameters()); + } else { + FineLoggerFactory.getLogger().warn("editorPane is null!"); + } } }; 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 27d6258bd0..f45964508c 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 @@ -1,6 +1,7 @@ package com.fr.design.env; import com.fanruan.workplace.http.HttpConstants; +import com.fanruan.workplace.http.RepositoryManager; import com.fr.stable.StringUtils; import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; import com.fr.workspace.server.repository.compatible.register.CompatibleRegister; @@ -64,6 +65,7 @@ public class HttpWorkspaceConnector implements WorkspaceConnector { } client.startHeartBeat(); CompatibleRegister.registerCompatibleEnv(); + RepositoryManager.getInstance().clearLastPool(); return client; } diff --git a/designer-base/src/main/java/com/fr/env/handler/impl/CancelHandler.java b/designer-base/src/main/java/com/fr/env/handler/impl/CancelHandler.java index 140d0ec136..cd7f737eec 100644 --- a/designer-base/src/main/java/com/fr/env/handler/impl/CancelHandler.java +++ b/designer-base/src/main/java/com/fr/env/handler/impl/CancelHandler.java @@ -1,5 +1,6 @@ package com.fr.env.handler.impl; +import com.fanruan.workplace.http.RepositoryManager; import com.fr.env.handler.Handler; import com.fr.env.handler.RefWrapper; import com.fr.env.handler.ResultWrapper; @@ -17,6 +18,7 @@ public class CancelHandler implements Handler { @Override public ResultWrapper handle(RefWrapper wrapper) { Throwable e = wrapper.getThrowable(); + RepositoryManager.getInstance().rollBack(); return new ResultWrapper(!(e instanceof CancellationException), e); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/server/ChartMapEditorAction.java b/designer-chart/src/main/java/com/fr/van/chart/map/server/ChartMapEditorAction.java index e9b0373a83..bb854f8a81 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/server/ChartMapEditorAction.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/server/ChartMapEditorAction.java @@ -7,6 +7,7 @@ import com.fr.design.actions.UpdateAction; import com.fr.general.GeneralContext; import com.fr.start.ServerStarter; +import com.fr.start.server.DesignEmbedHelper; import com.fr.workspace.WorkContext; import java.awt.event.ActionEvent; @@ -23,7 +24,7 @@ public class ChartMapEditorAction extends UpdateAction { public void actionPerformed(ActionEvent evt) { int port = DesignerEnvManager.getEnvManager().getEmbedServerPort(); - String web = GeneralContext.getCurrentAppNameOfEnv(); + String web = DesignEmbedHelper.getAppFolderName(); String serverlet = ServerConfig.getInstance().getServletName(); ServerStarter.browserURLWithLocalEnv(WorkContext.getCurrent().isLocal() ? String.format("http://localhost:%d/%s/%s/map/edit", port, web, serverlet) : WorkContext.getCurrent().getPath() + "/map/edit"); } diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java index 43837f18e1..6c584ca3a3 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java @@ -3,6 +3,19 @@ package com.fanruan.boot.env; import com.fanruan.carina.annotions.ActivatorRefer; import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.FineComponent; +import com.fanruan.carina.annotions.Start; +import com.fanruan.messenger.ums.config.email.FineEmailSecurityProviderImpl; +import com.fr.base.email.EmailCenter; +import com.fr.base.email.impl.EmailAccountManagerImpl; +import com.fr.base.email.impl.FREmailDispatcherImpl; +import com.fr.base.email.impl.FineEmailExtensionProviderImpl; +import com.fr.base.email.impl.FineEmailResourceProviderImpl; +import com.fr.base.email.provider.FineEmailExtensionProvider; +import com.fr.base.email.provider.FineEmailResourceProvider; +import com.fr.base.email.provider.config.FineEmailServerConfigProvider; +import com.fr.base.email.task.EmailTaskManagement; +import com.fr.config.EmailServerConfig; +import com.fr.decision.webservice.v10.sms.SMSService; /** * 设计器基础功能组件,环境切换的上层模块 @@ -27,4 +40,51 @@ import com.fanruan.carina.annotions.FineComponent; @FineComponent(name = "design_function") @DependsOn(dependencies = {"design_function_analyzer"}) public class DesignFunctionComponent { + + /** + * start + */ + @Start + public void start() { + // 通知中心目前是不支持的,但是可以先开个邮件的接口出来 + initEmail(); + initSMS(); + } + + private void initEmail() { + FineEmailExtensionProvider fineEmailExtensionProvider = new FineEmailExtensionProviderImpl(); + FineEmailResourceProvider fineEmailResourceProvider = new FineEmailResourceProviderImpl(); + EmailCenter.init(new FineEmailServerConfigProvider() { + @Override + public int getSmtpConnectionTimeout() { + return EmailServerConfig.getInstance().getSmtpConnectionTimeout(); + } + + @Override + public int getSmtpTimeout() { + return EmailServerConfig.getInstance().getSmtpTimeout(); + } + + @Override + public int getSmtpWriteTimeout() { + return EmailServerConfig.getInstance().getSmtpWriteTimeout(); + } + + @Override + public boolean isDebugEnable() { + return true; + } + }, + fineEmailExtensionProvider, fineEmailResourceProvider, + new FineEmailSecurityProviderImpl()); + + EmailCenter.setDispatcher(new FREmailDispatcherImpl()); + EmailCenter.setAccountManager(new EmailAccountManagerImpl()); + EmailTaskManagement.getInstance().start(); + } + + private void initSMS() { + SMSService.getInstance().registerTemplateId(); + } + } diff --git a/designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java b/designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java index 8e2f939ffe..744ce4b65c 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java @@ -159,6 +159,14 @@ public class DesignPreLoadComponent { Carina.getApplicationContext().group(InterMutableKey.class).add(LocaleMarker.create("com/fr/decision/web/i18n/dec", LocaleScope.WEB)); Carina.getApplicationContext().group(InterMutableKey.class).add(LocaleMarker.create("com/fr/fineui/i18n/fineui", LocaleScope.WEB)); Carina.getApplicationContext().group(InterMutableKey.class).add(LocaleMarker.create("com/fr/fineui/i18n/fineui", LocaleScope.SERVER)); + Carina.getApplicationContext().group(InterMutableKey.class).addAll( + LocaleMarker.create("com/fr/server/i18n/report", LocaleScope.SERVER), + LocaleMarker.create("com/fr/server/i18n/chart", LocaleScope.SERVER) + ); + Carina.getApplicationContext().group(InterMutableKey.class).addAll( + LocaleMarker.create("com/fr/web/i18n/report", LocaleScope.WEB), + LocaleMarker.create("com/fr/web/i18n/chart", LocaleScope.WEB) + ); // WebLocaleProvider插件接口适配 LocaleUtils.registerLocaleParser(localeStr -> { diff --git a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java index 44de9859d1..e80a294a19 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java @@ -12,14 +12,24 @@ import com.fanruan.workplace.http.RepositoryManager; import com.fanruan.workplace.http.WorkspaceHeartBeatShell; import com.fanruan.workplace.standard.ServerInfo; import com.fanruan.workplace.standard.ServerInfoOperator; +import com.fr.base.io.FileAssistUtils; +import com.fr.base.io.FileAssistUtilsOperator; import com.fr.base.operator.common.CommonOperator; import com.fr.data.operator.DataOperator; import com.fr.data.operator.DataOperatorProvider; import com.fr.decision.service.context.ServiceContext; import com.fr.design.env.HttpWorkspaceConnector; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.esd.core.remote.ESDConfigEventOperator; +import com.fr.esd.core.remote.ESDConfigEventOperatorImpl; +import com.fr.file.ConnectionOperator; +import com.fr.file.ConnectionOperatorImpl; +import com.fr.file.TableDataOperator; +import com.fr.file.TableDataOperatorImpl; import com.fr.file.filetree.FileNodes; import com.fr.file.filetree.LocalFileNodes; +import com.fr.general.build.BuildInfoOperator; +import com.fr.general.build.impl.BuildInfoOperatorImpl; import com.fr.security.encryption.storage.StorageEncryptors; import com.fr.security.encryption.storage.StorageTransfer; import com.fr.stable.StringUtils; @@ -132,7 +142,14 @@ public class DesignWorkContextComponent { WorkRPCRegister.wrap(StorageTransfer.class, new StorageEncryptors()), WorkRPCRegister.wrap(WorkRPCType.Local, FileNodes.class, new LocalFileNodes()), WorkRPCRegister.wrap(CommonOperator.class, new CommonOperatorImpl()), - WorkRPCRegister.wrap(DataOperatorProvider.class, new DataOperator()) + WorkRPCRegister.wrap(DataOperatorProvider.class, new DataOperator()), + WorkRPCRegister.wrap(ESDConfigEventOperator.class, new ESDConfigEventOperatorImpl()), + WorkRPCRegister.wrap(WorkRPCType.Compatible, TableDataOperator.class, TableDataOperatorImpl.getInstance()), + WorkRPCRegister.wrap(WorkRPCType.Compatible, ConnectionOperator.class, ConnectionOperatorImpl.getInstance()), + WorkRPCRegister.wrap(FileAssistUtilsOperator.class, new FileAssistUtils()), + WorkRPCRegister.wrap(TableDataOperator.class, TableDataOperatorImpl.getInstance()), + WorkRPCRegister.wrap(ConnectionOperator.class, ConnectionOperatorImpl.getInstance()), + WorkRPCRegister.wrap(BuildInfoOperator.class, new BuildInfoOperatorImpl()) ); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index c8c1b7172e..a938761ec6 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -67,7 +67,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse private static final Icon WORK_SHEET_ICON = IconUtils.readIcon("/com/fr/design/standard/worksheet"); private static final Icon POLY_SHEET_ICON = IconUtils.readIcon("/com/fr/design/standard/polysheet"); private static final Icon LEFT_ICON = IconUtils.readIcon("/com/fr/design/standard/prepage/pre_page"); - private static final Icon RIGHT_ICON = IconUtils.readIcon("/com/fr/design/standard/nextpage"); + private static final Icon RIGHT_ICON = IconUtils.readIcon("/com/fr/design/standard/nextpage/next_page"); private static final Icon DISABLED_LEFT_ICON = IconUtils.readIcon("/com/fr/design/standard/prepage/pre_page_disabled.svg"); private static final Icon DISABLED_RIGHT_ICON = IconUtils.readIcon("/com/fr/design/standard/nextpage/next_page_disabled.svg"); private static final int NUM = 10;