summaryrefslogtreecommitdiff
path: root/src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2023-04-03 14:34:32 +0200
committerPaul-Christian Volkmer2023-04-03 14:35:31 +0200
commita97d76e5bbe42cde2a5729efedcdcdcd7c26bbe9 (patch)
treea1d835ea86ba24a13bf5904c49cdb16e1085e0cb /src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java
parentd548c5e5a3cb190fd68b90e2c12dc775da5edf5f (diff)
Issue #20: Detailimplementierungen für Consent Management
Diffstat (limited to 'src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java')
-rw-r--r--src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java b/src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java
new file mode 100644
index 0000000..eb6c8ce
--- /dev/null
+++ b/src/main/java/DNPM/services/consent/ConsentManagerServiceFactory.java
@@ -0,0 +1,25 @@
+package DNPM.services.consent;
+
+import de.itc.onkostar.api.IOnkostarApi;
+
+public class ConsentManagerServiceFactory {
+
+ private final IOnkostarApi onkostarApi;
+
+ public ConsentManagerServiceFactory(
+ final IOnkostarApi onkostarApi
+ ) {
+ this.onkostarApi = onkostarApi;
+ }
+
+ public ConsentManagerService currentUsableInstance() {
+ var consentFormName = onkostarApi.getGlobalSetting("consentform");
+
+ switch (consentFormName) {
+ case "MR.Consent":
+ default:
+ return new MrConsentManagerService(this.onkostarApi);
+ }
+ }
+
+}