Interface IRawArtifactProvider
-
- All Superinterfaces:
IArtifactProvider
,org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
- All Known Subinterfaces:
IRawArtifactFileProvider
- All Known Implementing Classes:
AbstractArtifactRepository2
,ArtifactRepositoryBaseImpl
,CompositeArtifactProvider
,CompositeArtifactProviderBaseImpl
,FileRepositoryArtifactProvider
,LocalArtifactRepository
,MirroringArtifactProvider
,ModuleArtifactRepository
,PackedFormatMirroringArtifactProvider
,ProviderOnlyArtifactRepository
,RepositoryArtifactProvider
,TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository
public interface IRawArtifactProvider extends IArtifactProvider
Provider for artifact content in different formats.Over
IArtifactProvider
, this interface adds methods for obtaining artifacts in raw formats, e.g. compressed with the JAR-optimized pack200 format. (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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returnstrue
if 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.IStatus
getRawArtifact(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.repository.p2base.artifact.provider.IArtifactProvider
contains, getArtifact
-
-
-
-
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)
Returnstrue
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 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:
IArtifactSink.getArtifactToBeWritten()
,IRawArtifactSink.getArtifactFormatToBeWritten()
-
-