specify additional tags for CSV upload

You can now specify additional tags to be added to all entries.
This makes it possible to remove columns that would be identical
for all entries.
This commit is contained in:
2019-12-14 07:59:22 +01:00
parent 5d8df6888d
commit 4e554bfa85
5 changed files with 69 additions and 17 deletions

View File

@@ -179,6 +179,10 @@ public class Tags implements Comparable<Tags> {
return Collections.unmodifiableList(tags);
}
List<Tag> getTagsUnsafe() {
return tags;
}
public void forEach(final BiConsumer<String, String> keyValueConsumer) {
for (final Tag tag : tags) {

View File

@@ -5,7 +5,16 @@ import java.util.List;
public class TagsBuilder {
final List<Tag> tags = new ArrayList<>();
final List<Tag> tags;
public TagsBuilder() {
tags = new ArrayList<>();
}
public TagsBuilder(final Tags tags) {
this.tags = new ArrayList<>();
this.tags.addAll(tags.getTagsUnsafe());
}
public static TagsBuilder create() {
return new TagsBuilder();
@@ -31,4 +40,5 @@ public class TagsBuilder {
public Tags build() {
return Tags.create(tags);
}
}