Package de.mhus.lib.core.vault
Class FolderVaultSource
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.vault.MapMutableVaultSource
-
- de.mhus.lib.core.vault.FolderVaultSource
-
- All Implemented Interfaces:
ILog,MutableVaultSource,VaultSource
public class FolderVaultSource extends MapMutableVaultSource
-
-
Field Summary
-
Fields inherited from class de.mhus.lib.core.vault.MapMutableVaultSource
entries, name
-
-
Constructor Summary
Constructors Constructor Description FolderVaultSource(File folder, String passphrase)FolderVaultSource(File folder, String passphrase, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoLoad()voiddoSave()MutableVaultSourcegetEditable()Return a editable instance or null if not supportedbooleanisMemoryBased()Return true if load and save is needed to persist changed data.protected voidloadEntry(File file)protected voidsaveEntry(VaultEntry entry)StringtoString()-
Methods inherited from class de.mhus.lib.core.vault.MapMutableVaultSource
addEntry, getEntry, getEntryIds, getName, removeEntry
-
-
-
-
Constructor Detail
-
FolderVaultSource
public FolderVaultSource(File folder, String passphrase, String name) throws IOException
- Throws:
IOException
-
FolderVaultSource
public FolderVaultSource(File folder, String passphrase) throws IOException
- Throws:
IOException
-
-
Method Detail
-
doLoad
public void doLoad() throws IOException- Throws:
IOException
-
loadEntry
protected void loadEntry(File file) throws IOException
- Throws:
IOException
-
doSave
public void doSave() throws IOException- Throws:
IOException
-
saveEntry
protected void saveEntry(VaultEntry entry) throws IOException
- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classMapMutableVaultSource
-
isMemoryBased
public boolean isMemoryBased()
Description copied from interface:MutableVaultSourceReturn true if load and save is needed to persist changed data.- Returns:
- true if storage is in memory
-
getEditable
public MutableVaultSource getEditable()
Description copied from interface:VaultSourceReturn a editable instance or null if not supported- Returns:
- editable vault source
-
-