Interface IArtifactProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean contains​(org.eclipse.equinox.p2.metadata.IArtifactKey key)
      Returns true if this is a provider for the given artifact.
      org.eclipse.core.runtime.IStatus getArtifact​(IArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor)
      Writes the requested artifact to the given IArtifactSink.
      • Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable

        query
    • Method Detail

      • contains

        boolean contains​(org.eclipse.equinox.p2.metadata.IArtifactKey key)
        Returns true if this is a provider for the given artifact.
        Parameters:
        key - An artifact key
        Returns:
        true if this instance can provide the artifact for the given key
      • getArtifact

        org.eclipse.core.runtime.IStatus getArtifact​(IArtifactSink sink,
                                                     org.eclipse.core.runtime.IProgressMonitor monitor)
                                              throws ArtifactSinkException
        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.

        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()