public class RepoMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
BACKINGSTORE_DIR |
Modifier | Constructor and Description |
---|---|
protected |
RepoMap(java.lang.String fileName)
Constructs a new RepoMap and loads it content from the file at 'path'
|
protected |
RepoMap(java.lang.String baseDir,
java.lang.String fileName)
Constructs a new RepoMap and loads it content from the file at 'path'
|
Modifier and Type | Method and Description |
---|---|
protected RepoRecord |
addRecord(RepoRecord record)
Adds a record to the map
|
protected boolean |
anyAreNull(java.lang.Object... values) |
java.util.List<RepoDescriptor> |
getDescriptors()
Gets a sorted list of name-description pairs for all records in the map
|
protected RepoRecord |
getRecord(java.lang.String name)
Gets a named record from the map
|
boolean |
hasRecord(java.lang.String name)
Checks if the map already has a key of the name passed
|
RepoRecord |
removeRecord(java.lang.String name)
Removes a named record from the map
|
protected void |
save() |
protected RepoMap(java.lang.String fileName)
fileName
- the name of the file in the default dir to load into the mapprotected RepoMap(java.lang.String baseDir, java.lang.String fileName)
baseDir
- the absolute path to the file's base dirfileName
- the name of the file in the default dir to load into the mapprotected RepoRecord addRecord(RepoRecord record)
record
- the record to addprotected RepoRecord getRecord(java.lang.String name)
name
- the name of the recordpublic boolean hasRecord(java.lang.String name)
name
- the name to checkpublic RepoRecord removeRecord(java.lang.String name)
name
- the name of the recordpublic java.util.List<RepoDescriptor> getDescriptors()
protected boolean anyAreNull(java.lang.Object... values)
protected void save()