@Named @Component(role=RepositorySystem.class) public class DefaultRepositorySystem extends Object implements RepositorySystem, Service
Constructor and Description |
---|
DefaultRepositorySystem() |
public void initService(ServiceLocator locator)
Service
initService
in interface Service
locator
- The service locator, must not be null
.public DefaultRepositorySystem setLoggerFactory(LoggerFactory loggerFactory)
public DefaultRepositorySystem setVersionResolver(VersionResolver versionResolver)
public DefaultRepositorySystem setVersionRangeResolver(VersionRangeResolver versionRangeResolver)
public DefaultRepositorySystem setArtifactResolver(ArtifactResolver artifactResolver)
public DefaultRepositorySystem setMetadataResolver(MetadataResolver metadataResolver)
public DefaultRepositorySystem setArtifactDescriptorReader(ArtifactDescriptorReader artifactDescriptorReader)
public DefaultRepositorySystem setDependencyCollector(DependencyCollector dependencyCollector)
public DefaultRepositorySystem setInstaller(Installer installer)
public DefaultRepositorySystem setDeployer(Deployer deployer)
public DefaultRepositorySystem setLocalRepositoryProvider(LocalRepositoryProvider localRepositoryProvider)
public DefaultRepositorySystem setSyncContextFactory(SyncContextFactory syncContextFactory)
public VersionResult resolveVersion(RepositorySystemSession session, VersionRequest request) throws VersionResolutionException
RepositorySystem
resolveVersion
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The version request, must not be null
.null
.VersionResolutionException
- If the metaversion could not be resolved.public VersionRangeResult resolveVersionRange(RepositorySystemSession session, VersionRangeRequest request) throws VersionRangeResolutionException
RepositorySystem
session's version filter
.resolveVersionRange
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The version range request, must not be null
.null
.VersionRangeResolutionException
- If the requested range could not be parsed. Note that an empty range does
not raise an exception.public ArtifactDescriptorResult readArtifactDescriptor(RepositorySystemSession session, ArtifactDescriptorRequest request) throws ArtifactDescriptorException
RepositorySystem
readArtifactDescriptor
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The descriptor request, must not be null
.null
.ArtifactDescriptorException
- If the artifact descriptor could not be read.RepositorySystemSession.getArtifactDescriptorPolicy()
public ArtifactResult resolveArtifact(RepositorySystemSession session, ArtifactRequest request) throws ArtifactResolutionException
RepositorySystem
resolveArtifact
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The resolution request, must not be null
.null
.ArtifactResolutionException
- If the artifact could not be resolved.Artifact.getFile()
public List<ArtifactResult> resolveArtifacts(RepositorySystemSession session, Collection<? extends ArtifactRequest> requests) throws ArtifactResolutionException
RepositorySystem
resolveArtifacts
in interface RepositorySystem
session
- The repository session, must not be null
.requests
- The resolution requests, must not be null
.null
.ArtifactResolutionException
- If any artifact could not be resolved.Artifact.getFile()
public List<MetadataResult> resolveMetadata(RepositorySystemSession session, Collection<? extends MetadataRequest> requests)
RepositorySystem
resolveMetadata
in interface RepositorySystem
session
- The repository session, must not be null
.requests
- The resolution requests, must not be null
.null
.Metadata.getFile()
public CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request) throws DependencyCollectionException
RepositorySystem
RepositorySystem.resolveDependencies(RepositorySystemSession, DependencyRequest)
.collectDependencies
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The collection request, must not be null
.null
.DependencyCollectionException
- If the dependency tree could not be built.RepositorySystemSession.getDependencyTraverser()
,
RepositorySystemSession.getDependencyManager()
,
RepositorySystemSession.getDependencySelector()
,
RepositorySystemSession.getVersionFilter()
,
RepositorySystemSession.getDependencyGraphTransformer()
public DependencyResult resolveDependencies(RepositorySystemSession session, DependencyRequest request) throws DependencyResolutionException
RepositorySystem
RepositorySystem.collectDependencies(RepositorySystemSession, CollectRequest)
and
RepositorySystem.resolveArtifacts(RepositorySystemSession, Collection)
.resolveDependencies
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The dependency request, must not be null
.null
.DependencyResolutionException
- If the dependency tree could not be built or any dependency artifact could
not be resolved.public InstallResult install(RepositorySystemSession session, InstallRequest request) throws InstallationException
RepositorySystem
install
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The installation request, must not be null
.null
.InstallationException
- If any artifact/metadata from the request could not be installed.public DeployResult deploy(RepositorySystemSession session, DeployRequest request) throws DeploymentException
RepositorySystem
deploy
in interface RepositorySystem
session
- The repository session, must not be null
.request
- The deployment request, must not be null
.null
.DeploymentException
- If any artifact/metadata from the request could not be deployed.public LocalRepositoryManager newLocalRepositoryManager(RepositorySystemSession session, LocalRepository localRepository)
RepositorySystem
newLocalRepositoryManager
in interface RepositorySystem
session
- The repository system session from which to configure the manager, must not be null
.localRepository
- The local repository to create a manager for, must not be null
.null
.public SyncContext newSyncContext(RepositorySystemSession session, boolean shared)
RepositorySystem
newSyncContext
in interface RepositorySystem
session
- The repository session during which the context will be used, must not be null
.shared
- A flag indicating whether access to the artifacts/metadata associated with the new context can be
shared among concurrent readers or whether access needs to be exclusive to the calling thread.null
.Copyright © 2010–2013 The Eclipse Foundation. All rights reserved.