Browse Source

REPORT-62439 国际化-屏蔽海外设计器内登录入口

feature/x
方磊 3 years ago
parent
commit
8bfc7697e9
  1. 52
      designer-base/src/main/java/com/fr/design/config/DesignerProperties.java
  2. 16
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  3. 7
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  4. 13
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

52
designer-base/src/main/java/com/fr/design/config/DesignerProperties.java

@ -0,0 +1,52 @@
package com.fr.design.config;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Properties;
public class DesignerProperties {
private static DesignerProperties holder = null;
private boolean supportLoginEntry = true;
public DesignerProperties() {
String filePath = StableUtils.pathJoin(StableUtils.getInstallHome(), "/config/config.properties");
InputStream is = null;
try {
is = new BufferedInputStream(new FileInputStream(filePath));
Properties ps = new Properties();
ps.load(is);
this.initProperties(ps);
} catch (FileNotFoundException e) {
// ignore
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage());
} finally {
IOUtils.close(is);
}
}
public static DesignerProperties getInstance() {
if (holder == null) {
holder = new DesignerProperties();
}
return holder;
}
private void initProperties(Properties ps) {
String supportLoginEntry = ps.getProperty("supportLoginEntry");
if (StringUtils.isNotEmpty(supportLoginEntry)) {
this.supportLoginEntry = Boolean.valueOf(supportLoginEntry);
}
}
public boolean isSupportLoginEntry() {
return supportLoginEntry;
}
}

16
designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java

@ -2,8 +2,6 @@ package com.fr.design.mainframe;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.TitlePlaceProcessor;
import com.fr.design.gui.imenu.UIMenuHighLight; import com.fr.design.gui.imenu.UIMenuHighLight;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.loghandler.LogMessageBar;
@ -25,7 +23,6 @@ import javax.swing.JMenuBar;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout; import java.awt.FlowLayout;
/** /**
@ -143,17 +140,6 @@ public class NorthRegionContainerPane extends JPanel {
northEastPane.removeAll(); northEastPane.removeAll();
northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
northEastPane.add(LogMessageBar.getInstance()); northEastPane.add(LogMessageBar.getInstance());
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING);
if (processor != null) {
final Component[] bbsLoginPane = {null};
OSSupportCenter.buildAction(new OSBasedAction() {
@Override
public void execute(Object... objects) {
bbsLoginPane[0] = ad.createBBSLoginPane();
}
}, SupportOSImpl.USERINFOPANE);
processor.hold(northEastPane, LogMessageBar.getInstance(), bbsLoginPane[0]);
}
northEastPane.add(ad.createAlphaFinePane()); northEastPane.add(ad.createAlphaFinePane());
if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
ad.createAlphaFinePane().setVisible(false); ad.createAlphaFinePane().setVisible(false);
@ -166,7 +152,7 @@ public class NorthRegionContainerPane extends JPanel {
public void execute(Object... objects) { public void execute(Object... objects) {
northEastPane.add(ad.createBBSLoginPane()); northEastPane.add(ad.createBBSLoginPane());
} }
}, SupportOSImpl.USERINFOPANE); }, SupportOSImpl.BBS_USER_LOGIN_PANE);
} }

7
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -1,6 +1,7 @@
package com.fr.design.os.impl; package com.fr.design.os.impl;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.config.DesignerProperties;
import com.fr.design.jdk.JdkVersion; import com.fr.design.jdk.JdkVersion;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
@ -22,11 +23,11 @@ import java.util.Locale;
public enum SupportOSImpl implements SupportOS { public enum SupportOSImpl implements SupportOS {
/** /**
* ARM下屏蔽登录 * 屏蔽登录入口
*/ */
USERINFOPANE{ BBS_USER_LOGIN_PANE {
public boolean support(){ public boolean support(){
return Arch.getArch() != Arch.ARM; return Arch.getArch() != Arch.ARM && DesignerProperties.getInstance().isSupportLoginEntry();
} }
}, },
/** /**

13
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -6,10 +6,10 @@ import com.fr.base.MultiFieldParameter;
import com.fr.base.passport.FinePassportListenerAdapter; import com.fr.base.passport.FinePassportListenerAdapter;
import com.fr.base.passport.FinePassportManager; import com.fr.base.passport.FinePassportManager;
import com.fr.base.process.ProcessOperator; import com.fr.base.process.ProcessOperator;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.MarketConfig;
import com.fr.base.theme.migrator.FormThemeConfigMigrator; import com.fr.base.theme.migrator.FormThemeConfigMigrator;
import com.fr.base.theme.migrator.ReportThemeConfigMigrator; import com.fr.base.theme.migrator.ReportThemeConfigMigrator;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.MarketConfig;
import com.fr.decision.update.backup.RecoverManager; import com.fr.decision.update.backup.RecoverManager;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -29,9 +29,9 @@ import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction; import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.bridge.DesignToolbarProvider; import com.fr.design.bridge.DesignToolbarProvider;
import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.env.DesignerWorkspaceLoader;
import com.fr.design.fit.NewJForm; import com.fr.design.fit.NewJForm;
import com.fr.design.fit.common.TemplateTool; import com.fr.design.fit.common.TemplateTool;
import com.fr.design.env.DesignerWorkspaceLoader;
import com.fr.design.form.parameter.FormParaDesigner; import com.fr.design.form.parameter.FormParaDesigner;
import com.fr.design.fun.ElementUIProvider; import com.fr.design.fun.ElementUIProvider;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
@ -62,7 +62,6 @@ import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.form.FormElementCaseDesigner; import com.fr.design.mainframe.form.FormElementCaseDesigner;
import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.form.FormReportComponentComposite;
import com.fr.design.mainframe.guide.GuideRegister; import com.fr.design.mainframe.guide.GuideRegister;
import com.fr.design.mainframe.guide.collect.GuideCollector;
import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.DesignerLogAppender;
import com.fr.design.mainframe.share.constants.ShareEntryKey; import com.fr.design.mainframe.share.constants.ShareEntryKey;
import com.fr.design.mainframe.socketio.DesignerSocketIO; import com.fr.design.mainframe.socketio.DesignerSocketIO;
@ -131,11 +130,11 @@ import com.fr.task.Once;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.xml.ReportXMLUtils; import com.fr.xml.ReportXMLUtils;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.awt.Image;
import java.awt.image.BufferedImage;
/** /**
* Created by juhaoyu on 2018/1/31. * Created by juhaoyu on 2018/1/31.
@ -175,7 +174,7 @@ public class DesignerActivator extends Activator implements Prepare {
public void execute(Object... objects) { public void execute(Object... objects) {
UserInfoPane.getInstance().updateBBSUserInfo(); UserInfoPane.getInstance().updateBBSUserInfo();
} }
}, SupportOSImpl.USERINFOPANE); }, SupportOSImpl.BBS_USER_LOGIN_PANE);
storePassport(); storePassport();
AlphaFineHelper.switchConfig4Locale(); AlphaFineHelper.switchConfig4Locale();
RecoverManager.register(new RecoverForDesigner()); RecoverManager.register(new RecoverForDesigner());

Loading…
Cancel
Save