Package org.eclipse.aether.internal.impl
Class DefaultRemoteRepositoryManager
java.lang.Object
org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager
- All Implemented Interfaces:
RemoteRepositoryManager
,Service
@Singleton
@Named
public class DefaultRemoteRepositoryManager
extends Object
implements RemoteRepositoryManager, Service
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChecksumPolicyProvider
private static final org.slf4j.Logger
private UpdatePolicyAnalyzer
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.DefaultRemoteRepositoryManager
(UpdatePolicyAnalyzer updatePolicyAnalyzer, ChecksumPolicyProvider checksumPolicyProvider) -
Method Summary
Modifier and TypeMethodDescriptionaggregateRepositories
(RepositorySystemSession session, List<RemoteRepository> dominantRepositories, List<RemoteRepository> recessiveRepositories, boolean recessiveIsRaw) Aggregates repository definitions by merging duplicate repositories and optionally applies mirror, proxy and authentication settings from the supplied session.private String
getKey
(RemoteRepository repository) getPolicy
(RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots) Gets the effective repository policy for the specified remote repository by merging the applicable snapshot/release policy of the repository with global settings from the supplied session.void
initService
(ServiceLocator locator) Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.private void
logMirror
(RepositorySystemSession session, RemoteRepository original, RemoteRepository mirror) private RepositoryPolicy
merge
(RepositoryPolicy policy, String updates, String checksums) private RepositoryPolicy
merge
(RepositorySystemSession session, RepositoryPolicy policy1, RepositoryPolicy policy2, boolean globalPolicy) private RemoteRepository
mergeMirrors
(RepositorySystemSession session, RemoteRepository dominant, RemoteRepository recessive) setChecksumPolicyProvider
(ChecksumPolicyProvider checksumPolicyProvider) setUpdatePolicyAnalyzer
(UpdatePolicyAnalyzer updatePolicyAnalyzer)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
updatePolicyAnalyzer
-
checksumPolicyProvider
-
-
Constructor Details
-
DefaultRemoteRepositoryManager
Deprecated. -
DefaultRemoteRepositoryManager
@Inject public DefaultRemoteRepositoryManager(UpdatePolicyAnalyzer updatePolicyAnalyzer, ChecksumPolicyProvider checksumPolicyProvider)
-
-
Method Details
-
initService
Description copied from interface:Service
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initService
in interfaceService
- Parameters:
locator
- The service locator, must not benull
.
-
setUpdatePolicyAnalyzer
public DefaultRemoteRepositoryManager setUpdatePolicyAnalyzer(UpdatePolicyAnalyzer updatePolicyAnalyzer) -
setChecksumPolicyProvider
public DefaultRemoteRepositoryManager setChecksumPolicyProvider(ChecksumPolicyProvider checksumPolicyProvider) -
aggregateRepositories
public List<RemoteRepository> aggregateRepositories(RepositorySystemSession session, List<RemoteRepository> dominantRepositories, List<RemoteRepository> recessiveRepositories, boolean recessiveIsRaw) Description copied from interface:RemoteRepositoryManager
Aggregates repository definitions by merging duplicate repositories and optionally applies mirror, proxy and authentication settings from the supplied session.- Specified by:
aggregateRepositories
in interfaceRemoteRepositoryManager
- Parameters:
session
- The repository session during which the repositories will be accessed, must not benull
.dominantRepositories
- The current list of remote repositories to merge the new definitions into, must not benull
.recessiveRepositories
- The remote repositories to merge into the existing list, must not benull
.recessiveIsRaw
-true
if the recessive repository definitions have not yet been subjected to mirror, proxy and authentication settings,false
otherwise.- Returns:
- The aggregated list of remote repositories, never
null
. - See Also:
-
logMirror
private void logMirror(RepositorySystemSession session, RemoteRepository original, RemoteRepository mirror) -
getKey
-
mergeMirrors
private RemoteRepository mergeMirrors(RepositorySystemSession session, RemoteRepository dominant, RemoteRepository recessive) -
getPolicy
public RepositoryPolicy getPolicy(RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots) Description copied from interface:RemoteRepositoryManager
Gets the effective repository policy for the specified remote repository by merging the applicable snapshot/release policy of the repository with global settings from the supplied session.- Specified by:
getPolicy
in interfaceRemoteRepositoryManager
- Parameters:
session
- The repository session during which the repository will be accessed, must not benull
.repository
- The remote repository to determine the effective policy for, must not benull
.releases
-true
if the policy for release artifacts needs to be considered,false
if not.snapshots
-true
if the policy for snapshot artifacts needs to be considered,false
if not.- Returns:
- The effective repository policy, never
null
. - See Also:
-
merge
private RepositoryPolicy merge(RepositorySystemSession session, RepositoryPolicy policy1, RepositoryPolicy policy2, boolean globalPolicy) -
merge
-