Class SignedVersionResolverWrapper
java.lang.Object
org.wildfly.channel.SignedVersionResolverWrapper
- All Implemented Interfaces:
Closeable,AutoCloseable,MavenVersionsResolver
Resolve and validate a signature using the wrapped
MavenVersionsResolver.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.channel.spi.MavenVersionsResolver
MavenVersionsResolver.Factory -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignedVersionResolverWrapper(MavenVersionsResolver wrapped, Collection<Repository> repositories, SignatureValidator signatureValidator, List<String> gpgUrls) -
Method Summary
Modifier and TypeMethodDescriptiongetAllVersions(String groupId, String artifactId, String extension, String classifier) Returns all the versions provided by Maven for the given artifact.getMetadataLatestVersion(String groupId, String artifactId) Returns the<latest>version according to the repositories' Maven metadata.getMetadataReleaseVersion(String groupId, String artifactId) Returns the<release>version according to the repositories' Maven metadata.resolveArtifact(String groupId, String artifactId, String extension, String classifier, String version) Resolve the maven artifact based on the full coordinates.resolveArtifacts(List<ArtifactCoordinate> coordinates) Resolve a list of maven artifacts based on the full coordinates.resolveChannelMetadata(List<? extends ChannelMetadataCoordinate> coords) Resolve a list of channel metadata artifacts based on the coordinates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.channel.spi.MavenVersionsResolver
close
-
Field Details
-
SIGNATURE_FILE_SUFFIX
- See Also:
-
-
Constructor Details
-
SignedVersionResolverWrapper
public SignedVersionResolverWrapper(MavenVersionsResolver wrapped, Collection<Repository> repositories, SignatureValidator signatureValidator, List<String> gpgUrls)
-
-
Method Details
-
getAllVersions
public Set<String> getAllVersions(String groupId, String artifactId, String extension, String classifier) Description copied from interface:MavenVersionsResolverReturns all the versions provided by Maven for the given artifact.- Specified by:
getAllVersionsin interfaceMavenVersionsResolver- Parameters:
groupId- Maven GroupId - requiredartifactId- Maven ArtifactId - requiredextension- Maven extension - can benullclassifier- Maven classifier - can benull- Returns:
- the set of versions.
-
resolveArtifact
public File resolveArtifact(String groupId, String artifactId, String extension, String classifier, String version) throws ArtifactTransferException Description copied from interface:MavenVersionsResolverResolve the maven artifact based on the full coordinates.- Specified by:
resolveArtifactin interfaceMavenVersionsResolver- Parameters:
groupId- Maven GroupId - requiredartifactId- Maven ArtifactId - requiredextension- Maven extension - can benullclassifier- Maven classifier - can benullversion- Maven version - required- Returns:
- a File representing the resolved Maven artifact.
- Throws:
ArtifactTransferException- if the artifact can not be resolved.
-
resolveArtifacts
public List<File> resolveArtifacts(List<ArtifactCoordinate> coordinates) throws ArtifactTransferException Description copied from interface:MavenVersionsResolverResolve a list of maven artifacts based on the full coordinates. The order of returned Files is the same as order of coordinates.- Specified by:
resolveArtifactsin interfaceMavenVersionsResolver- Parameters:
coordinates- - list of ArtifactCoordinates. They need contain at least groupId, artifactId and version.- Returns:
- a list of File representing the resolved Maven artifact.
- Throws:
ArtifactTransferException- if any artifacts can not be resolved.
-
resolveChannelMetadata
public List<URL> resolveChannelMetadata(List<? extends ChannelMetadataCoordinate> coords) throws ArtifactTransferException Description copied from interface:MavenVersionsResolverResolve a list of channel metadata artifacts based on the coordinates. If theChannelMetadataCoordinatecontains non-null URL, that URL is returned. If theChannelMetadataCoordinatecontains non-null Maven coordinates, the Maven artifact will be resolved and a URL to it will be returned. If the Maven coordinates specify only groupId and artifactId, latest available version of matching Maven artifact will be resolved. The order of returned URLs is the same as order of coordinates.- Specified by:
resolveChannelMetadatain interfaceMavenVersionsResolver- Parameters:
coords- - list of ChannelMetadataCoordinate.- Returns:
- a list of URLs to the metadata files
- Throws:
ArtifactTransferException- if any artifacts can not be resolved.
-
getMetadataReleaseVersion
Description copied from interface:MavenVersionsResolverReturns the<release>version according to the repositories' Maven metadata. If multiple repositories contain the same artifact,VersionMatcher.COMPARATORis used to choose version.- Specified by:
getMetadataReleaseVersionin interfaceMavenVersionsResolver- Parameters:
groupId- Maven GroupId - requiredartifactId- Maven ArtifactId - required- Returns:
- the
releaseversion.
-
getMetadataLatestVersion
Description copied from interface:MavenVersionsResolverReturns the<latest>version according to the repositories' Maven metadata. If multiple repositories contain the same artifact,VersionMatcher.COMPARATORis used to choose version.- Specified by:
getMetadataLatestVersionin interfaceMavenVersionsResolver- Parameters:
groupId- Maven GroupId - requiredartifactId- Maven ArtifactId - required- Returns:
- the
latestversion.
-