Browse Source

REPORT-94530 【二开接口】转换用户名接口--调整一下接口位置

feature/x
John.Ying-应志浩 2 years ago
parent
commit
f04b2e44f0
  1. 3
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 20
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  3. 6
      designer-base/src/main/java/com/fr/design/env/processor/AbstractRemoteDesignerWorkspaceInfoProcessor.java
  4. 25
      designer-base/src/main/java/com/fr/design/env/processor/RemoteDesignerWorkspaceInfoProcessor.java
  5. 3
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

3
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -1,6 +1,7 @@
package com.fr.design;
import com.fr.common.report.ReportState;
import com.fr.design.env.processor.RemoteDesignerWorkspaceInfoProcessor;
import com.fr.design.mainframe.manager.clip.TemplateTreeClipboard;
import com.fr.design.plugin.remind.PluginErrorDesignReminder;
import com.fr.design.data.DesignTableDataManager;
@ -111,7 +112,7 @@ public class EnvChangeEntrance {
if (workspaceInfo == null || workspaceInfo.getType() == DesignerWorkspaceType.Local) {
return workspaceInfo;
}
RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
if (processor == null) {
return workspaceInfo;
}

20
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -191,24 +191,4 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
WorkContext.getConnector().validateVT(connection);
return true;
}
/**
* 远程设计自定义用户名接口
*
* @author John.Ying
* @since 11.0
* Created on 2023/5/17
*/
public interface RemoteDesignerWorkspaceInfoProcessor extends Immutable {
String XML_TAG = "RemoteDesignerWorkspaceInfoProcessor";
int CURRENT_LEVEL = 1;
/**
* 根据链接信息自定义用户名
*/
WorkspaceConnectionInfo customUserName(WorkspaceConnectionInfo workspaceInfo);
}
}

6
designer-base/src/main/java/com/fr/design/env/processor/AbstractRemoteDesignerWorkspaceInfoProcessor.java vendored

@ -1,7 +1,5 @@
package com.fr.design.env.processor;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.stable.fun.mark.API;
@ -12,8 +10,8 @@ import com.fr.stable.fun.mark.API;
* @since 11.0
* Created on 2023/5/17
*/
@API(level = RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor.CURRENT_LEVEL)
public abstract class AbstractRemoteDesignerWorkspaceInfoProcessor implements RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor {
@API(level = RemoteDesignerWorkspaceInfoProcessor.CURRENT_LEVEL)
public abstract class AbstractRemoteDesignerWorkspaceInfoProcessor implements RemoteDesignerWorkspaceInfoProcessor {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;

25
designer-base/src/main/java/com/fr/design/env/processor/RemoteDesignerWorkspaceInfoProcessor.java vendored

@ -0,0 +1,25 @@
package com.fr.design.env.processor;
import com.fr.stable.fun.mark.Immutable;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
/**
* 远程设计自定义用户名接口
* px:为了二开插件开的接口不建议实现后面可能会变动
*
* @author John.Ying
* @since 11.0
* Created on 2023/5/17
*/
public interface RemoteDesignerWorkspaceInfoProcessor extends Immutable {
String XML_TAG = "RemoteDesignerWorkspaceInfoProcessor";
int CURRENT_LEVEL = 1;
/**
* 根据链接信息自定义用户名
*/
WorkspaceConnectionInfo customUserName(WorkspaceConnectionInfo workspaceInfo);
}

3
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -5,6 +5,7 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.env.processor.RemoteDesignerWorkspaceInfoProcessor;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -581,7 +582,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
final RemoteDesignerWorkspaceInfo remoteEnv = updateBean();
WorkspaceConnectionInfo originalConnection = remoteEnv.getConnection();
final WorkspaceConnectionInfo connection;
RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfo.RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
if (processor != null) {
connection = processor.customUserName(originalConnection);
} else {

Loading…
Cancel
Save