From 72c0dbcc1e1c5641191fb83c68ed00e923756045 Mon Sep 17 00:00:00 2001 From: Maksim Date: Tue, 11 Feb 2020 13:04:49 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=8F=8A=E6=9C=8D=E5=8A=A1=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/EnvChangeEntrance.java | 95 +++++++++++++++++ .../com/fr/design/env/RemoteWorkspace.java | 19 ++++ .../write/submit/CheckServiceDialog.java | 97 ++++++++++++++++++ .../fr/design/images/warnings/warning4.png | Bin 0 -> 2553 bytes 4 files changed, 211 insertions(+) create mode 100644 designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java create mode 100644 designer-base/src/main/resources/com/fr/design/images/warnings/warning4.png diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index c1c11553f7..b7c572650a 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -6,32 +6,45 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.env.DesignerWorkspaceGenerator; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceType; +import com.fr.design.env.RemoteWorkspace; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.TemplateTreePane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.DesignUtils; +import com.fr.design.write.submit.CheckServiceDialog; import com.fr.env.EnvListPane; import com.fr.general.GeneralContext; +import com.fr.general.GeneralUtils; +import com.fr.invoke.Reflect; +import com.fr.json.JSONArray; import com.fr.license.exception.RegistEditionException; import com.fr.log.FineLoggerFactory; +import com.fr.rpc.Result; import com.fr.stable.AssistUtils; import com.fr.stable.EnvChangedListener; import com.fr.start.server.ServerTray; import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContextCallback; import com.fr.workspace.Workspace; +import com.fr.workspace.base.WorkspaceAPI; import com.fr.workspace.connect.WorkspaceConnectionInfo; +import com.fr.workspace.engine.base.FineObjectPool; import com.fr.workspace.engine.channel.http.FunctionalHttpRequest; import com.fr.workspace.engine.exception.WorkspaceAuthException; +import com.fr.workspace.engine.exception.WorkspaceConnectionException; +import com.fr.workspace.engine.rpc.WorkspaceProxyPool; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.UIManager; +import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Set; +import java.util.HashSet; import static javax.swing.JOptionPane.ERROR_MESSAGE; import static javax.swing.JOptionPane.QUESTION_MESSAGE; @@ -83,6 +96,7 @@ public class EnvChangeEntrance { private boolean switch2Env(final String envName, PopTipStrategy strategy) { DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); DesignerWorkspaceInfo selectedEnv = envManager.getWorkspaceInfo(envName); + WorkspaceConnectionInfo connectionInfo = selectedEnv.getConnection(); try { Workspace workspace = DesignerWorkspaceGenerator.generate(selectedEnv); @@ -121,6 +135,33 @@ public class EnvChangeEntrance { template.refreshToolArea(); } + String localBranch; + String remoteBranch; + localBranch = GeneralUtils.readFullBuildNO(); + try { + remoteBranch = new FunctionalHttpRequest(connectionInfo).getServerBranch(); + } catch (WorkspaceConnectionException e){ + remoteBranch = Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Is_Old") + formatBranch(localBranch); + } + //通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本) + if(localBranch.contains("#") && localBranch.equals(remoteBranch)){ + //说明版本一致,仅做日志记录 + FineLoggerFactory.getLogger().info("Remote Designer version consistency"); + }else { + localBranch = formatBranch(localBranch); + remoteBranch = formatBranch(remoteBranch); + Set noExistServiceSet = getNoExistServiceSet(connectionInfo); + StringBuilder textBuilder = new StringBuilder(); + for(Class clazz : noExistServiceSet){ + WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class); + String descriptionOfCN = Toolkit.i18nText(workspaceAPI.description()); + textBuilder.append(descriptionOfCN).append("\n"); + } + String areaText = textBuilder.toString(); + CheckServiceDialog dialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(),areaText,localBranch,remoteBranch); + dialog.setVisible(true); + } + } catch (WorkspaceAuthException | RegistEditionException e) { // String title = Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Auth_Failed"); // String title = Toolkit.i18nText("Fine-Design_Basic_Lic_Does_Not_Support_Remote"); @@ -196,6 +237,60 @@ public class EnvChangeEntrance { return true; } + public Set getNoExistServiceSet(WorkspaceConnectionInfo info){ + Set noExistServiceSet = new HashSet(); + Set remoteServiceSet = new HashSet(); + Set localServiceSet = FineObjectPool.getInstance().getServerPool().keySet(); + + try { + JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(); + for(int i = 0; i < serviceArray.size(); i++){ + try{ + Class clazz = Class.forName((String) serviceArray.get(i)); + remoteServiceSet.add(clazz); + } catch (Exception e){ + continue; + } + } + noExistServiceSet.addAll(localServiceSet); + noExistServiceSet.removeAll(remoteServiceSet); + return noExistServiceSet; + } catch (WorkspaceConnectionException e) { + FineLoggerFactory.getLogger().info(e.getMessage()); + //根据本地的服务列表做逐一检测 + for(Class clazz : localServiceSet) { + Method testMethod = Reflect.on(Method.class).create(clazz, "connectTest", new Class[0], String.class, new Class[0], 1025, 8, null, null, null, null).get(); + WorkspaceProxyPool proxyPool = (WorkspaceProxyPool) (((RemoteWorkspace) WorkContext.getCurrent()).getClient()).getPool(); + Result result = proxyPool.testInvoker(testMethod); + Exception invokeException = (Exception) result.getException(); + if(invokeException != null){ + Exception cause = (Exception) invokeException.getCause(); + //获取被包装最底层的异常 + while (cause != null) { + invokeException = cause; + cause = (Exception) invokeException.getCause(); + } + //该异常表示服务不存在 + if(invokeException instanceof ClassNotFoundException){ + noExistServiceSet.add(clazz); + } + } + } + return noExistServiceSet; + } catch (Exception e){ + e.printStackTrace(); + return null; + } + } + + private String formatBranch(String branch){ + if(branch.contains("#")){ + return branch.substring(branch.lastIndexOf("#") + 1, branch.length() - 13); + } + return branch; + } + + /** * 编辑items * diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index 36d8e7f7a5..4abd7e63c8 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -8,6 +8,9 @@ import com.fr.workspace.connect.WorkspaceClient; import com.fr.workspace.connect.WorkspaceConnection; import com.fr.workspace.connect.WorkspaceConnectionInfo; import com.fr.workspace.server.authority.decision.DecisionOperator; +import com.fr.workspace.engine.rpc.WorkspaceProxyPool; +import com.fr.workspace.pool.WorkObjectPool; +import java.lang.reflect.Method; /** * Created by juhaoyu on 2018/6/14. @@ -78,6 +81,18 @@ public class RemoteWorkspace implements Workspace { return client.getPool().get(type); } + + public T get(Class type, Method defaultMethod){ + if(defaultMethod != null) { + WorkObjectPool objectPool = client.getPool(); + if (objectPool instanceof WorkspaceProxyPool) { + return ((WorkspaceProxyPool) objectPool).get(type, defaultMethod); + }else { + return client.getPool().get(type); + } + } + return client.getPool().get(type); + } @Override public void close() { @@ -96,4 +111,8 @@ public class RemoteWorkspace implements Workspace { return obj instanceof RemoteWorkspace && AssistUtils.equals(((RemoteWorkspace) obj).connection, this.connection); } + + public WorkspaceClient getClient(){ + return client; + } } diff --git a/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java new file mode 100644 index 0000000000..e55de3fe26 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java @@ -0,0 +1,97 @@ +package com.fr.design.write.submit; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRFont; +import com.fr.general.IOUtils; + +import javax.swing.BorderFactory; +import javax.swing.ImageIcon; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author: Maksim + * @Date: Created in 2020/2/3 + * @Description: 远程连接时,服务检测提醒对话框 + */ +public class CheckServiceDialog extends JDialog implements ActionListener { + private JPanel topPanel; + private JPanel centerPanel; + private JPanel bottomPanel; + + public CheckServiceDialog(Frame parent, String areaText, String localBranch, String remoteBranch){ + super(parent,true); + //上面的标签面板 + topPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); + JPanel imagePanel = new JPanel(); + ImageIcon icon = (ImageIcon) IOUtils.readIcon("com/fr/design/images/warnings/warning4.png"); + + JLabel imageLabel = new JLabel(); + imageLabel.setIcon(icon); + imagePanel.add(imageLabel); + imagePanel.setPreferredSize(new Dimension(100,80)); + + JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); + FRFont font = FRFont.getInstance(); + font = font.applySize(15).applyStyle(1); + JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency")); + label.setFont(font); + label.setPreferredSize(new Dimension(500,30)); + JLabel label2 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer") + + localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch); + label2.setPreferredSize(new Dimension(500,20)); + JLabel label3 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update")); + label3.setPreferredSize(new Dimension(500,20)); + + verticalPanel.add(label); + verticalPanel.add(label2); + verticalPanel.add(label3); + + topPanel.add(imagePanel,BorderLayout.WEST); + topPanel.add(verticalPanel,BorderLayout.CENTER); + + //中间的文本域面板 + centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); + centerPanel.setBorder(BorderFactory.createEmptyBorder(0,10,10,10)); + centerPanel.setPreferredSize(new Dimension(480,320)); + + JLabel titleLabel = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Affected_Function")); + titleLabel.setPreferredSize(new Dimension(400,40)); + JTextArea checkArea = new JTextArea(areaText); + checkArea.setEnabled(false); + centerPanel.add(titleLabel,BorderLayout.NORTH); + centerPanel.add(checkArea,BorderLayout.CENTER); + + //下面的按钮面板 + UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm")); + JPanel buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); + buttonPanel.add(okButton); + okButton.addActionListener(this ); + bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); + bottomPanel.add(buttonPanel); + + this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Title_Hint")); + this.setResizable(false); + + this.add(topPanel,BorderLayout.NORTH); + this.add(centerPanel, BorderLayout.CENTER); + this.add(buttonPanel,BorderLayout.SOUTH); + this.setSize(new Dimension(600, 500)); + + GUICoreUtils.centerWindow(this); + } + @Override + public void actionPerformed(ActionEvent e) { + this.dispose(); + } +} diff --git a/designer-base/src/main/resources/com/fr/design/images/warnings/warning4.png b/designer-base/src/main/resources/com/fr/design/images/warnings/warning4.png new file mode 100644 index 0000000000000000000000000000000000000000..a982ee864b9660acc8396576ed34cadb3fdb3b14 GIT binary patch literal 2553 zcmVQwD5no84<_$=)R$n%mde*oKhY-TwCLa#M4E z=AP$ypZB@V-RW2awU z)c8>k@pUURQ(|tXfe#Shk3T4y@gd)=hzX+}Vlkh2fSGR&+7}Tok(0RxgYu)`jcSN? zSLPCu_^FVMO!ci7Smth_;zo zMZ}SRS#}&}K~r<*7V-9@LDoD(`*3TT9LK#1-xf^^Z&7(#(Tq!C(5)(2^AHPG=0Siz z9ap2wyj)G?9*9f7oNi4+ESQ-qK>YhS8)U{SNK9x`)t&h`>kRu~t5qqWU}m;~__7*Q zyj#(XuhpQ=K#7`NiN$juTeAEK4n0Pv?o4fY)?otZpq z_rXed+tL>j@M}>$fNxQ>-1o)t{*keU*wd9+AW8gNQCp(R{xRw-HiMZONe&YYzI|1j2I%e>7s+QX* ziuZf_$iOC5GZu>K`@zK$Vy~6H+W~#mj}ZyDHlZ299~eQl75vr^^&feN#eC~~mAr|uKN5J$+|0a2hqU9Ed z@`{#jGoXm#2XTZIO49hAZ(bEbq#@d7>or8qV?hiOVV|5d-XX$0YPO!+NX}jn>~IVb z4oQtpcGBd|*MjiNaUu<|Xz9-~@PVM_olI~GPSbcnX4ZzAC1VN49+nu=yLSJSe)(yb)X%MsOcU$~XBX51A< zFI0%VR{B~8^s6uihI3^qHBoZ6T}iX2OTS8z@S6y0b~|r4*{128dxB~P4v`rR#k}s` znFuceh?r!DXQ|D(U6rr}Q~xpu_ljtVVwkZ`O&QBX@xyU}LoDReE5LM5(885?1in(% za$74sZ=31+iRg1t*KLq+>7=Pfpb51=A@+5hKf{q4+$I02?_WV0CFbRFmCg64CdtZp zds5Mi`GGtKAr&qCJ_bG?gzL#6d{;>tw^jakPQM7E*`7MV0E-pP@I9&K`%1L)Ef*0> zo_7_&dKg&Esk-i0$m`u;oE}u)gSShjQnuO$TRFb}5Ka9FB78KaCII4pD9K#e538f* ztaBQv6zgFi(S4qw{rd{BV5V;X(a&QGaA12B-HN6)6Ft*EyiUPPUk0LWan=W+hx?IL zrx_ihb%aA?K6_#@pK!m@yh~I(D6XHSndOe3^;r6130NOg*9Y$*MKgpa*Mvi~t@KI) zeanZDz)*H*p4!~;r{My{d}bAM^uwVQ-sk4an(?Ga6G9;#%eS1@??~;S*xt~Gd%a1~ zjGqnvqitn=LSWAY3X#S=F@)_((h!sv8>RC7`Ft!#)VR*&5!e>KW{ytD|sL)LOtw_JM;v`mr4ONYI*B7dInXC-Nrop37~V!_fM z0&r90Myd!BP;g3kzsT)YA+KK#M(7PDzx_$T7ZRE=V$y9yh_74e`3<1o`7ID0PwN%U zd#CSYoyd0ld>AL-RR*$(W^@gujR>(|>f1q>=R-RZC=))bCJo^u8d2;$2Qpq}z4I+0 z+NQpY2tNuW9+E^PEs&GDgbz0stjt<>9y?^&0CXxzCC(MP!^o3stRS)8Lg@wDfl~!(FAB5K)alGVa2In)3e9prV!8z&?(31Ty16VxV2s zjDaE3fq&;hUcU#76>${vt4YLX$jRKHN<3f3FZ>qwiDzJusu_dvLca#zG94spIgHu@IvOv8OAuM3QRu zvjQP4*B{*-1*D#X=S`)CM)#-pX4ap@`gX*O$JCVZiT{1sKCI7!gYETgx$fLO@4Vq$ z-ZZ_l`^^Oiv!$(pq+1z?A>J^-%vgKP|L-TXdw~a2T%%x z6u3UW=!VI`2iHAAc! Date: Fri, 14 Feb 2020 13:47:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/EnvChangeEntrance.java | 3 ++- .../java/com/fr/design/write/submit/CheckServiceDialog.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index b7c572650a..209efaf7ed 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -20,6 +20,7 @@ import com.fr.general.GeneralUtils; import com.fr.invoke.Reflect; import com.fr.json.JSONArray; import com.fr.license.exception.RegistEditionException; +import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.rpc.Result; import com.fr.stable.AssistUtils; @@ -154,7 +155,7 @@ public class EnvChangeEntrance { StringBuilder textBuilder = new StringBuilder(); for(Class clazz : noExistServiceSet){ WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class); - String descriptionOfCN = Toolkit.i18nText(workspaceAPI.description()); + String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description()); textBuilder.append(descriptionOfCN).append("\n"); } String areaText = textBuilder.toString(); diff --git a/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java index e55de3fe26..3797c0f8a2 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java @@ -8,7 +8,7 @@ import com.fr.general.FRFont; import com.fr.general.IOUtils; import javax.swing.BorderFactory; -import javax.swing.ImageIcon; +import javax.swing.Icon; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; @@ -34,7 +34,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { //上面的标签面板 topPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel imagePanel = new JPanel(); - ImageIcon icon = (ImageIcon) IOUtils.readIcon("com/fr/design/images/warnings/warning4.png"); + Icon icon = IOUtils.readIcon("com/fr/design/images/warnings/warning4.png"); JLabel imageLabel = new JLabel(); imageLabel.setIcon(icon); From 5c46628eea067ddea794fbbe303ed224650c35b8 Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 16 Feb 2020 22:13:34 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/env/RemoteWorkspace.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index 4abd7e63c8..570f1a4db3 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -82,6 +82,7 @@ public class RemoteWorkspace implements Workspace { return client.getPool().get(type); } + @Override public T get(Class type, Method defaultMethod){ if(defaultMethod != null) { WorkObjectPool objectPool = client.getPool(); From 3ad25dcd1a9b95b9b3639d9163c2cf58e558689f Mon Sep 17 00:00:00 2001 From: Maksim Date: Tue, 18 Feb 2020 19:21:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?RPC=E8=B0=83=E7=94=A8=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=81=9A=E6=8A=BD=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/EnvChangeEntrance.java | 2 +- .../src/main/java/com/fr/design/env/RemoteWorkspace.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 209efaf7ed..8945b53fba 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -279,7 +279,7 @@ public class EnvChangeEntrance { } return noExistServiceSet; } catch (Exception e){ - e.printStackTrace(); + FineLoggerFactory.getLogger().error(e.getMessage(),e); return null; } } diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index 570f1a4db3..bdd954b865 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -1,6 +1,7 @@ package com.fr.design.env; import com.fr.design.i18n.Toolkit; +import com.fr.rpc.ExceptionMethod; import com.fr.stable.AssistUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; @@ -83,11 +84,11 @@ public class RemoteWorkspace implements Workspace { } @Override - public T get(Class type, Method defaultMethod){ - if(defaultMethod != null) { + public T get(Class type, ExceptionMethod exceptionMethod){ + if(exceptionMethod != null) { WorkObjectPool objectPool = client.getPool(); if (objectPool instanceof WorkspaceProxyPool) { - return ((WorkspaceProxyPool) objectPool).get(type, defaultMethod); + return ((WorkspaceProxyPool) objectPool).get(type, exceptionMethod); }else { return client.getPool().get(type); } From f4e14c04c507aa7ddd9781ba99c8716d7f9be07e Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 19 Feb 2020 11:13:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=86=85=E9=83=A8?= =?UTF-8?q?=E7=B1=BB=E6=9D=A5=E5=81=9A=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/env/RemoteWorkspace.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index bdd954b865..8f56fc5933 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -1,7 +1,7 @@ package com.fr.design.env; import com.fr.design.i18n.Toolkit; -import com.fr.rpc.ExceptionMethod; +import com.fr.rpc.ExceptionHandler; import com.fr.stable.AssistUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; @@ -11,7 +11,6 @@ import com.fr.workspace.connect.WorkspaceConnectionInfo; import com.fr.workspace.server.authority.decision.DecisionOperator; import com.fr.workspace.engine.rpc.WorkspaceProxyPool; import com.fr.workspace.pool.WorkObjectPool; -import java.lang.reflect.Method; /** * Created by juhaoyu on 2018/6/14. @@ -84,11 +83,11 @@ public class RemoteWorkspace implements Workspace { } @Override - public T get(Class type, ExceptionMethod exceptionMethod){ - if(exceptionMethod != null) { + public T get(Class type, ExceptionHandler exceptionHandler){ + if(exceptionHandler != null) { WorkObjectPool objectPool = client.getPool(); if (objectPool instanceof WorkspaceProxyPool) { - return ((WorkspaceProxyPool) objectPool).get(type, exceptionMethod); + return ((WorkspaceProxyPool) objectPool).get(type, exceptionHandler); }else { return client.getPool().get(type); }