Interface IRawArtifactProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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.equinox.p2.query.IQueryable

        query
    • Method Detail

      • 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:
        IArtifactSink.getArtifactToBeWritten(), IRawArtifactSink.getArtifactFormatToBeWritten()