Package org.eclipse.aether.spi.checksums
Interface ProvidedChecksumsSource
-
- All Known Implementing Classes:
TrustedToProvidedChecksumsSourceAdapter
public interface ProvidedChecksumsSource
Component able to provide (expected) checksums to connector beforehand the download happens. Checksum provided by this component are of kindChecksumPolicy.ChecksumKind.PROVIDED
. Resolver by default provides one implementation: an adapter, that makesTrustedChecksumsSource
intoProvidedChecksumsSource
. Users are encouraged to rely on this adapter, and do not create their own implementations.- Since:
- 1.9.14
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getProvidedArtifactChecksums(RepositorySystemSession session, ArtifactDownload transfer, RemoteRepository remoteRepository, java.util.List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
May return the provided checksums (for given artifact transfer) from source other than remote repository, ornull
if it have no checksums available for given transfer.
-
-
-
Method Detail
-
getProvidedArtifactChecksums
java.util.Map<java.lang.String,java.lang.String> getProvidedArtifactChecksums(RepositorySystemSession session, ArtifactDownload transfer, RemoteRepository remoteRepository, java.util.List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
May return the provided checksums (for given artifact transfer) from source other than remote repository, ornull
if it have no checksums available for given transfer. Provided checksums are "opt-in" for transfer, in a way IF they are available upfront, they will be enforced according to checksum policy in effect. Otherwise, provided checksum verification is completely left out.For enabled provided checksum source is completely acceptable to return
null
values, as that carries the meaning "nothing to add here", as there are no checksums to be provided upfront transfer. Semantically, this is equivalent to returning empty map, but signals the intent better.- Parameters:
session
- The current session.transfer
- The transfer that is about to be executed.remoteRepository
- The remote repository connector is about to contact.checksumAlgorithmFactories
- The checksum algorithms that are expected.- Returns:
- Map of expected checksums, or
null
.
-
-