public class KeePassFileBuilder extends Object implements KeePassFileContract
KeePassFiles.
Can be used to create a completely new KeePassFile or to modify an
existing one.
To modify an existing one use the GroupZipper.
| Constructor and Description |
|---|
KeePassFileBuilder(KeePassFile keePassFile)
Creates a builder and initializes it with the structure from the given
KeePass file.
|
KeePassFileBuilder(Meta meta)
Creates a builder with the given meta object.
|
KeePassFileBuilder(String databaseName)
Creates a builder with the given databasename.
|
| Modifier and Type | Method and Description |
|---|---|
KeePassFileBuilder |
addTopEntries(Entry... entries)
Add the given entries right under the root node.
|
KeePassFileBuilder |
addTopGroups(Group... groups)
Adds the given groups right under the root node.
|
KeePassFile |
build()
Builds a new KeePass file.
|
Meta |
getMeta() |
Group |
getRoot() |
KeePassFileBuilder |
withMeta(Meta meta) |
public KeePassFileBuilder(KeePassFile keePassFile)
keePassFile - the KeePass file which will be used to initialize the builderpublic KeePassFileBuilder(String databaseName)
databaseName - the name of the databasepublic KeePassFileBuilder(Meta meta)
meta - the meta object to initialize the builder metapublic KeePassFileBuilder withMeta(Meta meta)
public KeePassFileBuilder addTopGroups(Group... groups)
groups - the groups which should be addedpublic KeePassFileBuilder addTopEntries(Entry... entries)
entries - the entries which should be addedpublic KeePassFile build()
KeePassFilepublic Meta getMeta()
getMeta in interface KeePassFileContractpublic Group getRoot()
getRoot in interface KeePassFileContractCopyright © 2018. All rights reserved.