From a840f910bb80f55f9b1a3fe4f585fcb44a27b0c2 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 5 Apr 2024 14:49:32 +0200 Subject: [PATCH] add condition case to generated Markdown headline --- .../rbac/rbacdef/RbacViewMermaidFlowchartGenerator.java | 5 +++-- .../5033-hs-office-relation-rbac-REPRESENTATIVE.md | 2 +- .../5-hs-office/503-relation/5033-hs-office-relation-rbac.md | 2 +- .../5-hs-office/504-partner/5043-hs-office-partner-rbac.md | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacViewMermaidFlowchartGenerator.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacViewMermaidFlowchartGenerator.java index 1f615ef3..089f27ae 100644 --- a/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacViewMermaidFlowchartGenerator.java +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacViewMermaidFlowchartGenerator.java @@ -165,7 +165,7 @@ public class RbacViewMermaidFlowchartGenerator { Files.writeString( path, """ - ### rbac %{entityAlias} + ### rbac %{entityAlias} %{case} This code generated was by RbacViewMermaidFlowchartGenerator, do not amend manually. @@ -174,7 +174,8 @@ public class RbacViewMermaidFlowchartGenerator { ``` """ .replace("%{entityAlias}", rbacDef.getRootEntityAlias().aliasName()) - .replace("%{flowchart}", flowchart.toString()), + .replace("%{flowchart}", flowchart.toString()) + .replace("%{case}", forCase == null ? "" : (forCase.toString()) ), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); System.out.println("Markdown-File: " + path.toAbsolutePath()); } diff --git a/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac-REPRESENTATIVE.md b/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac-REPRESENTATIVE.md index 91a991a1..e5f608e8 100644 --- a/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac-REPRESENTATIVE.md +++ b/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac-REPRESENTATIVE.md @@ -1,4 +1,4 @@ -### rbac relation +### rbac relation inCaseOf:REPRESENTATIVE This code generated was by RbacViewMermaidFlowchartGenerator, do not amend manually. diff --git a/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac.md b/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac.md index d1efd785..4ff19e79 100644 --- a/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac.md +++ b/src/main/resources/db/changelog/5-hs-office/503-relation/5033-hs-office-relation-rbac.md @@ -1,4 +1,4 @@ -### rbac relation +### rbac relation inOtherCases This code generated was by RbacViewMermaidFlowchartGenerator, do not amend manually. diff --git a/src/main/resources/db/changelog/5-hs-office/504-partner/5043-hs-office-partner-rbac.md b/src/main/resources/db/changelog/5-hs-office/504-partner/5043-hs-office-partner-rbac.md index 3522b5a3..a8ff3960 100644 --- a/src/main/resources/db/changelog/5-hs-office/504-partner/5043-hs-office-partner-rbac.md +++ b/src/main/resources/db/changelog/5-hs-office/504-partner/5043-hs-office-partner-rbac.md @@ -1,4 +1,4 @@ -### rbac partner +### rbac partner This code generated was by RbacViewMermaidFlowchartGenerator, do not amend manually.