Class RepositoryArtifactProvider

    • 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)
    • Method Detail

      • createRepositoryLoader

        public static ArtifactRepositorySupplier createRepositoryLoader​(java.util.Collection<java.net.URI> artifactRepositories,
                                                                        org.eclipse.equinox.p2.core.IProvisioningAgent agent)
      • loadRepository

        public static org.eclipse.equinox.p2.repository.artifact.IArtifactRepository loadRepository​(java.net.URI repositoryURL,
                                                                                                    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: IArtifactProvider
        Returns true if this is a provider for the given artifact.
        Specified by:
        contains in interface IArtifactProvider
        Parameters:
        key - An artifact key
        Returns:
        true if 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: IRawArtifactProvider
        Returns true if this a provider for an artifact in the given format
        Specified by:
        contains in interface IRawArtifactProvider
        Parameters:
        descriptor - An artifact descriptor
        Returns:
        true if this instance can provide the artifact as raw artifact in the described format
      • 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
      • 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)
      • 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:
        query in interface org.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()