Interface VersionRangeResolverRequest

All Superinterfaces:
RepositoryAwareRequest, Request<Session>

@Experimental public interface VersionRangeResolverRequest extends RepositoryAwareRequest
A request to resolve a version range to a list of matching versions. This request is used by VersionRangeResolver to expand version ranges (e.g., "[3.8,4.0)") into concrete versions available in the configured repositories.
Since:
4.0.0
  • Method Details

    • getArtifactCoordinates

      @Nonnull ArtifactCoordinates getArtifactCoordinates()
      Gets the artifact coordinates whose version range should be resolved. The coordinates may contain a version range (e.g., "[1.0,2.0)") or a single version.
      Returns:
      the artifact coordinates, never null
    • getNature

      Gets the nature of repositories to query when resolving the version range. This determines whether to search in release repositories, snapshot repositories, or both.
      Returns:
      the repository nature, never null
    • build

      @Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates)
      Creates a version range resolver request using the session's repositories.
      Parameters:
      session - the session to use, must not be null
      artifactCoordinates - the artifact coordinates whose version range should be resolved, must not be null
      Returns:
      the version range resolver request, never null
    • build

      @Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates, @Nullable List<RemoteRepository> repositories)
      Creates a version range resolver request.
      Parameters:
      session - the session to use, must not be null
      artifactCoordinates - the artifact coordinates whose version range should be resolved, must not be null
      repositories - the repositories to use, or null to use the session's repositories
      Returns:
      the version range resolver request, never null
    • build

      @Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates, @Nullable List<RemoteRepository> repositories, @Nullable VersionRangeResolverRequest.Nature nature)
      Creates a version range resolver request.
      Parameters:
      session - the session to use, must not be null
      artifactCoordinates - the artifact coordinates whose version range should be resolved, must not be null
      repositories - the repositories to use, or null to use the session's repositories
      nature - the nature of repositories to query when resolving the version range, or null to use the default
      Returns:
      the version range resolver request, never null
    • builder

      Creates a new builder for version range resolver requests.
      Returns:
      a new builder, never null