本文整理汇总了Java中jetbrains.buildServer.serverSide.SProject.getParentProject方法的典型用法代码示例。如果您正苦于以下问题:Java SProject.getParentProject方法的具体用法?Java SProject.getParentProject怎么用?Java SProject.getParentProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.serverSide.SProject
的用法示例。
在下文中一共展示了SProject.getParentProject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getServersMap
import jetbrains.buildServer.serverSide.SProject; //导入方法依赖的package包/类
private Map<SProject, List<DebRepositoryConfigAndStatsWrapper>> getServersMap(@NotNull final SProject currentProject) {
SProject project = currentProject;
Map<SProject, List<DebRepositoryConfigAndStatsWrapper>> reposMap = new HashMap<SProject, List<DebRepositoryConfigAndStatsWrapper>>();
while (project != null) {
if (reposMap.containsKey(project)) {
break;
}
final List<DebRepositoryConfigAndStatsWrapper> infoPack = new ArrayList<>();
for (DebRepositoryConfiguration config :this.myDebRepositoryConfigManager.getConfigurationsForProject(project.getProjectId())) {
infoPack.add(new DebRepositoryConfigAndStatsWrapper(
config,
myDebRepositoryManager.getRepositoryStatistics(
config,
StringUtils.getDebRepoUrl(
myServer.getRootUrl(),
config.getRepoName(),
config.isRestricted()
)
)
)
);
}
if (!infoPack.isEmpty()) {
reposMap.put(project, infoPack);
}
project = project.getParentProject();
}
return reposMap;
}
示例2: getServersMap
import jetbrains.buildServer.serverSide.SProject; //导入方法依赖的package包/类
private Map<SProject, List<SQSInfo>> getServersMap(@NotNull final SProject currentProject) {
SProject project = currentProject;
Map<SProject, List<SQSInfo>> infoMap = new HashMap<SProject, List<SQSInfo>>();
while (project != null) {
if (infoMap.containsKey(project)) {
break;
}
final List<SQSInfo> availableServers = mySqsManager.getOwnAvailableServers(project);
if (!availableServers.isEmpty()) {
infoMap.put(project, availableServers);
}
project = project.getParentProject();
}
return infoMap;
}