public class KeePassFileBuilder extends Object
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.
|
GroupZipper |
getZipper()
Returns a
GroupZipper with the structure of the builders KeePassFile as underlying data. |
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 GroupZipper getZipper()
GroupZipper with the structure of the builders KeePassFile as underlying data.
A GroupZipper can be used to easily modify existing KeePass files.
Copyright © 2016. All rights reserved.