Package de.mhus.lib.core.vault
Class MapMutableVaultSource
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.vault.MapMutableVaultSource
-
- All Implemented Interfaces:
ILog,MutableVaultSource,VaultSource
- Direct Known Subclasses:
FileVaultSource,FolderVaultSource
public abstract class MapMutableVaultSource extends MLog implements MutableVaultSource
-
-
Constructor Summary
Constructors Constructor Description MapMutableVaultSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntry(VaultEntry entry)VaultEntrygetEntry(UUID id)Return a entry by id or null if not found.Set<UUID>getEntryIds()Return a not editable list of current stored entry ids.StringgetName()Return a unique name of the source.voidremoveEntry(UUID id)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.mhus.lib.core.vault.MutableVaultSource
doLoad, doSave, isMemoryBased
-
Methods inherited from interface de.mhus.lib.core.vault.VaultSource
getEditable
-
-
-
-
Field Detail
-
entries
protected HashMap<UUID,VaultEntry> entries
-
name
protected String name
-
-
Method Detail
-
getEntry
public VaultEntry getEntry(UUID id)
Description copied from interface:VaultSourceReturn a entry by id or null if not found.- Specified by:
getEntryin interfaceVaultSource- Returns:
- The id or null
-
getEntryIds
public Set<UUID> getEntryIds()
Description copied from interface:VaultSourceReturn a not editable list of current stored entry ids.- Specified by:
getEntryIdsin interfaceVaultSource- Returns:
- a list of ids.
-
getName
public String getName()
Description copied from interface:VaultSourceReturn a unique name of the source.- Specified by:
getNamein interfaceVaultSource- Returns:
- the name
-
addEntry
public void addEntry(VaultEntry entry) throws de.mhus.lib.errors.MException
- Specified by:
addEntryin interfaceMutableVaultSource- Throws:
de.mhus.lib.errors.MException
-
removeEntry
public void removeEntry(UUID id) throws de.mhus.lib.errors.MException
- Specified by:
removeEntryin interfaceMutableVaultSource- Throws:
de.mhus.lib.errors.MException
-
-