Interface IArtifactProvider
-
- All Superinterfaces:
org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
- All Known Subinterfaces:
IArtifactFileProvider
,IRawArtifactFileProvider
,IRawArtifactProvider
- All Known Implementing Classes:
AbstractArtifactRepository2
,ArtifactRepositoryBaseImpl
,CompositeArtifactProvider
,CompositeArtifactProviderBaseImpl
,FileRepositoryArtifactProvider
,LocalArtifactRepository
,MavenBundlesArtifactRepository
,MirroringArtifactProvider
,ModuleArtifactRepository
,PackedFormatMirroringArtifactProvider
,ProviderOnlyArtifactRepository
,RepositoryArtifactProvider
public interface IArtifactProvider extends org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
Provider for artifact content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returnstrue
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 givenIArtifactSink
.
-
-
-
Method Detail
-
contains
boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returnstrue
if this is a provider for the given artifact.- 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 givenIArtifactSink
.The implementation is free to pick the most suitable internal storage format to serve the request, e.g. it may extract the artifact from a pack200-compressed format. 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:
IArtifactSink.getArtifactToBeWritten()
-
-