Browse Source

远程设计插件加载

master
vito 9 years ago
parent
commit
c29cf4f5f1
  1. 20
      designer_base/src/com/fr/env/RemoteEnv.java

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

@ -2046,24 +2046,6 @@ public class RemoteEnv implements Env {
}
private void readPlugins() throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_plugins");
InputStream inputStream = postBytes2ServerB(out.toByteArray(), para);
String pluginsStr = IOUtils.inputStream2String(inputStream, EncodeConstants.ENCODING_UTF_8);
if (StringUtils.isNotBlank(pluginsStr) && pluginsStr.startsWith("[")) {
JSONArray jsonArray = new JSONArray(pluginsStr);
for (int i = 0; i < jsonArray.length(); i++) {
Plugin plugin = new Plugin();
plugin.parseJSON(jsonArray.getJSONObject(i));
PluginLoader.getLoader().addRemotePlugin(plugin);
}
}
}
private void readPluginLicenses() throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
HashMap<String, String> para = new HashMap<String, String>();
@ -2084,7 +2066,7 @@ public class RemoteEnv implements Env {
@Override
public void readPluginConfig() throws Exception {
readPlugins();
PluginLoader.getLoader().readFromRemoteEnv();
readPluginLicenses();
}
}
Loading…
Cancel
Save