|
|
@ -2046,25 +2046,7 @@ public class RemoteEnv implements Env { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readPlugins() throws Exception { |
|
|
|
public void readPluginLicenses() 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(); |
|
|
|
ByteArrayOutputStream out = new ByteArrayOutputStream(); |
|
|
|
HashMap<String, String> para = new HashMap<String, String>(); |
|
|
|
HashMap<String, String> para = new HashMap<String, String>(); |
|
|
|
para.put("op", "fr_remote_design"); |
|
|
|
para.put("op", "fr_remote_design"); |
|
|
@ -2083,8 +2065,6 @@ public class RemoteEnv implements Env { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void readPluginConfig() throws Exception { |
|
|
|
public void checkAndRegisterLic(FileNode node, Plugin plugin) throws Exception { |
|
|
|
readPlugins(); |
|
|
|
|
|
|
|
readPluginLicenses(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |