From 8061c6c9473a2197750bff8064a15a674e19fce8 Mon Sep 17 00:00:00 2001 From: Matthias Lindinger Date: Thu, 7 Sep 2023 13:36:32 +0200 Subject: [PATCH] Add builder for RenderingHints --- CHANGELOG.md | 1 + .../digitalcollections/model/view/RenderingHints.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28f2fe7f..56ca2720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added missing builders and missing `hashCode`, `equals`, `toString` methods - Added mapping logic for table elements to `HtmlMapper` - Added possibility to define a custom parser in `HtmlMapper` +- Added builder for `RenderingHints` ## [12.1.0](https://github.com/dbmdz/digitalcollections-model/releases/tag/12.1.0) - 2023-08-01 diff --git a/dc-model/src/main/java/de/digitalcollections/model/view/RenderingHints.java b/dc-model/src/main/java/de/digitalcollections/model/view/RenderingHints.java index 4d6a7faa..9b6fdc2a 100644 --- a/dc-model/src/main/java/de/digitalcollections/model/view/RenderingHints.java +++ b/dc-model/src/main/java/de/digitalcollections/model/view/RenderingHints.java @@ -1,6 +1,9 @@ package de.digitalcollections.model.view; +import lombok.experimental.SuperBuilder; + /** Contains hints for rendering a webpage */ +@SuperBuilder public class RenderingHints { /** Defines if an in-page navigation (a TOC) is rendered */ @@ -9,6 +12,13 @@ public class RenderingHints { /** Defines the name of the template to use for rendering */ private String templateName; + public RenderingHints() {} + + public RenderingHints(boolean showInPageNavigation, String templateName) { + this.showInPageNavigation = showInPageNavigation; + this.templateName = templateName; + } + public String getTemplateName() { return templateName; }