Interface IRawArtifactProvider

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

public interface IRawArtifactProvider extends IArtifactProvider
Provider for artifact content in different formats.

Over IArtifactProvider, this interface adds methods for obtaining artifacts in raw formats. (With the IArtifactProvider interface, artifacts can only be obtained in the canonical format, i.e. the format in which the artifact can be used directly without additional decompression.)

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
    Returns true if this a provider for an artifact in the given format
    org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[]
    getArtifactDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
    Return the raw artifact formats in which the given artifact can be provided.
    org.eclipse.core.runtime.IStatus
    getRawArtifact(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor)
    Writes the requested artifact in the specified raw format to the given IRawArtifactSink.

    Methods inherited from interface org.eclipse.tycho.IArtifactProvider

    contains, getArtifact

    Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable

    query
  • Method Details

    • getArtifactDescriptors

      org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] getArtifactDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
      Return the raw artifact formats in which the given artifact can be provided.
      Parameters:
      key - An artifact key
      Returns:
      The descriptors associated with the given key
    • contains

      boolean contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
      Returns true if this a provider for an artifact in the given format
      Parameters:
      descriptor - An artifact descriptor
      Returns:
      true if this instance can provide the artifact as raw artifact in the described format
    • getRawArtifact

      org.eclipse.core.runtime.IStatus getRawArtifact(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
      Writes the requested artifact in the specified raw format to the given IRawArtifactSink.

      If an error is detected while streaming the artifact (e.g. an MD5 checksum error) and there are other sources available (e.g. in a composite provider), the implementation may re-attempt the read from these other 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 in a specific format. 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: