Browse Source

Merge pull request #145 in BA/design from ~VITO/design:dev to dev

* commit '0c800b780e2705328e3036268006d1ff47a4bedf':
  远程设计插件加载
master
superman 9 years ago
parent
commit
d21bf9293f
  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 { private void readPluginLicenses() throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
HashMap<String, String> para = new HashMap<String, String>(); HashMap<String, String> para = new HashMap<String, String>();
@ -2084,7 +2066,7 @@ public class RemoteEnv implements Env {
@Override @Override
public void readPluginConfig() throws Exception { public void readPluginConfig() throws Exception {
readPlugins(); PluginLoader.getLoader().readFromRemoteEnv();
readPluginLicenses(); readPluginLicenses();
} }
} }
Loading…
Cancel
Save