|
|
@ -10,8 +10,8 @@ import com.fr.json.JSONObject; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.plugin.PluginVerifyException; |
|
|
|
import com.fr.plugin.PluginVerifyException; |
|
|
|
import com.fr.plugin.basic.version.Version; |
|
|
|
import com.fr.plugin.basic.version.Version; |
|
|
|
import com.fr.plugin.basic.version.VersionIntervalType; |
|
|
|
|
|
|
|
import com.fr.plugin.basic.version.VersionIntervalFactory; |
|
|
|
import com.fr.plugin.basic.version.VersionIntervalFactory; |
|
|
|
|
|
|
|
import com.fr.plugin.basic.version.VersionIntervalType; |
|
|
|
import com.fr.plugin.context.PluginContext; |
|
|
|
import com.fr.plugin.context.PluginContext; |
|
|
|
import com.fr.plugin.context.PluginMarker; |
|
|
|
import com.fr.plugin.context.PluginMarker; |
|
|
|
import com.fr.plugin.error.PluginBaseErrorCode; |
|
|
|
import com.fr.plugin.error.PluginBaseErrorCode; |
|
|
@ -23,7 +23,7 @@ import com.fr.stable.ProductConstants; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
@ -47,9 +47,10 @@ public class PluginUtils { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static PluginMarker createPluginMarker(String pluginInfo) { |
|
|
|
public static PluginMarker createPluginMarker(String pluginInfo) { |
|
|
|
//todo 判空
|
|
|
|
int splitIndex = pluginInfo.lastIndexOf("_"); |
|
|
|
String[] plugin = pluginInfo.split("_"); |
|
|
|
String pluginID = pluginInfo.substring(0, splitIndex); |
|
|
|
return PluginMarker.create(plugin[0], plugin[1]); |
|
|
|
String version = pluginInfo.substring(splitIndex + 1); |
|
|
|
|
|
|
|
return PluginMarker.create(pluginID, version); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static JSONObject getLatestPluginInfo(String pluginID) throws Exception { |
|
|
|
public static JSONObject getLatestPluginInfo(String pluginID) throws Exception { |
|
|
|