- All Superinterfaces:
IArtifactProvider,org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
- All Known Subinterfaces:
IRawArtifactFileProvider
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 TypeMethodDescriptionbooleancontains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor) Returnstrueif this a provider for an artifact in the given formatorg.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.IStatusgetRawArtifact(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) Writes the requested artifact in the specified raw format to the givenIRawArtifactSink.Methods inherited from interface org.eclipse.tycho.IArtifactProvider
contains, getArtifactMethods 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) Returnstrueif this a provider for an artifact in the given format- Parameters:
descriptor- An artifact descriptor- Returns:
trueif 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 givenIRawArtifactSink.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 (withIArtifactSink.commitWrite()orIArtifactSink.abortWrite(), depending on the status), or not have received any content.monitor- A progress monitor, ornull- Returns:
- A non-fatal status (warning or better) if the read operation was successful.
- Throws:
ArtifactSinkException- if that exception is thrown by the givenIArtifactSink- See Also:
-