Class CompositeArtifactProvider
- java.lang.Object
-
- org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl
-
- org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProvider
-
- All Implemented Interfaces:
org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
,IArtifactFileProvider
,IArtifactProvider
,IRawArtifactFileProvider
,IRawArtifactProvider
public class CompositeArtifactProvider extends CompositeArtifactProviderBaseImpl implements IRawArtifactFileProvider
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IRawArtifactFileProvider>
components
-
Constructor Summary
Constructors Constructor Description CompositeArtifactProvider(java.util.List<IRawArtifactFileProvider> providers)
CompositeArtifactProvider(java.util.List<IRawArtifactFileProvider> providers1, java.util.List<IRawArtifactFileProvider> providers2)
CompositeArtifactProvider(IRawArtifactFileProvider... components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
componentsAsQueriable()
boolean
contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returnstrue
if this is a provider for the given artifact.boolean
contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returnstrue
if this a provider for an artifact in the given formatprotected void
getArtifactDescriptorsOfAllSources(org.eclipse.equinox.p2.metadata.IArtifactKey key, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> result)
java.io.File
getArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returns the file system location of the given artifact.java.io.File
getArtifactFile(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns the file system location of the given artifact in the given format.protected void
getArtifactFromAnySource(IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor)
protected org.eclipse.core.runtime.Status
getArtifactNotFoundError(java.lang.String artifact)
protected void
getRawArtifactFromAnySource(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector)
boolean
isFileAlreadyAvailable(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey)
org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IArtifactKey>
query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IArtifactKey> query, org.eclipse.core.runtime.IProgressMonitor monitor)
-
Methods inherited from class org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl
getArtifact, getArtifactDescriptors, getRawArtifact, isFatal, nonNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.tycho.repository.p2base.artifact.provider.IArtifactProvider
getArtifact
-
Methods inherited from interface org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactProvider
getArtifactDescriptors, getRawArtifact
-
-
-
-
Field Detail
-
components
private java.util.List<IRawArtifactFileProvider> components
-
-
Constructor Detail
-
CompositeArtifactProvider
public CompositeArtifactProvider(IRawArtifactFileProvider... components)
-
CompositeArtifactProvider
public CompositeArtifactProvider(java.util.List<IRawArtifactFileProvider> providers)
-
CompositeArtifactProvider
public CompositeArtifactProvider(java.util.List<IRawArtifactFileProvider> providers1, java.util.List<IRawArtifactFileProvider> providers2)
-
-
Method Detail
-
contains
public boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Description copied from interface:IArtifactProvider
Returnstrue
if this is a provider for the given artifact.- Specified by:
contains
in interfaceIArtifactProvider
- Parameters:
key
- An artifact key- Returns:
true
if this instance can provide the artifact for the given key
-
contains
public boolean contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Description copied from interface:IRawArtifactProvider
Returnstrue
if this a provider for an artifact in the given format- Specified by:
contains
in interfaceIRawArtifactProvider
- Parameters:
descriptor
- An artifact descriptor- Returns:
true
if this instance can provide the artifact as raw artifact in the described format
-
getArtifactDescriptorsOfAllSources
protected void getArtifactDescriptorsOfAllSources(org.eclipse.equinox.p2.metadata.IArtifactKey key, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> result)
- Specified by:
getArtifactDescriptorsOfAllSources
in classCompositeArtifactProviderBaseImpl
-
getArtifactFile
public java.io.File getArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Description copied from interface:IArtifactFileProvider
Returns the file system location of the given artifact.- Specified by:
getArtifactFile
in interfaceIArtifactFileProvider
- Parameters:
key
- An artifact key- Returns:
- The location of the specified artifact, or
null
the given artifact does not exist.
-
getArtifactFile
public java.io.File getArtifactFile(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Description copied from interface:IRawArtifactFileProvider
Returns the file system location of the given artifact in the given format.- Specified by:
getArtifactFile
in interfaceIRawArtifactFileProvider
- Parameters:
descriptor
- The key and format of an artifact- Returns:
- The location of the specified raw artifact, or
null
the that artifact does not exist in the given format.
-
getArtifactFromAnySource
protected void getArtifactFromAnySource(IArtifactSink sink, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
- Specified by:
getArtifactFromAnySource
in classCompositeArtifactProviderBaseImpl
- Throws:
ArtifactSinkException
-
getRawArtifactFromAnySource
protected void getRawArtifactFromAnySource(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor, java.util.List<org.eclipse.core.runtime.IStatus> statusCollector) throws ArtifactSinkException
- Specified by:
getRawArtifactFromAnySource
in classCompositeArtifactProviderBaseImpl
- Throws:
ArtifactSinkException
-
getArtifactNotFoundError
protected org.eclipse.core.runtime.Status getArtifactNotFoundError(java.lang.String artifact)
- Specified by:
getArtifactNotFoundError
in classCompositeArtifactProviderBaseImpl
-
query
public org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IArtifactKey> query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IArtifactKey> query, org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
query
in interfaceorg.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
-
componentsAsQueriable
private org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey> componentsAsQueriable()
-
isFileAlreadyAvailable
public boolean isFileAlreadyAvailable(org.eclipse.equinox.p2.metadata.IArtifactKey artifactKey)
- Specified by:
isFileAlreadyAvailable
in interfaceIArtifactFileProvider
-
-