- 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 TypeMethodDescriptionbooleancontains(org.eclipse.equinox.p2.metadata.IArtifactKey key) Returnstrueif this is a provider for the given artifact.org.eclipse.core.runtime.IStatusgetArtifact(IArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) Writes the requested artifact to the givenIArtifactSink.Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable
query
-
Method Details
-
contains
boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key) Returnstrueif this is a provider for the given artifact.- Specified by:
containsin interfaceorg.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>- Parameters:
key- An artifact key- Returns:
trueif 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 givenIArtifactSink.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 (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:
-