Browse Source

REPORT-809 设计器插件管理点击全部更新会提示连接应用商店失败

master
PanLi320 8 years ago
parent
commit
a1d72bb047
  1. 15
      designer_base/src/com/fr/design/extra/PluginHelper.java

15
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -48,10 +48,7 @@ public class PluginHelper {
* @param p 下载百分比处理
*/
public static void downloadPluginFile(String id, String username, String password, Process<Double> p) throws Exception {
if (StringUtils.isEmpty(id)) {
return;
}
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
if (!PluginHelper.invalidUser(id, username, password)) {
return;
}
HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password));
@ -79,6 +76,16 @@ public class PluginHelper {
}
}
private static boolean invalidUser(String id, String username, String password) {
if (StringUtils.isEmpty(id)) {
return false;
} else if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)){
return false;
} else {
return true;
}
}
private static String getDownloadPath(String id, String username, String password) throws Exception {
HashMap<String, String> map = new HashMap<String, String>();
map.put("id", id);

Loading…
Cancel
Save