use of org.jfrog.build.api.builder.dependency.BuildPatternArtifactsRequestBuilder in project build-info by JFrogDev.
the class BuildDependenciesHelper method toArtifactsRequests.
private List<BuildPatternArtifactsRequest> toArtifactsRequests(Map<String, Map<String, List<BuildDependencyPattern>>> dependencyPatterns) {
List<BuildPatternArtifactsRequest> artifactsRequests = Lists.newLinkedList();
for (String buildName : dependencyPatterns.keySet()) {
Map<String, List<BuildDependencyPattern>> buildNumbers = dependencyPatterns.get(buildName);
for (String buildNumber : buildNumbers.keySet()) {
List<BuildDependencyPattern> buildDependencyPatterns = buildNumbers.get(buildNumber);
BuildPatternArtifactsRequestBuilder builder = new BuildPatternArtifactsRequestBuilder().buildName(buildName).buildNumber(buildNumber);
for (BuildDependencyPattern buildDependencyPattern : buildDependencyPatterns) {
builder.pattern(buildDependencyPattern.getPattern());
}
artifactsRequests.add(builder.build());
}
}
return artifactsRequests;
}
Aggregations