public class ProviderOnlyArtifactRepository extends AbstractArtifactRepository2 implements org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository, IRawArtifactFileProvider
IRawArtifactFileProvider to IFileArtifactRepository.| Constructor and Description |
|---|
ProviderOnlyArtifactRepository(IRawArtifactFileProvider delegate,
org.eclipse.equinox.p2.core.IProvisioningAgent agent,
URI location) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns
true if this a provider for an artifact in the given format |
boolean |
contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returns
true if this is a provider for the given artifact. |
org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> |
descriptorQueryable() |
org.eclipse.core.runtime.IStatus |
getArtifact(IArtifactSink sink,
org.eclipse.core.runtime.IProgressMonitor monitor)
Writes the requested artifact to the given
IArtifactSink. |
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.
|
File |
getArtifactFile(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns the file system location of the given artifact in the given format.
|
File |
getArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returns the file system location of the given artifact.
|
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 given
IRawArtifactSink. |
protected void |
internalAddDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor) |
protected void |
internalRemoveAllDescriptors() |
protected void |
internalRemoveDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor) |
protected void |
internalRemoveDescriptors(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] descriptors) |
protected void |
internalRemoveDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key) |
protected void |
internalRemoveDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey[] keys) |
protected void |
internalStore(org.eclipse.core.runtime.IProgressMonitor monitor) |
boolean |
isModifiable() |
IArtifactSink |
newAddingArtifactSink(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returns a new
IArtifactSink instance that adds the received artifact to this
repository on IArtifactSink.commitWrite(). |
IRawArtifactSink |
newAddingRawArtifactSink(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns a new
IRawArtifactSink instance that adds the received artifact to this
repository on IArtifactSink.commitWrite(). |
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) |
addDescriptor, addDescriptor, addDescriptors, addDescriptors, getArtifact, getArtifacts, getOutputStream, getRawArtifact, isFatal, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptors, setStatusOnStreamIfPossiblecreateArtifactDescriptor, createArtifactKey, equals, executeBatch, hashCodeassertModifiable, getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, setDescription, setLocation, setName, setProperties, setProperty, setProperty, setProvider, setType, setVersionclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddDescriptor, addDescriptor, addDescriptors, addDescriptors, createArtifactDescriptor, createArtifactKey, executeBatch, getArtifact, getArtifacts, getOutputStream, getRawArtifact, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptorspublic ProviderOnlyArtifactRepository(IRawArtifactFileProvider delegate, org.eclipse.equinox.p2.core.IProvisioningAgent agent, URI location)
public boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
IArtifactProvidertrue if this is a provider for the given artifact.contains in interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorycontains in interface IArtifactProvidercontains in class org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepositorykey - An artifact keytrue if this instance can provide the artifact for the given keypublic 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)
query in interface org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>public File getArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
IArtifactFileProvidergetArtifactFile in interface org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepositorygetArtifactFile in interface IArtifactFileProviderkey - An artifact keynull the given artifact does
not exist.public org.eclipse.core.runtime.IStatus getArtifact(IArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
IArtifactProviderIArtifactSink.
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.
getArtifact in interface IArtifactProvidersink - A sink for a specific artifact. When this method returns, the sink will either be
closed (with IArtifactSink.commitWrite() or
IArtifactSink.abortWrite(), depending on the status), or not have received
any content.monitor - A progress monitor, or nullArtifactSinkException - if that exception is thrown by the given IArtifactSinkIArtifactSink.getArtifactToBeWritten()public org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] getArtifactDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
IRawArtifactProvidergetArtifactDescriptors in interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorygetArtifactDescriptors in interface IRawArtifactProvidergetArtifactDescriptors in class org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepositorykey - An artifact keypublic boolean contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
IRawArtifactProvidertrue if this a provider for an artifact in the given formatcontains in interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorycontains in interface IRawArtifactProvidercontains in class org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepositorydescriptor - An artifact descriptortrue if this instance can provide the artifact as raw artifact in the
described formatpublic File getArtifactFile(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
IRawArtifactFileProvidergetArtifactFile in interface org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepositorygetArtifactFile in interface IRawArtifactFileProviderdescriptor - The key and format of an artifactnull the that artifact
does not exist in the given format.public org.eclipse.core.runtime.IStatus getRawArtifact(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
IRawArtifactProviderIRawArtifactSink.
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.
getRawArtifact in interface IRawArtifactProvidersink - A sink for a specific artifact in a specific format. When this method returns, the
sink will either be closed (with IArtifactSink.commitWrite() or
IArtifactSink.abortWrite(), depending on the status), or not have
received any content.monitor - A progress monitor, or nullArtifactSinkException - if that exception is thrown by the given IArtifactSinkIArtifactSink.getArtifactToBeWritten(),
IRawArtifactSink.getArtifactFormatToBeWritten()public org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> descriptorQueryable()
descriptorQueryable in interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorypublic boolean isModifiable()
isModifiable in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IArtifactKey>isModifiable in class org.eclipse.equinox.p2.repository.spi.AbstractRepository<org.eclipse.equinox.p2.metadata.IArtifactKey>protected void internalAddDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
internalAddDescriptor in class AbstractArtifactRepository2protected void internalRemoveDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
internalRemoveDescriptor in class AbstractArtifactRepository2protected void internalRemoveDescriptors(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] descriptors)
internalRemoveDescriptors in class AbstractArtifactRepository2protected void internalRemoveDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
internalRemoveDescriptors in class AbstractArtifactRepository2protected void internalRemoveDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey[] keys)
internalRemoveDescriptors in class AbstractArtifactRepository2protected void internalRemoveAllDescriptors()
internalRemoveAllDescriptors in class AbstractArtifactRepository2protected void internalStore(org.eclipse.core.runtime.IProgressMonitor monitor)
internalStore in class AbstractArtifactRepository2public IArtifactSink newAddingArtifactSink(org.eclipse.equinox.p2.metadata.IArtifactKey key) throws org.eclipse.equinox.p2.core.ProvisionException
AbstractArtifactRepository2IArtifactSink instance that adds the received artifact to this
repository on IArtifactSink.commitWrite().newAddingArtifactSink in class AbstractArtifactRepository2key - The artifact key to be added to this repositoryorg.eclipse.equinox.p2.core.ProvisionException - if the artifact is already stored in the repository (in canonical format)public IRawArtifactSink newAddingRawArtifactSink(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor) throws org.eclipse.equinox.p2.core.ProvisionException
AbstractArtifactRepository2IRawArtifactSink instance that adds the received artifact to this
repository on IArtifactSink.commitWrite().newAddingRawArtifactSink in class AbstractArtifactRepository2descriptor - The artifact descriptor to the added to this repositoryorg.eclipse.equinox.p2.core.ProvisionException - if the artifact is already stored in the repository in the given format.Copyright © 2008-2015 Eclipse Foundation. All Rights Reserved.