|
|
@ -52,6 +52,7 @@ import java.util.Map; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author pengda |
|
|
|
* @author pengda |
|
|
@ -95,9 +96,23 @@ public class VersionCheckUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void showVersionCheckDialog(String envName) { |
|
|
|
public static void showVersionCheckDialog(String envName) { |
|
|
|
if (!VersionCheckUtils.versionCheck(envName)) { |
|
|
|
new SwingWorker<Boolean, Void>() { |
|
|
|
showNotificationDialog(envName); |
|
|
|
@Override |
|
|
|
} |
|
|
|
protected Boolean doInBackground() { |
|
|
|
|
|
|
|
return !VersionCheckUtils.versionCheck(envName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected void done() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
if (get()) { |
|
|
|
|
|
|
|
showNotificationDialog(envName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().warn(e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}.execute(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void showNotificationDialog(String envName) { |
|
|
|
private static void showNotificationDialog(String envName) { |
|
|
@ -294,7 +309,7 @@ public class VersionCheckUtils { |
|
|
|
|
|
|
|
|
|
|
|
private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { |
|
|
|
private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { |
|
|
|
return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) |
|
|
|
return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) |
|
|
|
|| (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.containsKey(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) |
|
|
|
|| (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.getString(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) |
|
|
|
|| pluginsNeedIgnore.contains(remotePlugin.getString(ID))); |
|
|
|
|| pluginsNeedIgnore.contains(remotePlugin.getString(ID))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|