public class LocalArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
Modifier and Type | Field and Description |
---|---|
private RepositoryReader |
contentLocator |
private java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> |
descriptorsOnLastSave |
private LocalRepositoryP2Indices |
localRepoIndices |
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) |
private java.io.File |
getBasedir() |
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. |
private java.lang.String |
getMetadataRelpath(GAV gav) |
protected java.io.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() |
private void |
loadMaven() |
void |
save() |
private void |
saveMaven() |
private GAVArtifactDescriptor |
toInternalDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor) |
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
private java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> descriptorsOnLastSave
private final LocalRepositoryP2Indices localRepoIndices
private final RepositoryReader contentLocator
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)
private void loadMaven()
private void saveMaven()
private java.lang.String getMetadataRelpath(GAV gav)
public void save()
protected java.io.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
instanceprivate GAVArtifactDescriptor toInternalDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
private java.io.File getBasedir()
public 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>