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