|
|
|
@ -65,18 +65,17 @@ public class PluginsReaderFromStore {
|
|
|
|
|
* @return 插件信息 |
|
|
|
|
*/ |
|
|
|
|
public static Plugin[] readPluginsForUpdate() throws Exception { |
|
|
|
|
String resText; |
|
|
|
|
try { |
|
|
|
|
String resText = null; |
|
|
|
|
String url = SiteCenter.getInstance().acquireUrlByKind("plugin.update"); |
|
|
|
|
if (StringUtils.isNotEmpty(url)) { |
|
|
|
|
HashMap<String, String> para = new HashMap<String, String>(); |
|
|
|
|
para.put("plugins", PluginLoader.getLoader().pluginsToString()); |
|
|
|
|
//只有当前设计器的jar高于插件新版本需要的jarTime时, 才提示更新该插件.
|
|
|
|
|
para.put("jarTime", GeneralUtils.readBuildNO()); |
|
|
|
|
HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.update"), para); |
|
|
|
|
HttpClient httpClient = new HttpClient(url, para); |
|
|
|
|
resText = httpClient.getResponseText(); |
|
|
|
|
String charSet = EncodeConstants.ENCODING_UTF_8; |
|
|
|
|
resText = URLDecoder.decode(URLDecoder.decode(resText, charSet), charSet); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
throw new Exception(Inter.getLocText("FR-Designer-Plugin_PluginMarket_Coding")); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotEmpty(resText)) { |
|
|
|
|
try { |
|
|
|
@ -93,7 +92,6 @@ public class PluginsReaderFromStore {
|
|
|
|
|
throw new Exception(Inter.getLocText("FR-Designer-Plugin_Read_Plugin_List_Error")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return pluginsToUpdate.toArray(new Plugin[pluginsToUpdate.size()]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|