Browse Source

update

master
Fangjie Hu 8 years ago
parent
commit
506e0bc7a1
  1. 15
      designer_base/src/com/fr/design/extra/PluginHelper.java
  2. 19
      designer_base/src/com/fr/design/extra/plugindependence/PluginDependenceUtils.java
  3. 22
      designer_base/src/com/fr/env/RemoteEnv.java

15
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -3,7 +3,7 @@ package com.fr.design.extra;
import com.fr.base.Env;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.extra.plugindependence.PluginDependenceUtils;
import com.fr.design.extra.plugindependence.DownLoadDependenceUI;
import com.fr.general.*;
import com.fr.general.http.HttpClient;
import com.fr.plugin.Plugin;
@ -150,9 +150,20 @@ public class PluginHelper {
}
//安装插件依赖
PluginDependenceUtils.installDependenceOnline(currentID, needInstallDependence);
installDependenceOnline(currentID, needInstallDependence);
}
/**
* 构造一个下载UI
* @param currentID
* @param list
* @throws PluginDependenceException
*/
private static void installDependenceOnline(String currentID, List<PluginDependenceUnit> list) throws PluginDependenceException{
DownLoadDependenceUI ui = new DownLoadDependenceUI(currentID, list);
ui.installOnline();
}
/**
* 从选中的压缩文件中安装插件
*

19
designer_base/src/com/fr/design/extra/plugindependence/PluginDependenceUtils.java

@ -1,19 +0,0 @@
package com.fr.design.extra.plugindependence;
import com.fr.plugin.dependence.PluginDependenceException;
import com.fr.plugin.dependence.PluginDependenceUnit;
import java.util.List;
/**
* Created by hufan on 2016/8/31.
*/
public class PluginDependenceUtils {
public static void installDependenceOnline(String currentID, List<PluginDependenceUnit> list) throws PluginDependenceException{
DownLoadDependenceUI ui = new DownLoadDependenceUI(currentID, list);
ui.installOnline();
}
}

22
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -2083,16 +2083,13 @@ public class RemoteEnv implements Env {
@Override
public String pluginServiceAction(String serviceID, String req) throws Exception {
PluginServiceCreator service = PluginServiceManager.getService(serviceID);
if (service == null){
return null;
}
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_get_plugin_service_data");
para.put("serviceID", service.getServiceID());
para.put("serviceID", serviceID);
para.put("req", req);
InputStream inputStream = getDataFormRemote(para);
HttpClient client = createHttpMethod(para); //jim :加上user,远程设计点击预览时传递用户角色信息
InputStream inputStream = execute4InputStream(client);
return IOUtils.inputStream2String(inputStream);
}
@ -2108,17 +2105,4 @@ public class RemoteEnv implements Env {
public void checkAndRegisterLic(FileNode node, Plugin plugin) throws Exception {
}
/**
* 提供一个可以再插件自定义请求数据的方法
* 返回的数据可自行处理
* @param para
* @return
* @throws Exception
*/
private InputStream getDataFormRemote(HashMap<String, String> para) throws Exception {
HttpClient client = createHttpMethod(para); //jim :加上user,远程设计点击预览时传递用户角色信息
return execute4InputStream(client);
}
}
Loading…
Cancel
Save