Interface IArtifactProvider

All Superinterfaces:
org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
All Known Subinterfaces:
IArtifactFileProvider, IRawArtifactFileProvider, IRawArtifactProvider

public interface IArtifactProvider extends org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
Provider for artifact content.
  • Method Summary

    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 Details

    • contains

      boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
      Returns true if this is a provider for the given artifact.
      Specified by:
      contains in interface org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
      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. 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: