Class SignedVersionResolverWrapper

java.lang.Object
org.wildfly.channel.SignedVersionResolverWrapper
All Implemented Interfaces:
Closeable, AutoCloseable, MavenVersionsResolver

public class SignedVersionResolverWrapper extends Object implements MavenVersionsResolver
Resolve and validate a signature using the wrapped MavenVersionsResolver.
  • Field Details

  • Constructor Details

  • Method Details

    • getAllVersions

      public Set<String> getAllVersions(String groupId, String artifactId, String extension, String classifier)
      Description copied from interface: MavenVersionsResolver
      Returns all the versions provided by Maven for the given artifact.
      Specified by:
      getAllVersions in interface MavenVersionsResolver
      Parameters:
      groupId - Maven GroupId - required
      artifactId - Maven ArtifactId - required
      extension - Maven extension - can be null
      classifier - Maven classifier - can be null
      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: MavenVersionsResolver
      Resolve the maven artifact based on the full coordinates.
      Specified by:
      resolveArtifact in interface MavenVersionsResolver
      Parameters:
      groupId - Maven GroupId - required
      artifactId - Maven ArtifactId - required
      extension - Maven extension - can be null
      classifier - Maven classifier - can be null
      version - 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: MavenVersionsResolver
      Resolve a list of maven artifacts based on the full coordinates. The order of returned Files is the same as order of coordinates.
      Specified by:
      resolveArtifacts in interface MavenVersionsResolver
      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: MavenVersionsResolver
      Resolve a list of channel metadata artifacts based on the coordinates. If the ChannelMetadataCoordinate contains non-null URL, that URL is returned. If the ChannelMetadataCoordinate contains 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:
      resolveChannelMetadata in interface MavenVersionsResolver
      Parameters:
      coords - - list of ChannelMetadataCoordinate.
      Returns:
      a list of URLs to the metadata files
      Throws:
      ArtifactTransferException - if any artifacts can not be resolved.
    • getMetadataReleaseVersion

      public String getMetadataReleaseVersion(String groupId, String artifactId)
      Description copied from interface: MavenVersionsResolver
      Returns the <release> version according to the repositories' Maven metadata. If multiple repositories contain the same artifact, VersionMatcher.COMPARATOR is used to choose version.
      Specified by:
      getMetadataReleaseVersion in interface MavenVersionsResolver
      Parameters:
      groupId - Maven GroupId - required
      artifactId - Maven ArtifactId - required
      Returns:
      the release version.
    • getMetadataLatestVersion

      public String getMetadataLatestVersion(String groupId, String artifactId)
      Description copied from interface: MavenVersionsResolver
      Returns the <latest> version according to the repositories' Maven metadata. If multiple repositories contain the same artifact, VersionMatcher.COMPARATOR is used to choose version.
      Specified by:
      getMetadataLatestVersion in interface MavenVersionsResolver
      Parameters:
      groupId - Maven GroupId - required
      artifactId - Maven ArtifactId - required
      Returns:
      the latest version.