Class CompositeArtifactProviderBaseImpl

    • Constructor Detail

      • CompositeArtifactProviderBaseImpl

        public CompositeArtifactProviderBaseImpl()
    • Method Detail

      • getArtifactDescriptors

        public final org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] getArtifactDescriptors​(org.eclipse.equinox.p2.metadata.IArtifactKey key)
        Description copied from interface: IRawArtifactProvider
        Return the raw artifact formats in which the given artifact can be provided.
        Specified by:
        getArtifactDescriptors in interface IRawArtifactProvider
        Parameters:
        key - An artifact key
        Returns:
        The descriptors associated with the given key
      • getArtifactDescriptorsOfAllSources

        protected abstract void getArtifactDescriptorsOfAllSources​(org.eclipse.equinox.p2.metadata.IArtifactKey key,
                                                                   Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> result)
      • getArtifact

        public final org.eclipse.core.runtime.IStatus getArtifact​(IArtifactSink sink,
                                                                  org.eclipse.core.runtime.IProgressMonitor monitor)
                                                           throws ArtifactSinkException
        Description copied from interface: IArtifactProvider
        Writes the requested artifact to the given IArtifactSink.

        The implementation is free to pick the most suitable internal storage format to serve the request, e.g. it may extract the artifact from a pack200-compressed format. If an error is detected while streaming the artifact (e.g. an MD5 checksum error), the implementation may re-attempt the read from all other available sources. In case there were multiple read attempts, a multi-status with the results of all attempts is returned.

        Specified by:
        getArtifact in interface IArtifactProvider
        Parameters:
        sink - A sink for a specific artifact. When this method returns, the sink will either be closed (with IArtifactSink.commitWrite() or IArtifactSink.abortWrite(), depending on the status), or not have received any content.
        monitor - A progress monitor, or null
        Returns:
        A non-fatal status (warning or better) if the read operation was successful.
        Throws:
        ArtifactSinkException - if that exception is thrown by the given IArtifactSink
        See Also:
        IArtifactSink.getArtifactToBeWritten()
      • getArtifactNotFoundError

        protected abstract org.eclipse.core.runtime.IStatus getArtifactNotFoundError​(String artifact)
      • nonNull

        protected static org.eclipse.core.runtime.IProgressMonitor nonNull​(org.eclipse.core.runtime.IProgressMonitor monitor)
      • isFatal

        protected static boolean isFatal​(org.eclipse.core.runtime.IStatus status)