Class RepositoryArtifactProvider
- java.lang.Object
-
- org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl
-
- org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider
-
- All Implemented Interfaces:
org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>,IArtifactProvider,IRawArtifactProvider
- Direct Known Subclasses:
FileRepositoryArtifactProvider
public class RepositoryArtifactProvider extends CompositeArtifactProviderBaseImpl implements IRawArtifactProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classRepositoryArtifactProvider.ArtifactSinkExceptionWrapperprivate static classRepositoryArtifactProvider.BooleanStatusArtifactRequest(package private) static classRepositoryArtifactProvider.RepositoryLoaderprivate static classRepositoryArtifactProvider.RetryTracker
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<? extends org.eclipse.equinox.p2.repository.artifact.IArtifactRepository>repositoriesprivate RepositoryArtifactProvider.RepositoryLoaderrepositoryLoader(package private) ArtifactTransferPolicytransferPolicy
-
Constructor Summary
Constructors Constructor Description RepositoryArtifactProvider(java.util.List<? extends org.eclipse.equinox.p2.repository.artifact.IArtifactRepository> repositories, ArtifactTransferPolicy transferPolicy)RepositoryArtifactProvider(java.util.List<java.net.URI> artifactRepositories, ArtifactTransferPolicy transferPolicy, org.eclipse.equinox.p2.core.IProvisioningAgent agent)RepositoryArtifactProvider(RepositoryArtifactProvider.RepositoryLoader repositoryLoader, ArtifactTransferPolicy transferPolicy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(org.eclipse.equinox.p2.metadata.IArtifactKey key)Returnstrueif this is a provider for the given artifact.booleancontains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)Returnstrueif this a provider for an artifact in the given formatprotected voidgetArtifactDescriptorsOfAllSources(org.eclipse.equinox.p2.metadata.IArtifactKey key, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> result)private booleangetArtifactFromAnyChildRepository(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor)private booleangetArtifactFromAnyFormatAvailableInRepository(org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor)private booleangetArtifactFromAnyMirror(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, RepositoryArtifactProvider.RetryTracker retryTracker, org.eclipse.core.runtime.IProgressMonitor monitor)protected voidgetArtifactFromAnySource(IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor)private booleangetArtifactFromOneMirror(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, RepositoryArtifactProvider.RetryTracker retryTracker, org.eclipse.core.runtime.IProgressMonitor monitor)protected org.eclipse.core.runtime.StatusgetArtifactNotFoundError(java.lang.String artifact)protected voidgetRawArtifactFromAnySource(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector)private booleangetRawArtifactFromRepository(org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IRawArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor)private static org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManagergetRepositoryManager(org.eclipse.equinox.p2.core.IProvisioningAgent agent)private org.eclipse.core.runtime.IStatusimproveMessageIfError(org.eclipse.core.runtime.IStatus originalStatus, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor currentDescriptor)protected voidinit()org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IArtifactKey>query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IArtifactKey> query, org.eclipse.core.runtime.IProgressMonitor monitor)private org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>repositoriesAsQueriable()protected voidrepositoriesLoaded()-
Methods inherited from class org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl
getArtifact, getArtifactDescriptors, getRawArtifact, isFatal, nonNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.tycho.repository.p2base.artifact.provider.IArtifactProvider
getArtifact
-
Methods inherited from interface org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactProvider
getArtifactDescriptors, getRawArtifact
-
-
-
-
Field Detail
-
repositoryLoader
private final RepositoryArtifactProvider.RepositoryLoader repositoryLoader
-
repositories
java.util.List<? extends org.eclipse.equinox.p2.repository.artifact.IArtifactRepository> repositories
-
transferPolicy
final ArtifactTransferPolicy transferPolicy
-
-
Constructor Detail
-
RepositoryArtifactProvider
public RepositoryArtifactProvider(java.util.List<? extends org.eclipse.equinox.p2.repository.artifact.IArtifactRepository> repositories, ArtifactTransferPolicy transferPolicy)
-
RepositoryArtifactProvider
public RepositoryArtifactProvider(java.util.List<java.net.URI> artifactRepositories, ArtifactTransferPolicy transferPolicy, org.eclipse.equinox.p2.core.IProvisioningAgent agent)
-
RepositoryArtifactProvider
RepositoryArtifactProvider(RepositoryArtifactProvider.RepositoryLoader repositoryLoader, ArtifactTransferPolicy transferPolicy)
-
-
Method Detail
-
getRepositoryManager
private static org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager getRepositoryManager(org.eclipse.equinox.p2.core.IProvisioningAgent agent)
-
init
protected void init()
-
repositoriesLoaded
protected void repositoriesLoaded()
-
contains
public boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Description copied from interface:IArtifactProviderReturnstrueif this is a provider for the given artifact.- Specified by:
containsin interfaceIArtifactProvider- Parameters:
key- An artifact key- Returns:
trueif this instance can provide the artifact for the given key
-
contains
public boolean contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Description copied from interface:IRawArtifactProviderReturnstrueif this a provider for an artifact in the given format- Specified by:
containsin interfaceIRawArtifactProvider- Parameters:
descriptor- An artifact descriptor- Returns:
trueif this instance can provide the artifact as raw artifact in the described format
-
getArtifactDescriptorsOfAllSources
protected void getArtifactDescriptorsOfAllSources(org.eclipse.equinox.p2.metadata.IArtifactKey key, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> result)- Specified by:
getArtifactDescriptorsOfAllSourcesin classCompositeArtifactProviderBaseImpl
-
getArtifactFromAnySource
protected void getArtifactFromAnySource(IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
- Specified by:
getArtifactFromAnySourcein classCompositeArtifactProviderBaseImpl- Throws:
ArtifactSinkException
-
getArtifactFromAnyFormatAvailableInRepository
private boolean getArtifactFromAnyFormatAvailableInRepository(org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException- Throws:
ArtifactSinkException
-
getArtifactFromAnyChildRepository
private boolean getArtifactFromAnyChildRepository(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException- Throws:
ArtifactSinkException
-
getArtifactFromAnyMirror
private boolean getArtifactFromAnyMirror(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, RepositoryArtifactProvider.RetryTracker retryTracker, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException- Throws:
ArtifactSinkException
-
getArtifactFromOneMirror
private boolean getArtifactFromOneMirror(java.util.List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> availableDescriptors, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, RepositoryArtifactProvider.RetryTracker retryTracker, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException- Throws:
ArtifactSinkException
-
getRawArtifactFromAnySource
protected void getRawArtifactFromAnySource(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector) throws ArtifactSinkException
- Specified by:
getRawArtifactFromAnySourcein classCompositeArtifactProviderBaseImpl- Throws:
ArtifactSinkException
-
getRawArtifactFromRepository
private boolean getRawArtifactFromRepository(org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, IRawArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException- Throws:
ArtifactSinkException
-
improveMessageIfError
private org.eclipse.core.runtime.IStatus improveMessageIfError(org.eclipse.core.runtime.IStatus originalStatus, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository repository, org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor currentDescriptor)
-
getArtifactNotFoundError
protected org.eclipse.core.runtime.Status getArtifactNotFoundError(java.lang.String artifact)
- Specified by:
getArtifactNotFoundErrorin classCompositeArtifactProviderBaseImpl
-
query
public org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IArtifactKey> query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IArtifactKey> query, org.eclipse.core.runtime.IProgressMonitor monitor)- Specified by:
queryin interfaceorg.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
-
repositoriesAsQueriable
private org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey> repositoriesAsQueriable()
-
-