Class RepositoryLayout.ChecksumLocation
java.lang.Object
org.eclipse.aether.spi.connector.layout.RepositoryLayout.ChecksumLocation
- Enclosing interface:
RepositoryLayout
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
ConstructorDescriptionChecksumLocation
(URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory) Creates a new checksum file descriptor with the specified algorithm and location. -
Method Summary
Modifier and TypeMethodDescriptionforLocation
(URI location, ChecksumAlgorithmFactory checksumAlgorithmFactory) Creates a checksum descriptor for the specified artifact/metadata location and algorithm.Gets theChecksumAlgorithmFactory
that is used to calculate the checksum.Gets the location of the checksum file with a remote repository.toString()
-
Constructor Details
-
ChecksumLocation
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 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. 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
Gets theChecksumAlgorithmFactory
that is used to calculate the checksum.- Returns:
- The checksum factory, never
null
.
-
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
-