Class ModuleMetadataRepository
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.equinox.p2.repository.spi.AbstractRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
-
- org.eclipse.tycho.p2.maven.repository.AbstractMetadataRepository2
-
- org.eclipse.tycho.repository.module.ModuleMetadataRepository
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit>
,org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
,org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
class ModuleMetadataRepository extends AbstractMetadataRepository2
A p2 metadata repository implementation which is persisted in a p2content.xml. The p2content.xml is the file that is deployed to Maven repositories alongside with the built Tycho artifact.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REPOSITORY_TYPE
Type string for this repository type.private java.io.File
storage
private java.util.Set<org.eclipse.equinox.p2.metadata.IInstallableUnit>
units
-
Constructor Summary
Constructors Constructor Description ModuleMetadataRepository(org.eclipse.equinox.p2.core.IProvisioningAgent agent, java.io.File location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInstallableUnits(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
(package private) static boolean
canAttemptRead(java.io.File repositoryDir)
private static java.lang.String
generateName(java.io.File location)
(package private) java.io.File
getPersistenceFile()
private static java.io.File
getStorageFile(java.io.File repositoryDir)
boolean
isModifiable()
private void
load()
org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit>
query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IInstallableUnit> query, org.eclipse.core.runtime.IProgressMonitor monitor)
void
removeAll()
boolean
removeInstallableUnits(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
private void
storeOrThrowProvisioningException()
private void
storeOrThrowRuntimeException()
private void
storeWithoutExceptionHandling()
-
Methods inherited from class org.eclipse.tycho.p2.maven.repository.AbstractMetadataRepository2
addReferences, compress, executeBatch, getReferences
-
Methods inherited from class org.eclipse.equinox.p2.repository.spi.AbstractRepository
assertModifiable, getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, setDescription, setLocation, setName, setProperties, setProperty, setProperty, setProvider, setType, setVersion
-
-
-
-
Field Detail
-
REPOSITORY_TYPE
public static final java.lang.String REPOSITORY_TYPE
Type string for this repository type. This value needs to be passed toIMetadataRepositoryManager.createRepository(URI, String, String, Map)
in order to create a repository of typeModuleMetadataRepository
.- See Also:
- Constant Field Values
-
storage
private java.io.File storage
-
units
private java.util.Set<org.eclipse.equinox.p2.metadata.IInstallableUnit> units
-
-
Method Detail
-
generateName
private static java.lang.String generateName(java.io.File location)
-
load
private void load() throws org.eclipse.equinox.p2.core.ProvisionException
- Throws:
org.eclipse.equinox.p2.core.ProvisionException
-
storeOrThrowProvisioningException
private void storeOrThrowProvisioningException() throws org.eclipse.equinox.p2.core.ProvisionException
- Throws:
org.eclipse.equinox.p2.core.ProvisionException
-
storeOrThrowRuntimeException
private void storeOrThrowRuntimeException()
-
storeWithoutExceptionHandling
private void storeWithoutExceptionHandling() throws java.io.IOException
- Throws:
java.io.IOException
-
query
public org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit> query(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IInstallableUnit> query, org.eclipse.core.runtime.IProgressMonitor monitor)
-
isModifiable
public boolean isModifiable()
- Specified by:
isModifiable
in interfaceorg.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
- Overrides:
isModifiable
in classorg.eclipse.equinox.p2.repository.spi.AbstractRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
-
addInstallableUnits
public void addInstallableUnits(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
-
removeInstallableUnits
public boolean removeInstallableUnits(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
-
removeAll
public void removeAll()
-
getPersistenceFile
java.io.File getPersistenceFile()
-
canAttemptRead
static boolean canAttemptRead(java.io.File repositoryDir)
-
getStorageFile
private static java.io.File getStorageFile(java.io.File repositoryDir)
-
-