public interface TrustedChecksumsSource
Note: the "trusted" meaning depends solely on implementation and the user using it. Resolver itself does nothing for "trust" (like some crypto magic or what not). It all boils down that the source being used by implementation is "trusted" by user or not.
Modifier and Type | Interface and Description |
---|---|
static interface |
TrustedChecksumsSource.Writer
A writer that is able to write/add trusted checksums to this implementation.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getTrustedArtifactChecksums(RepositorySystemSession session,
Artifact artifact,
ArtifactRepository artifactRepository,
java.util.List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
May return the trusted checksums (for given artifact) from trusted source, or
null if not enabled. |
TrustedChecksumsSource.Writer |
getTrustedArtifactChecksumsWriter(RepositorySystemSession session)
Some trusted checksums sources may implement this optional method: ability to write/add checksums to them.
|
java.util.Map<java.lang.String,java.lang.String> getTrustedArtifactChecksums(RepositorySystemSession session, Artifact artifact, ArtifactRepository artifactRepository, java.util.List<ChecksumAlgorithmFactory> checksumAlgorithmFactories)
null
if not enabled.
Enabled trusted checksum source SHOULD return non-null (empty map) result, when it has no data for given
artifact. Empty map means in this case "no information", but how that case is interpreted depends on consumer
for trusted checksums.session
- The repository system session, never null
.artifact
- The artifact we want checksums for, never null
.artifactRepository
- The origin repository: local, workspace, remote repository, never null
.checksumAlgorithmFactories
- The checksum algorithms that are expected, never null
.null
if not enabled.TrustedChecksumsSource.Writer getTrustedArtifactChecksumsWriter(RepositorySystemSession session)
null
.