public class LocalArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
descriptors, descriptorsMap
Constructor and Description |
---|
LocalArtifactRepository(org.eclipse.equinox.p2.core.IProvisioningAgent agent,
LocalRepositoryP2Indices localRepoIndices,
MavenRepositorySystem repositorySystem) |
LocalArtifactRepository(org.eclipse.equinox.p2.core.IProvisioningAgent agent,
LocalRepositoryP2Indices localRepoIndices,
RepositoryReader contentLocator) |
LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices) |
LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices,
RepositoryReader contentLocator) |
Modifier and Type | Method and Description |
---|---|
org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor |
createArtifactDescriptor(org.eclipse.equinox.p2.metadata.IArtifactKey key) |
protected org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor |
getComparableDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns an
IArtifactDescriptor instance which is comparable to the artifact
descriptors stored in the index (i.e. |
protected GAVArtifactDescriptor |
getInternalDescriptorForAdding(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns an artifact descriptor of the internal descriptor type
ArtifactDescriptorT which may be added to the index. |
protected File |
internalGetArtifactStorageLocation(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns the file system location where the given artifact is or would be stored.
|
boolean |
isModifiable() |
void |
save() |
contains, contains, descriptorQueryable, getArtifact, getArtifact, getArtifactDescriptors, getArtifactFile, getArtifactFile, getRawArtifact, internalAddDescriptor, internalAddInternalDescriptor, internalNewAddingArtifactSink, internalRemoveAllDescriptors, internalRemoveDescriptor, internalRemoveDescriptors, internalRemoveDescriptors, internalRemoveDescriptors, internalStore, newAddingArtifactSink, newAddingRawArtifactSink, query
addDescriptor, addDescriptor, addDescriptors, addDescriptors, getArtifacts, getOutputStream, getRawArtifact, isFatal, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptors, setStatusOnStreamIfPossible
createArtifactKey, equals, executeBatch, hashCode
assertModifiable, getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, setDescription, setLocation, setName, setProperties, setProperty, setProperty, setProvider, setType, setVersion
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addDescriptor, addDescriptor, addDescriptors, addDescriptors, createArtifactKey, executeBatch, getArtifacts, getOutputStream, getRawArtifact, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptors
public LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices)
public LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices, RepositoryReader contentLocator)
public LocalArtifactRepository(org.eclipse.equinox.p2.core.IProvisioningAgent agent, LocalRepositoryP2Indices localRepoIndices, MavenRepositorySystem repositorySystem)
public LocalArtifactRepository(org.eclipse.equinox.p2.core.IProvisioningAgent agent, LocalRepositoryP2Indices localRepoIndices, RepositoryReader contentLocator)
public void save()
protected File internalGetArtifactStorageLocation(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
ArtifactRepositoryBaseImpl
ArtifactRepositoryBaseImpl.getArtifactFile(IArtifactDescriptor)
, this method does not check if the given
artifact exists in the repository and never returns null
.
This method may be called by any API method for reading or writing artifacts.
internalGetArtifactStorageLocation
in class ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
public org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor createArtifactDescriptor(org.eclipse.equinox.p2.metadata.IArtifactKey key)
createArtifactDescriptor
in interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepository
createArtifactDescriptor
in class org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository
protected org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getComparableDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
ArtifactRepositoryBaseImpl
IArtifactDescriptor
instance which is comparable to the artifact
descriptors stored in the index (i.e. the ArtifactRepositoryBaseImpl.descriptors
member). A valid
implementation is to convert the argument to the internal descriptor type
ArtifactDescriptorT
, but this is not a requirement. This method should be
implemented in a way so that calling
descriptors.contains(getComparableDescriptor(foreignDescriptor))
with a
descriptor from a foreign artifact repository returns true
if and only if
copying that foreign artifact to this repository with
AbstractArtifactRepository2.getOutputStream(IArtifactDescriptor)
would not add a new artifact to this
repository.
This method may be called by any API method with an IArtifactDescriptor
argument.
getComparableDescriptor
in class ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
descriptor
- An IArtifactDescriptor
from any artifact repository.protected GAVArtifactDescriptor getInternalDescriptorForAdding(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
ArtifactRepositoryBaseImpl
ArtifactDescriptorT
which may be added to the index. Implementations may require
that the descriptor argument is a descriptor instance created by this repository – see
AbstractArtifactRepository.createArtifactDescriptor(IArtifactKey)
.
This method is called by methods that add entries to the index, i.e. from
ArtifactRepositoryBaseImpl.newAddingArtifactSink(IArtifactKey)
.
getInternalDescriptorForAdding
in class ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
descriptor
- An IArtifactDescriptor
instancepublic 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>
Copyright © 2008-2016 Eclipse Foundation. All Rights Reserved.