From bac818b56649545c5bf8d1bc129e4a0a3063b445 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 9 Sep 2016 20:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DownLoadDependenceUI.java | 3 --- .../src/com/fr/design/utils/DesignUtils.java | 2 +- designer_base/src/com/fr/env/RemoteEnv.java | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 7d0aca64ac..aff5f4e60e 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -206,9 +206,6 @@ public class DownLoadDependenceUI implements ActionListener { //如果是服务器环境,则只会安装一份 private void installPluginDependenceFile(String filePath){ IOUtils.unzip(new File(filePath), FRContext.getCurrentEnv().getPath() + dependenceDir); - if (dependenceType == PluginDependenceType.SERVICE) { - IOUtils.unzip(new File(filePath), StableUtils.getInstallHome() + dependenceDir); - } } public void actionPerformed(ActionEvent e) { diff --git a/designer_base/src/com/fr/design/utils/DesignUtils.java b/designer_base/src/com/fr/design/utils/DesignUtils.java index d6a2ab8a58..1023b3ce37 100644 --- a/designer_base/src/com/fr/design/utils/DesignUtils.java +++ b/designer_base/src/com/fr/design/utils/DesignUtils.java @@ -52,7 +52,7 @@ public class DesignUtils { public static boolean isStarted() { try { new Socket("localhost", port); - return true; + /*return true;*/ } catch (Exception exp) { } diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a779026eab..b736517b82 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -31,6 +31,7 @@ import com.fr.plugin.Plugin; import com.fr.plugin.PluginLicense; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginLoader; +import com.fr.plugin.dependence.PluginServiceCreator; import com.fr.stable.*; import com.fr.stable.file.XMLFileManagerProvider; import com.fr.stable.project.ProjectConstants; @@ -2079,7 +2080,26 @@ public class RemoteEnv implements Env { } } + @Override + public String pluginServiceAction(PluginServiceCreator service, String req) throws Exception { + return service.remoteServiceAction(req); + } + @Override public void checkAndRegisterLic(FileNode node, Plugin plugin) throws Exception { + + } + + /** + * 提供一个可以再插件自定义请求数据的方法 + * 返回的数据可自行处理 + * @param para + * @return + * @throws Exception + */ + public InputStream getDataFormRemote(HashMap para) throws Exception { + HttpClient client = createHttpMethod(para); //jim :加上user,远程设计点击预览时传递用户角色信息 + return execute4InputStream(client); } + } \ No newline at end of file