use of com.thoughtworks.go.domain.MergedTestArtifactPlan in project gocd by gocd.
the class ArtifactPlanFilter method getBuiltInMergedArtifactPlans.
public List<ArtifactPlan> getBuiltInMergedArtifactPlans(List<ArtifactPlan> artifactPlans) {
MergedTestArtifactPlan testArtifactPlan = null;
final List<ArtifactPlan> mergedPlans = new ArrayList<>();
for (ArtifactPlan artifactPlan : artifactPlans) {
if (artifactPlan.getArtifactPlanType().isTest()) {
if (testArtifactPlan == null) {
testArtifactPlan = new MergedTestArtifactPlan(artifactPlan);
mergedPlans.add(testArtifactPlan);
} else {
testArtifactPlan.add(artifactPlan);
}
} else if (artifactPlan.getArtifactPlanType() == ArtifactPlanType.file) {
mergedPlans.add(artifactPlan);
}
}
return mergedPlans;
}
Aggregations