Class FileBasedTychoRepositoryIndex
- java.lang.Object
-
- org.eclipse.tycho.repository.local.index.FileBasedTychoRepositoryIndex
-
- All Implemented Interfaces:
TychoRepositoryIndex
public class FileBasedTychoRepositoryIndex extends Object implements TychoRepositoryIndex
Simplistic local Maven repository index to allow efficient lookup of all installed Tycho projects. The content is persisted in a local file.
-
-
Field Summary
Fields Modifier and Type Field Description static StringARTIFACTS_INDEX_RELPATHstatic StringMETADATA_INDEX_RELPATH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGav(GAV gav)Adds a GAV to the indexstatic TychoRepositoryIndexcreateArtifactsIndex(File basedir, FileLockService fileLockService, MavenLogger logger)static TychoRepositoryIndexcreateMetadataIndex(File basedir, FileLockService fileLockService, MavenLogger logger)Set<GAV>getProjectGAVs()Receive the set of GAVs contained in this indexvoidremoveGav(GAV gav)Remove a GAV from the index.voidsave()Changes performed viaTychoRepositoryIndex.addGav(GAV),TychoRepositoryIndex.removeGav(GAV)will only be reflected in the memory state of the index.
-
-
-
Field Detail
-
ARTIFACTS_INDEX_RELPATH
public static final String ARTIFACTS_INDEX_RELPATH
- See Also:
- Constant Field Values
-
METADATA_INDEX_RELPATH
public static final String METADATA_INDEX_RELPATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProjectGAVs
public Set<GAV> getProjectGAVs()
Description copied from interface:TychoRepositoryIndexReceive the set of GAVs contained in this index- Specified by:
getProjectGAVsin interfaceTychoRepositoryIndex- Returns:
- an unmodifiable defensive copy of the GAV set contained in this index
-
addGav
public void addGav(GAV gav)
Description copied from interface:TychoRepositoryIndexAdds a GAV to the index- Specified by:
addGavin interfaceTychoRepositoryIndex- Parameters:
gav- notnull
-
removeGav
public void removeGav(GAV gav)
Description copied from interface:TychoRepositoryIndexRemove a GAV from the index.- Specified by:
removeGavin interfaceTychoRepositoryIndex
-
save
public void save() throws IOExceptionDescription copied from interface:TychoRepositoryIndexChanges performed viaTychoRepositoryIndex.addGav(GAV),TychoRepositoryIndex.removeGav(GAV)will only be reflected in the memory state of the index. In case the index is bound some persistence location (e.g. a file seeFileBasedTychoRepositoryIndex#createArtifactsIndex(java.io.File)) the method will store the current memory content to the persistence storage.- Specified by:
savein interfaceTychoRepositoryIndex- Throws:
IOException
-
createMetadataIndex
public static TychoRepositoryIndex createMetadataIndex(File basedir, FileLockService fileLockService, MavenLogger logger)
-
createArtifactsIndex
public static TychoRepositoryIndex createArtifactsIndex(File basedir, FileLockService fileLockService, MavenLogger logger)
-
-