|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
package com.fr.design.update.push; |
|
|
|
|
|
|
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.http.HttpToolbox; |
|
|
|
|
import com.fr.json.JSONObject; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import java.security.InvalidParameterException; |
|
|
|
@ -58,6 +61,25 @@ class DesignerUpdateInfo {
|
|
|
|
|
return latestVersion; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String getLatestFullVersion() { |
|
|
|
|
try { |
|
|
|
|
String url = CloudCenter.getInstance().acquireUrlByKind("jar10.newupdate"); |
|
|
|
|
if (StringUtils.isBlank(url)) { |
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|
String res = HttpToolbox.get(url); |
|
|
|
|
if (StringUtils.isBlank(res)) { |
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|
String version = new JSONObject(res).optString("version"); |
|
|
|
|
String build = new JSONObject(res).optString("build"); |
|
|
|
|
return version + "-" + build; |
|
|
|
|
} catch (Throwable e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String getLastIgnoredVersion() { |
|
|
|
|
return lastIgnoredVersion; |
|
|
|
|
} |
|
|
|
|