3 changed files with 81 additions and 2 deletions
@ -0,0 +1,81 @@ |
|||||||
|
package com.fr.design.update.processor; |
||||||
|
|
||||||
|
import com.fr.decision.update.data.UpdateConstants; |
||||||
|
import com.fr.decision.update.info.UpdateCallBack; |
||||||
|
import com.fr.plugin.context.PluginMarker; |
||||||
|
import com.fr.stable.ProjectLibrary; |
||||||
|
import com.fr.stable.StableUtils; |
||||||
|
import com.fr.stable.fun.mark.Immutable; |
||||||
|
import com.fr.stable.project.ProjectConstants; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Set; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @author shengzu.xue |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2025/5/15 15:27 |
||||||
|
* jar更新接口 |
||||||
|
*/ |
||||||
|
public interface SyncProcessor extends Immutable { |
||||||
|
String XML_TAG = "SyncProcessor"; |
||||||
|
int CURRENT_LEVEL = 1; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 同步文件保存的路径 |
||||||
|
*/ |
||||||
|
String DESIGNER_JARS_PATH = StableUtils.pathJoin(StableUtils.getInstallHome(), |
||||||
|
ProjectConstants.LOGS_NAME, UpdateConstants.INSTALL_LIB, UpdateConstants.DOWNLOADPATH); |
||||||
|
String COMMON_JARS_PATH = StableUtils.pathJoin(ProjectLibrary.getInstance().getLibHome(), |
||||||
|
ProjectConstants.ASSIST_NAME, UpdateConstants.ENV_LIB, UpdateConstants.DOWNLOADPATH); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 同步类型 |
||||||
|
*/ |
||||||
|
enum SyncType { |
||||||
|
/** |
||||||
|
* 插件同步 |
||||||
|
*/ |
||||||
|
PLUGIN_SYNC, |
||||||
|
/** |
||||||
|
* 主jar同步 |
||||||
|
*/ |
||||||
|
JAR_SYNC |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 执行更新, 会将需要同步的文件保存到指定的路径 |
||||||
|
* |
||||||
|
* @param callBack 回调,用于更新进度UI |
||||||
|
* @param fullBuildNo 全量版本号 |
||||||
|
* @return 是否更新成功 |
||||||
|
*/ |
||||||
|
boolean executeJarSync(UpdateCallBack callBack, String fullBuildNo, String designerJarsPath, String commonJarsPath); |
||||||
|
|
||||||
|
/** |
||||||
|
* 执行插件同步 |
||||||
|
* |
||||||
|
* @param differentPlugins 本地与服务端不同的插件信息 |
||||||
|
* <p> |
||||||
|
* /** |
||||||
|
* 执行插件同步 |
||||||
|
* @param differentPlugins 不同的插件信息 |
||||||
|
* @return 返回失败的插件信息 |
||||||
|
*/ |
||||||
|
List<PluginMarker> executePluginSync(List<PluginMarker> differentPlugins); |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取支持的同步类型 |
||||||
|
* 如果不支持任何类型, 则返回空集 |
||||||
|
* 对于实现支持的类型 会按照类中实现逻辑进行同步 |
||||||
|
* 对于不支持的类型 会使用默认实现进行同步 |
||||||
|
* |
||||||
|
* @return 支持的同步类型 |
||||||
|
* @see SyncProcessor.SyncType |
||||||
|
*/ |
||||||
|
Set<SyncType> supportedSyncType(); |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue