Class RepositoryLayout.ChecksumLocation
- java.lang.Object
-
- org.eclipse.aether.spi.connector.layout.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 Summary
Constructors Constructor Description ChecksumLocation(java.net.URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory)
Creates a new checksum file descriptor with the specified algorithm and location.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RepositoryLayout.ChecksumLocation
forLocation(java.net.URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory)
Creates a checksum descriptor for the specified artifact/metadata location and algorithm.ChecksumAlgorithmFactory
getChecksumAlgorithmFactory()
Gets theChecksumAlgorithmFactory
that is used to calculate the checksum.java.net.URI
getLocation()
Gets the location of the checksum file with a remote repository.java.lang.String
toString()
-
-
-
Constructor Detail
-
ChecksumLocation
public ChecksumLocation(java.net.URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory)
Creates a new checksum file descriptor with the specified algorithm and location. The methodforLocation(URI, ChecksumAlgorithmFactory)
is usually more convenient though.- Parameters:
location
- The relative URI to the checksum file within a repository, must not benull
.checksumAlgorithmFactory
- The checksum type used to calculate the checksum, must not benull
.
-
-
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. SeeChecksumAlgorithmFactory.getFileExtension()
.- Parameters:
location
- The relative URI to the artifact/metadata whose checksum file is being obtained, must not benull
and must not have a query or fragment part.checksumAlgorithmFactory
- The algorithm used to calculate the checksum, must not benull
.- Returns:
- The checksum file descriptor, never
null
.
-
getChecksumAlgorithmFactory
public ChecksumAlgorithmFactory getChecksumAlgorithmFactory()
Gets theChecksumAlgorithmFactory
that is used to calculate the checksum.- Returns:
- The checksum factory, 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 classjava.lang.Object
-
-