@Override public CompletableFuture<Set<ProductArtifacts>> getArtifacts(GA ga, ProductSupportStatus status) { return CompletableFuture.supplyAsync(() -> getArtifacts(ga.getGroupId(), ga.getArtifactId(), Optional.of(status))); }
public String getArtifactId() { return ga.getArtifactId(); }
public String getGroupId() { return ga.getGroupId(); }
@JsonCreator public GAV(@JsonProperty("groupId") String groupId, @JsonProperty("artifactId") String artifactId, @JsonProperty("version") String version) { this.ga = new GA(groupId, artifactId); this.version = Objects.requireNonNull(version); }
private Stream<String> getVersionsStream(GA ga) { if (!ga.isValid()) { log.warn("Received nonvalid GA: " + ga); return Stream.empty(); } try { return aproxConnector.getVersionsOfGA(ga).stream() .filter(v -> versionParser.parse(v).isSuffixed()) .distinct(); } catch (CommunicationException ex) { throw new ProductException(ex); } }
@Override public int compareTo(GAV o) { int gaCmp = this.ga.compareTo(o.ga); if (gaCmp == 0) { return DummyVersionComparator.compareVersions(this.version, o.version); } else { return gaCmp; } } }
public String getArtifactId() { return ga.getArtifactId(); }
public String getGroupId() { return ga.getGroupId(); }
@JsonCreator public GADiff(@JsonProperty("groupId") String groupId, @JsonProperty("artifactId") String artifactId, @JsonProperty("leftVersion") String leftVersion, @JsonProperty("rightVersion") String rightVersion, @JsonProperty("differenceType") String differenceType) { this.ga = new GA(groupId, artifactId); this.leftVersion = leftVersion; this.rightVersion = rightVersion; this.differenceType = differenceType; }
private Stream<String> getVersionsStream(GA ga, String repository) { if (!ga.isValid()) { log.warn("Received nonvalid GA: " + ga); return Stream.empty(); } try { return aproxConnector.getVersionsOfGA(ga, repository).stream() .filter(v -> versionParser.parse(v).isSuffixed()) .distinct(); } catch (CommunicationException ex) { throw new ProductException(ex); } }
@Override public int compareTo(GADiff o) { int gaCmp = this.ga.compareTo(o.ga); if (gaCmp != 0) { return gaCmp; } gaCmp = DummyVersionComparator.compareVersions(this.leftVersion, o.leftVersion); if (gaCmp != 0) { return gaCmp; } return DummyVersionComparator.compareVersions(this.rightVersion, o.rightVersion); }
@Override public CompletableFuture<Set<ProductArtifacts>> getArtifacts(GA ga) { return CompletableFuture.supplyAsync(() -> getArtifacts(ga.getGroupId(), ga.getArtifactId(), Optional.empty())); }
new org.jboss.da.model.rest.GA(ga.getGroupId(), ga.getArtifactId()), rightVersion, difference);
@Override public CompletableFuture<Map<Product, Set<String>>> getVersions(GA ga) { return CompletableFuture.supplyAsync(() -> getArtifacts(ga.getGroupId(), ga.getArtifactId(), Optional.empty()).stream() .collect(Collectors.toMap(ProductArtifacts::getProduct, x -> x.getArtifacts().stream() .map(y -> y.getGav().getVersion()) .collect(Collectors.toSet())))); }
query.append("/api/group/"); query.append(repository).append('/'); query.append(ga.getGroupId().replace(".", "/")).append("/"); query.append(ga.getArtifactId()).append('/'); query.append("maven-metadata.xml");