Class RepositoryLayout.ChecksumLocation

Enclosing interface:

public static final class RepositoryLayout.ChecksumLocation extends Object
A descriptor for a checksum location. This descriptor simply associates the location of a checksum file with the underlying checksum algorithm used to calculate/verify it.
  • Constructor Details

    • ChecksumLocation

      public ChecksumLocation(URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory)
      Creates a new checksum file descriptor with the specified algorithm and location. The method forLocation(URI, ChecksumAlgorithmFactory) is usually more convenient though.
      location - The relative URI to the checksum file within a repository, must not be null.
      checksumAlgorithmFactory - The checksum type used to calculate the checksum, must not be null.
  • Method Details

    • forLocation

      public static RepositoryLayout.ChecksumLocation forLocation(URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory)
      Creates a checksum descriptor for the specified artifact/metadata location and algorithm. The location of the checksum file itself is derived from the supplied resource URI by appending the file extension specified by the algorithm factory. See ChecksumAlgorithmFactory.getFileExtension().
      location - The relative URI to the artifact/metadata whose checksum file is being obtained, must not be null and must not have a query or fragment part.
      checksumAlgorithmFactory - The algorithm used to calculate the checksum, must not be null.
      The checksum file descriptor, never null.
    • getChecksumAlgorithmFactory

      Gets the ChecksumAlgorithmFactory that is used to calculate the checksum.
      The checksum factory, never null.
    • getLocation

      public URI getLocation()
      Gets the location of the checksum file with a remote repository. The URI is relative to the root directory of the repository.
      The relative URI to the checksum file, never null.
    • toString

      public String toString()
      toString in class Object