Class RepositoryLayout.ChecksumLocation

  • Enclosing interface:
    RepositoryLayout

    public static final class RepositoryLayout.ChecksumLocation
    extends java.lang.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 Detail

      • ChecksumLocation

        public ChecksumLocation​(java.net.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.
        Parameters:
        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 Detail

      • forLocation

        public static RepositoryLayout.ChecksumLocation forLocation​(java.net.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().
        Parameters:
        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.
        Returns:
        The checksum file descriptor, never null.
      • getLocation

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object