@ -20,6 +20,7 @@ import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.context.PluginMarkerAdapter ;
import com.fr.plugin.context.PluginMarkerAdapter ;
import com.fr.plugin.manage.PluginManager ;
import com.fr.plugin.manage.PluginManager ;
import com.fr.plugin.manage.control.PluginControllerHelper ;
import com.fr.plugin.manage.control.PluginControllerHelper ;
import com.fr.plugin.manage.control.PluginExtraInfo ;
import com.fr.plugin.manage.control.PluginTask ;
import com.fr.plugin.manage.control.PluginTask ;
import com.fr.plugin.manage.control.PluginTaskCallback ;
import com.fr.plugin.manage.control.PluginTaskCallback ;
import com.fr.plugin.manage.control.PluginTaskResult ;
import com.fr.plugin.manage.control.PluginTaskResult ;
@ -42,7 +43,7 @@ public class PluginOperateUtils {
PluginMarker marker = updateMarker2Online ( pluginMarker ) ;
PluginMarker marker = updateMarker2Online ( pluginMarker ) ;
//下载插件
//下载插件
PluginTask pluginTask = PluginTask . installTask ( marker ) ;
PluginTask pluginTask = PluginTask . installTask ( marker ) ;
PluginControllerHelper . installOnline ( pluginMarker , new InstallOnlineCallback ( pluginTask , jsCallback ) ) ;
PluginControllerHelper . installOnline ( pluginMarker , new InstallOnlineCallback ( pluginTask , jsCallback ) , PluginExtraInfo . newBuilder ( ) . username ( DesignerEnvManager . getEnvManager ( ) . getDesignerLoginUsername ( ) ) . build ( ) ) ;
}
}
public static PluginMarker updateMarker2Online ( PluginMarker pluginMarker ) {
public static PluginMarker updateMarker2Online ( PluginMarker pluginMarker ) {
@ -76,7 +77,7 @@ public class PluginOperateUtils {
//当前已经安装的相同ID插件marker
//当前已经安装的相同ID插件marker
PluginMarker currentMarker = PluginMarkerAdapter . create ( PluginUtils . getInstalledPluginMarkerByID ( pluginMarker . getPluginID ( ) ) , pluginName ) ;
PluginMarker currentMarker = PluginMarkerAdapter . create ( PluginUtils . getInstalledPluginMarkerByID ( pluginMarker . getPluginID ( ) ) , pluginName ) ;
PluginTask pluginTask = PluginTask . updateTask ( currentMarker , toPluginMarker ) ;
PluginTask pluginTask = PluginTask . updateTask ( currentMarker , toPluginMarker ) ;
PluginControllerHelper . updateOnline ( currentMarker , toPluginMarker , new UpdateOnlineCallback ( pluginTask , jsCallback ) ) ;
PluginControllerHelper . updateOnline ( currentMarker , toPluginMarker , new UpdateOnlineCallback ( pluginTask , jsCallback ) , PluginExtraInfo . newBuilder ( ) . username ( DesignerEnvManager . getEnvManager ( ) . getDesignerLoginUsername ( ) ) . build ( ) ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
}
}