service接口类
This commit is contained in:
parent
b6ba0e0fdb
commit
13c1b27414
@ -0,0 +1,11 @@
|
|||||||
|
package cd.casic.module.process.home.service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface HomeCountService {
|
||||||
|
|
||||||
|
|
||||||
|
Map<String,Object> findCount();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package cd.casic.module.process.pipeline.definition;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.PipelineFollow;
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.PipelineFollowQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线收藏服务接口
|
||||||
|
*/
|
||||||
|
public interface PipelineFollowService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建收藏
|
||||||
|
* @param pipelineFollow 收藏模型
|
||||||
|
*/
|
||||||
|
void updateFollow(PipelineFollow pipelineFollow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户收藏的流水线
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return 收藏的流水线
|
||||||
|
*/
|
||||||
|
List<PipelineFollow> findUserFollowPipeline(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询
|
||||||
|
* @param followQuery 条件
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
List<PipelineFollow> findFollowQueryList(PipelineFollowQuery followQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收藏
|
||||||
|
* @param followId 收藏id
|
||||||
|
*/
|
||||||
|
void deleteFollow(String followId);
|
||||||
|
|
||||||
|
|
||||||
|
void deletePipelineFollow(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个信息
|
||||||
|
* @param followId 收藏id
|
||||||
|
* @return 收藏信息
|
||||||
|
*/
|
||||||
|
PipelineFollow findOneFollow(String followId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有收藏
|
||||||
|
* @return 收藏集合
|
||||||
|
*/
|
||||||
|
List<PipelineFollow> findAllFollow();
|
||||||
|
|
||||||
|
List<PipelineFollow> findAllFollowList(List<String> idList);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package cd.casic.module.process.pipeline.definition;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.PipelineOpen;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线最近打开服务接口
|
||||||
|
*/
|
||||||
|
// todo
|
||||||
|
//@JoinProvider(model = PipelineOpen.class)
|
||||||
|
public interface PipelineOpenService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户最近打开流水线(详细信息)
|
||||||
|
* @param number 查询数量
|
||||||
|
* @return 最近打开的流水线
|
||||||
|
*/
|
||||||
|
List<PipelineOpen> findUserAllOpen(int number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户最近打开流水线
|
||||||
|
* @param number 查询数量
|
||||||
|
* @return 最近打开的流水线
|
||||||
|
*/
|
||||||
|
List<String> findUserOpen(int number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线收藏
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void deleteAllOpen(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取打开的流水线
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void updatePipelineOpen(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个次数信息
|
||||||
|
* @param openId 次数id
|
||||||
|
* @return 次数信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
PipelineOpen findOneOpen(String openId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有次数
|
||||||
|
* @return 次数集合
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<PipelineOpen> findAllOpen();
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<PipelineOpen> findAllOpenList(List<String> idList);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,165 @@
|
|||||||
|
package cd.casic.module.process.pipeline.definition;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.Pipeline;
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.PipelineQuery;
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.PipelineRecently;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = Pipeline.class)
|
||||||
|
public interface PipelineService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线
|
||||||
|
* @param pipeline 流水线信息
|
||||||
|
* @return 流水线id
|
||||||
|
*/
|
||||||
|
String createPipeline(@NotNull @Valid Pipeline pipeline);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void deletePipeline(@NotNull String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线
|
||||||
|
* @param pipeline 更新后流水线信息
|
||||||
|
*/
|
||||||
|
void updatePipeline(@NotNull @Valid Pipeline pipeline);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个流水线
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 流水线信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
Pipeline findPipelineById(@NotNull String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
Pipeline findPipelineByIdNoQuery(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 该接口返回用户流水线
|
||||||
|
* @param pipelineId 流水线Id
|
||||||
|
* @return 流水线
|
||||||
|
*/
|
||||||
|
Pipeline findOnePipeline(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 该接口返回用户流水线
|
||||||
|
* @param pipelineId 流水线Id
|
||||||
|
* @return 流水线
|
||||||
|
*/
|
||||||
|
Pipeline findPipelineNoQuery(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有流水线
|
||||||
|
* @return 流水线列表
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<Pipeline> findAllPipeline();
|
||||||
|
|
||||||
|
|
||||||
|
List<Pipeline> findAllPipelineNoQuery();
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<Pipeline> findAllPipelineList(List<String> idList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户流水线
|
||||||
|
* @return 流水线信息
|
||||||
|
*/
|
||||||
|
List<Pipeline> findUserPipeline(PipelineQuery query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询流水线信息
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 流水线信息
|
||||||
|
*/
|
||||||
|
PageResult<Pipeline> findUserPipelinePage(PipelineQuery query);
|
||||||
|
|
||||||
|
|
||||||
|
List<Pipeline> findPipelineList(PipelineQuery query);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询拥有此流水线的用户
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 用户信息
|
||||||
|
*/
|
||||||
|
// todo 当前系统不知道有无用户先注释掉
|
||||||
|
// List<User> findPipelineUser(String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前用户最近构建的流水线
|
||||||
|
* @return 流水线信息
|
||||||
|
*/
|
||||||
|
List<PipelineRecently> findPipelineRecently(String userId, int number);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取clone的流水线名称
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 流水线民初
|
||||||
|
*/
|
||||||
|
String findPipelineCloneName(String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线克隆
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void pipelineClone(String pipelineId,String pipelineName);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最近打开的流水线
|
||||||
|
* @param number 数量
|
||||||
|
* @return 流水线
|
||||||
|
*/
|
||||||
|
List<Pipeline> findRecentlyPipeline(Integer number,String pipelineId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
package cd.casic.module.process.pipeline.definition;
|
||||||
|
|
||||||
|
public interface PipelineYamlService {
|
||||||
|
|
||||||
|
String importPipelineYaml(String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package cd.casic.module.process.pipeline.execute.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.engine.execute.PipelineRunMsg;
|
||||||
|
import cd.casic.ci.commons.bean.process.instance.PipelineInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线运行服务接口
|
||||||
|
*/
|
||||||
|
public interface PipelineExecService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始构建
|
||||||
|
*
|
||||||
|
* @param runMsg 流水线id
|
||||||
|
// * @param startWAy 执行方式(1.手动执行 2.定时器触发)
|
||||||
|
* @return 开始构建(true:开始运行 false:正在运行)
|
||||||
|
*/
|
||||||
|
PipelineInstance start(PipelineRunMsg runMsg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止流水线运行
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void stop(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保持运行
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void keepOn(String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.module.process.pipeline.overview.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.support.count.PipelineOverview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线统计服务接口
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface PipelineOverviewService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线执行信息统计
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 统计信息
|
||||||
|
*/
|
||||||
|
PipelineOverview pipelineOverview(String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostGroupDetails;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zcamy
|
||||||
|
*/
|
||||||
|
//TODO
|
||||||
|
//@JoinProvider(model = AuthHostGroupDetails.class)
|
||||||
|
public interface AuthHostGroupDetailsService {
|
||||||
|
|
||||||
|
|
||||||
|
String creatHostGroupDetails(AuthHostGroupDetails hostGroupDetails) ;
|
||||||
|
|
||||||
|
|
||||||
|
void updateHostGroupDetails(AuthHostGroupDetails hostGroupDetails) ;
|
||||||
|
|
||||||
|
|
||||||
|
void deleteHostGroupDetails(String groupDetailsId) ;
|
||||||
|
|
||||||
|
// @FindOne
|
||||||
|
AuthHostGroupDetails findOneHostGroupDetails(String groupDetailsId) ;
|
||||||
|
|
||||||
|
// @FindAll
|
||||||
|
List<AuthHostGroupDetails> findAllHostGroupDetails() ;
|
||||||
|
|
||||||
|
|
||||||
|
List<AuthHostGroupDetails> findHostGroupDetailsList(String groupId) ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostGroup;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostGroupQuery;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.HostGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zcamy
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface AuthHostGroupService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建主机组
|
||||||
|
* @param hostGroup hostGroup
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
String creatHostGroup(AuthHostGroup hostGroup) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主机组
|
||||||
|
* @param hostGroup hostGroup
|
||||||
|
*/
|
||||||
|
void updateHostGroup(AuthHostGroup hostGroup) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除主机组
|
||||||
|
* @param groupId groupId
|
||||||
|
*/
|
||||||
|
void deleteHostGroup(String groupId) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找主机组
|
||||||
|
* @param groupId groupId
|
||||||
|
* @return hostGroup
|
||||||
|
*/
|
||||||
|
AuthHostGroup findOneHostGroup(String groupId) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找主机组
|
||||||
|
* @param groupId groupId
|
||||||
|
* @param strategyNumber strategyNumber
|
||||||
|
* @param strategyType strategyType
|
||||||
|
* @return hostGroup
|
||||||
|
*/
|
||||||
|
List<HostGroup> findOneHostGroupByGroup(String groupId, Integer strategyNumber, String strategyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找主机组
|
||||||
|
* @return hostGroup
|
||||||
|
*/
|
||||||
|
List<AuthHostGroup> findAllHostGroup() ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找主机组
|
||||||
|
* @param groupQuery groupQuery
|
||||||
|
* @return hostGroup
|
||||||
|
*/
|
||||||
|
List<AuthHostGroup> findHostGroupList(AuthHostGroupQuery groupQuery) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找主机组数量
|
||||||
|
* @return count
|
||||||
|
*/
|
||||||
|
Integer findHostGroupNumber();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostK8s;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostK8sQuery;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线主机认证服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = AuthHostK8s.class)
|
||||||
|
public interface AuthHostK8sService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线主机授权
|
||||||
|
* @param authHostK8s 流水线主机授权
|
||||||
|
* @return 流水线主机授权id
|
||||||
|
*/
|
||||||
|
String createAuthHostK8s(AuthHostK8s authHostK8s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线主机授权
|
||||||
|
* @param authHostK8sId 流水线主机授权id
|
||||||
|
*/
|
||||||
|
void deleteAuthHostK8s(String authHostK8sId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主机授权信息
|
||||||
|
* @param authHostK8s 信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
void updateAuthHostK8s(AuthHostK8s authHostK8s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询主机授权信息
|
||||||
|
* @param authHostK8sId id
|
||||||
|
* @return 信息
|
||||||
|
*/
|
||||||
|
AuthHostK8s findOneAuthHostK8s(String authHostK8sId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置
|
||||||
|
* @param hostQuery 类型
|
||||||
|
* @return 配置
|
||||||
|
*/
|
||||||
|
List<AuthHostK8s> findAuthHostK8sList(AuthHostK8sQuery hostQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有流水线主机授权
|
||||||
|
* @return 流水线主机授权列表
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<AuthHostK8s> findAllAuthHostK8s();
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<AuthHostK8s> findAllAuthHostK8sList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
PageResult<AuthHostK8s> findAuthHostK8sPage(AuthHostK8sQuery hostQuery);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findHostNumber();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHost;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthHostQuery;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线主机认证服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = AuthHost.class)
|
||||||
|
public interface AuthHostService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线主机授权
|
||||||
|
* @param authHost 流水线主机授权
|
||||||
|
* @return 流水线主机授权id
|
||||||
|
*/
|
||||||
|
String createAuthHost(AuthHost authHost);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线主机授权
|
||||||
|
* @param authHostId 流水线主机授权id
|
||||||
|
*/
|
||||||
|
void deleteAuthHost(String authHostId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主机授权信息
|
||||||
|
* @param authHost 信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
void updateAuthHost(AuthHost authHost);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询主机授权信息
|
||||||
|
* @param authHostId id
|
||||||
|
* @return 信息
|
||||||
|
*/
|
||||||
|
AuthHost findOneAuthHost(String authHostId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流水线主机授权
|
||||||
|
* @param hostQuery 查询条件
|
||||||
|
* @return 流水线主机授权列表
|
||||||
|
*/
|
||||||
|
List<AuthHost> findAuthHostList(AuthHostQuery hostQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有流水线主机授权
|
||||||
|
* @return 流水线主机授权列表
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<AuthHost> findAllAuthHost();
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<AuthHost> findAllAuthHostList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
PageResult<AuthHost> findAuthHostPage(AuthHostQuery hostQuery);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findHostNumber();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.Auth;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线基本认证服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = Auth.class)
|
||||||
|
public interface AuthService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线基本认证
|
||||||
|
* @param auth 流水线基本认证
|
||||||
|
* @return 流水线基本认证id
|
||||||
|
*/
|
||||||
|
String createAuth(Auth auth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线基本认证
|
||||||
|
* @param authId 流水线基本认证id
|
||||||
|
*/
|
||||||
|
void deleteAuth(String authId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新基本认证信息
|
||||||
|
* @param auth 信息
|
||||||
|
*/
|
||||||
|
void updateAuth(Auth auth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询基本认证信息
|
||||||
|
* @param authId id
|
||||||
|
* @return 信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
Auth findOneAuth(String authId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有流水线基本认证
|
||||||
|
* @return 流水线基本认证列表
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<Auth> findAllAuth();
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<Auth> findAllAuthList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findAuthNumber();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthThird;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.AuthThirdQuery;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线第三方认证服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = AuthThird.class)
|
||||||
|
public interface AuthThirdService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线第三方授权
|
||||||
|
* @param authThird 流水线第三方授权
|
||||||
|
* @return 流水线第三方授权id
|
||||||
|
*/
|
||||||
|
String createAuthServer(AuthThird authThird);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线第三方授权
|
||||||
|
* @param authServerId 流水线第三方授权id
|
||||||
|
*/
|
||||||
|
void deleteAuthServer(String authServerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新第三方授权信息
|
||||||
|
* @param authThird 信息
|
||||||
|
*/
|
||||||
|
void updateAuthServer(AuthThird authThird);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询第三方授权信息
|
||||||
|
* @param authServerId id
|
||||||
|
* @return 信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
AuthThird findOneAuthServer(String authServerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流水线第三方授权
|
||||||
|
* @param thirdQuery 查询条件
|
||||||
|
* @return 流水线第三方授权列表
|
||||||
|
*/
|
||||||
|
List<AuthThird> findAuthServerList(AuthThirdQuery thirdQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询流水线第三方授权
|
||||||
|
* @param thirdQuery 查询条件
|
||||||
|
* @return 分页流水线第三方授权
|
||||||
|
*/
|
||||||
|
PageResult<AuthThird> findAuthServerPage(AuthThirdQuery thirdQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有流水线第三方授权
|
||||||
|
* @return 流水线第三方授权列表
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<AuthThird> findAllAuthServer();
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<AuthThird> findAllAuthServerList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findAuthServerNumber();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
import io.tiklab.arbess.setting.model.Cache;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface CacheService {
|
||||||
|
|
||||||
|
|
||||||
|
String createCathe(Cache cache);
|
||||||
|
|
||||||
|
void updateCathe(Cache cache);
|
||||||
|
|
||||||
|
void deleteCathe(String cacheId);
|
||||||
|
|
||||||
|
Cache findCathe(String cacheId);
|
||||||
|
|
||||||
|
|
||||||
|
List<Cache> findAllCathe();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.Env;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.EnvQuery;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
//@JoinProvider(model = Env.class)
|
||||||
|
public interface EnvService {
|
||||||
|
|
||||||
|
String createEnv(Env env);
|
||||||
|
|
||||||
|
void updateEnv(Env env);
|
||||||
|
|
||||||
|
|
||||||
|
void deleteEnv(String envId);
|
||||||
|
|
||||||
|
// @FindOne
|
||||||
|
Env findOneEnv(String envId);
|
||||||
|
|
||||||
|
// @FindAll
|
||||||
|
List<Env> findAllEnv();
|
||||||
|
|
||||||
|
|
||||||
|
List<Env> findEnvList(EnvQuery envQuery);
|
||||||
|
|
||||||
|
|
||||||
|
PageResult<Env> findEnvPage(EnvQuery envQuery);
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<Env> findAllEnvList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findEnvNumber();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.Group;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.GroupQuery;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
//@JoinProvider(model = Group.class)
|
||||||
|
public interface GroupService {
|
||||||
|
|
||||||
|
String createGroup(Group group);
|
||||||
|
|
||||||
|
void updateGroup(Group group);
|
||||||
|
|
||||||
|
void deleteGroup(String groupId);
|
||||||
|
|
||||||
|
// @FindOne
|
||||||
|
Group findOneGroup(String groupId);
|
||||||
|
|
||||||
|
// @FindAll
|
||||||
|
List<Group> findAllGroup();
|
||||||
|
|
||||||
|
List<Group> findGroupList(GroupQuery groupQuery);
|
||||||
|
|
||||||
|
|
||||||
|
PageResult<Group> findGroupPage(GroupQuery groupQuery);
|
||||||
|
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<Group> findAllGroupList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findGroupNumber();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.Resources;
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.ResourcesDetails;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ResourcesService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新资源使用情况
|
||||||
|
*/
|
||||||
|
void instanceResources(int time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断资源情况
|
||||||
|
*/
|
||||||
|
void judgeResources();
|
||||||
|
|
||||||
|
|
||||||
|
String createResources(Resources resources);
|
||||||
|
|
||||||
|
void updateResources(Resources resources);
|
||||||
|
|
||||||
|
|
||||||
|
void deleteResources(String resourcesId);
|
||||||
|
|
||||||
|
Resources findOneResources(String resourcesId);
|
||||||
|
|
||||||
|
List<Resources> findAllResources();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询资源使用情况
|
||||||
|
* @return 使用情况
|
||||||
|
*/
|
||||||
|
Resources findResourcesList();
|
||||||
|
|
||||||
|
|
||||||
|
ResourcesDetails findResourcesDetails(String type);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.Scm;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 流水线环境配置服务接口
|
||||||
|
*/
|
||||||
|
public interface ScmService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建环境配置
|
||||||
|
* @param scm 环境配置模型
|
||||||
|
* @return 环境配置id
|
||||||
|
*/
|
||||||
|
String createPipelineScm(Scm scm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除环境配置
|
||||||
|
* @param scmId 配置id
|
||||||
|
*/
|
||||||
|
void deletePipelineScm(String scmId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新环境配置
|
||||||
|
* @param scm 配置模型
|
||||||
|
*/
|
||||||
|
void updatePipelineScm(Scm scm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个环境配置
|
||||||
|
* @param scmId 环境配置id
|
||||||
|
* @return 环境配置模型
|
||||||
|
*/
|
||||||
|
Scm findOnePipelineScm(String scmId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有环境配置
|
||||||
|
* @return 环境配置模型列表
|
||||||
|
*/
|
||||||
|
List<Scm> findAllPipelineScm();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据获取配置
|
||||||
|
* @param type 类型
|
||||||
|
* @return 配置信息
|
||||||
|
*/
|
||||||
|
Scm findOnePipelineScm(int type);
|
||||||
|
|
||||||
|
List<Scm> selectPipelineScmList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
Integer findScmNumber();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cd.casic.module.process.setting.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.setting.SystemMassage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线系统信息服务接口
|
||||||
|
*/
|
||||||
|
public interface SystemMassageService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统信息
|
||||||
|
* @return 系统信息
|
||||||
|
*/
|
||||||
|
SystemMassage getSystemMassage();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package cd.casic.module.process.stages.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.engine.execute.PipelineDetails;
|
||||||
|
import cd.casic.ci.commons.bean.process.stage.Stage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阶段执行服务接口
|
||||||
|
*/
|
||||||
|
public interface StageExecService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建阶段运行实例
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @param instanceId 流水线实例id
|
||||||
|
*/
|
||||||
|
List<Stage> createStageExecInstance(String pipelineId , String instanceId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行流水线阶段
|
||||||
|
* @param pipelineDetails 流水线执行详情
|
||||||
|
* @return 阶段运行状态
|
||||||
|
*/
|
||||||
|
boolean execStageTask(PipelineDetails pipelineDetails);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package cd.casic.module.process.stages.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.stage.StageInstance;
|
||||||
|
import cd.casic.ci.commons.bean.process.stage.StageInstanceQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阶段运行实例服务接口
|
||||||
|
*/
|
||||||
|
public interface StageInstanceServer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建阶段运行实例
|
||||||
|
* @param stageInstance 实例模型
|
||||||
|
* @return 运行实例模型
|
||||||
|
*/
|
||||||
|
String createStageInstance(StageInstance stageInstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除所有流水线实例下的阶段运行实例
|
||||||
|
* @param instanceId 流水线实例id
|
||||||
|
*/
|
||||||
|
void deleteAllMainStageInstance(String instanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看完整日志
|
||||||
|
* @param instanceId 示例ID
|
||||||
|
* @return 日志
|
||||||
|
*/
|
||||||
|
List<String> findAllStageInstanceLogs(String instanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新阶段实例内容
|
||||||
|
* @param stageInstance 实例模型
|
||||||
|
*/
|
||||||
|
void updateStageInstance(StageInstance stageInstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个阶段运行实例
|
||||||
|
* @param stageInstanceId 阶段运行实例id
|
||||||
|
* @return 阶段运行实例模型
|
||||||
|
*/
|
||||||
|
StageInstance findOneStageInstance(String stageInstanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流水线运行实例下的所有阶段运行实例
|
||||||
|
* @param instanceId 流水线运行实例id
|
||||||
|
* @return 阶段运行实例
|
||||||
|
*/
|
||||||
|
List<StageInstance> findMainStageInstance(String instanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询主阶段实例下的所有运行实例
|
||||||
|
* @param mainStageId 主阶段id
|
||||||
|
* @return 运行实例
|
||||||
|
*/
|
||||||
|
List<StageInstance> findOtherStageInstance(String mainStageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询阶段运行实例
|
||||||
|
* @param instanceId 流水线实例id
|
||||||
|
* @return 阶段运行实例
|
||||||
|
*/
|
||||||
|
List<StageInstance> findStageExecInstance(String instanceId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<StageInstance> findStageInstanceList(StageInstanceQuery query);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,165 @@
|
|||||||
|
package cd.casic.module.process.stages.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.stage.Stage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线阶段服务接口
|
||||||
|
*/
|
||||||
|
//@JoinProvider(model = Stage.class)
|
||||||
|
public interface StageService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建阶段及关联任务
|
||||||
|
* @param stage 阶段信息
|
||||||
|
* @return 阶段id
|
||||||
|
*/
|
||||||
|
String createStagesOrTask(Stage stage);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建阶段模板
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @param template 模板
|
||||||
|
*/
|
||||||
|
void createStageTemplate(String pipelineId,String[] template);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 克隆阶段任务
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void cloneStage(String pipelineId,String clonePipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有阶段任务以及任务详情
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 任务
|
||||||
|
*/
|
||||||
|
List<Stage> findAllStagesOrTask(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有阶段任务
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 任务
|
||||||
|
*/
|
||||||
|
List<Stage> findAllStagesTask(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除阶段及任务
|
||||||
|
* @param taskId 配置id
|
||||||
|
*/
|
||||||
|
void deleteStagesOrTask(String taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线所有阶段
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void deleteAllStagesOrTask(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新阶段名称
|
||||||
|
* @param stage 阶段
|
||||||
|
*/
|
||||||
|
void updateStageName(Stage stage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有阶段的根节点
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 主分支
|
||||||
|
*/
|
||||||
|
List<Stage> findAllMainStage(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据根节点查询从节点
|
||||||
|
* @param stagesId 根节点id
|
||||||
|
* @return 从节点列表
|
||||||
|
*/
|
||||||
|
List<Stage> findOtherStage(String stagesId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新阶段任务
|
||||||
|
* @param stage 更新内容
|
||||||
|
*/
|
||||||
|
void updateStagesTask(Stage stage);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 效验阶段配置必填字段
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 配置id集合
|
||||||
|
*/
|
||||||
|
List<String> validStagesMustField(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建阶段
|
||||||
|
* @param stage 阶段信息
|
||||||
|
* @return 阶段id
|
||||||
|
*/
|
||||||
|
String createStages(Stage stage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新阶段
|
||||||
|
* @param stage 阶段信息
|
||||||
|
*/
|
||||||
|
void updateStages(Stage stage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除阶段
|
||||||
|
* @param stageId 阶段id
|
||||||
|
*/
|
||||||
|
void deleteStages(String stageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个阶段
|
||||||
|
* @param stageId 阶段id
|
||||||
|
* @return 阶段信息
|
||||||
|
*/
|
||||||
|
// @FindOne
|
||||||
|
Stage findOneStages(String stageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有阶段
|
||||||
|
* @return 阶段信息集合
|
||||||
|
*/
|
||||||
|
// @FindAll
|
||||||
|
List<Stage> findAllStages();
|
||||||
|
|
||||||
|
// @FindList
|
||||||
|
List<Stage> findAllStagesList(List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
package cd.casic.module.process.support.authority.service;
|
||||||
|
|
||||||
|
//import io.tiklab.arbess.pipeline.definition.model.Pipeline;
|
||||||
|
//import io.tiklab.privilege.role.model.PatchUser;
|
||||||
|
//import io.tiklab.user.user.model.User;
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.Pipeline;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线项目权限服务接口
|
||||||
|
*/
|
||||||
|
public interface PipelineAuthorityService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户拥有的流水线
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return 流水线支付串集合
|
||||||
|
*/
|
||||||
|
String[] findUserPipelineIdString(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取拥有此流水线的用户
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @return 用户信息
|
||||||
|
*/
|
||||||
|
// List<User> findPipelineUser(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户拥有的流水线
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return 流水线
|
||||||
|
*/
|
||||||
|
List<Pipeline> findUserPipeline(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新项目域权限
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
void deleteDmUser(String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线关联用户
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
*/
|
||||||
|
//TODO 不知道用户需不需要
|
||||||
|
// void createDmUser(String pipelineId,String createUserId, List<PatchUser> userList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 克隆项目角色
|
||||||
|
* @param sourceDomainId 原来的流水线ID
|
||||||
|
* @param cloneDomainId 克隆的流水线ID
|
||||||
|
*/
|
||||||
|
void cloneDomainRole(String sourceDomainId,String cloneDomainId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package cd.casic.module.process.support.condition.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.commons.bean.process.definition.Condition;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 流水线变量服务接口
|
||||||
|
*/
|
||||||
|
public interface ConditionService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建条件
|
||||||
|
* @param condition 条件
|
||||||
|
* @return 条件id
|
||||||
|
*/
|
||||||
|
String createCond(Condition condition);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 效验条件
|
||||||
|
* @param pipelineId 流水线id
|
||||||
|
* @param taskId 配置id
|
||||||
|
* @return 状态 true:条件满足 false:条件不满足
|
||||||
|
*/
|
||||||
|
Boolean variableCondition(String pipelineId,String taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除条件
|
||||||
|
* @param condId 条件id
|
||||||
|
*/
|
||||||
|
void deleteCond(String condId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新条件
|
||||||
|
* @param condition 条件信息
|
||||||
|
*/
|
||||||
|
void updateCond(Condition condition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单个条件
|
||||||
|
* @param condId 条件id
|
||||||
|
* @return 条件信息
|
||||||
|
*/
|
||||||
|
Condition findOneCond(String condId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询任务条件
|
||||||
|
* @param taskId 任务id
|
||||||
|
* @return 条件集合
|
||||||
|
*/
|
||||||
|
List<Condition> findAllTaskCond(String taskId);
|
||||||
|
|
||||||
|
|
||||||
|
// 克隆条件
|
||||||
|
void cloneCond(String id ,String cloneId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user