Browse Source

Pull request #14735: REPORT-132662 适配通知中心

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit 'f8d345af49dd90841c3b985d43cf616fbf08fcc8':
  REPORT-132662 适配通知中心 代码规范
  REPORT-132662 适配通知中心
fbp/release
Destiny.Lin-林锦龙 3 months ago
parent
commit
72cfc0c893
  1. 5
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  2. 1
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  3. 7
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java
  4. 19
      designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java

5
designer-base/src/main/java/com/fr/design/javascript/EmailPane.java

@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.js.EmailJavaScript; import com.fr.js.EmailJavaScript;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.config.ConfigRepository;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -64,7 +65,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
initCenterPane(mainTextLabel, scrollPane, fill, preferred); initCenterPane(mainTextLabel, scrollPane, fill, preferred);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
mainTextEditor.setAutoscrolls(true); mainTextEditor.setAutoscrolls(true);
checkEmailConfig(EmailCenter.isEmailConfigValid()); checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid());
} }
/** /**
@ -128,7 +129,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
if (showTplContent != null) { if (showTplContent != null) {
showTplContent.setSelected(ob ==null ? false: ob.isShowTplContent()); showTplContent.setSelected(ob ==null ? false: ob.isShowTplContent());
} }
checkEmailConfig(EmailCenter.isEmailConfigValid()); checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid());
} }
@Override @Override

1
designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java

@ -48,6 +48,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
contentDBManiPane = new ArrayList(); contentDBManiPane = new ArrayList();
contentDBManiPane.add(createDBManipulationPane()); contentDBManiPane.add(createDBManipulationPane());
paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane));
paneList.add(initEmaiPane());
if (isWorkBookValid()) { if (isWorkBookValid()) {
paneList.add(new ExportJavaScriptPane()); paneList.add(new ExportJavaScriptPane());
} }

7
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java vendored

@ -100,6 +100,8 @@ import com.fr.transaction.HibernateTransactor;
import com.fr.transaction.RemoteTransactor; import com.fr.transaction.RemoteTransactor;
import com.fr.transaction.TransactorFactory; import com.fr.transaction.TransactorFactory;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fanruan.config.LocalConfigSource;
import com.fr.workspace.server.repository.config.LocalConfigSourceShell;
import java.net.URI; import java.net.URI;
import java.sql.Connection; import java.sql.Connection;
@ -121,7 +123,9 @@ import java.util.Properties;
"com.fr.decision.workflow.bean", "com.fr.decision.workflow.bean",
"com.fr.report.entity", "com.fr.report.entity",
"com.fr.cons.entity", "com.fr.cons.entity",
"com.fr.report.write.entity" "com.fr.report.write.entity",
"com.fanruan.messenger.ums.entity",
"com.fanruan.messenger.oa.basic.db.entity"
}) })
public class DesignEnvComponent { public class DesignEnvComponent {
@ -146,6 +150,7 @@ public class DesignEnvComponent {
.method(ElementMatchers.isAnnotatedWith(FaultTolerance.class)) .method(ElementMatchers.isAnnotatedWith(FaultTolerance.class))
.intercept(MethodDelegation.to(FaultToleranceInterceptor.class)))); .intercept(MethodDelegation.to(FaultToleranceInterceptor.class))));
Carina.getApplicationContext().group(CurrentTenantKey.class).add(ScheduleThreadCurrentTenantProvider.INSTANCE); Carina.getApplicationContext().group(CurrentTenantKey.class).add(ScheduleThreadCurrentTenantProvider.INSTANCE);
Carina.getApplicationContext().singleton(LocalConfigSourceShell.class).set(new LocalConfigSource());
} }
@Start @Start

19
designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java

@ -0,0 +1,19 @@
package com.fanruan.config;
import com.fr.base.email.EmailCenter;
import com.fr.workspace.server.repository.config.BaseConfigSource;
/**
* 本地配置资源
*
* @author Destiny.Lin
* @since 11.0
* Created on 2024/8/29
*/
public class LocalConfigSource extends BaseConfigSource {
@Override
public boolean isEmailConfigValid() {
return EmailCenter.isEmailConfigValid();
}
}
Loading…
Cancel
Save