diff --git a/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/ConfigResponse.java b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/ConfigResponse.java index 3c5ef51..1f3690b 100644 --- a/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/ConfigResponse.java +++ b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/ConfigResponse.java @@ -10,12 +10,43 @@ package org.dpppt.switzerland.backend.sdk.config.ws.model; +import java.util.ArrayList; +import java.util.Arrays; + public class ConfigResponse { private boolean forceUpdate = false; private boolean forceTraceShutdown = false; private InfoBoxCollection infoBox = null; + private WhatToDoPositiveTestTextsCollection whatToDoPositiveTestTexts = new WhatToDoPositiveTestTextsCollection(){{ + setEn(new WhatToDoPositiveTestTexts(){{ + setEnterCovidcodeBoxSupertitle("Whith the Covidcode"); + setEnterCovidcodeBoxTitle("Break the chains of infectionn"); + setEnterCovidcodeBoxText("By entering the Covidcode blablabla"); + setEnterCovidcodeBoxButtonTitle("Enteer the covidcode"); + setInfoBox(new InfoBox(){{ + setTitle("New Infobox title"); + setMsg("infobox message that can be very long..."); + setUrl("tel://+41 12 345 67 89"); + setUrlTitle("Call the number"); + setIsDismissible(false); + }}); + setFaqEntries(Arrays.asList(new FaqEntry(){{ + setTitle("What is a Covidcode"); + setText("People who have tested positive for the new Coronavirus.\n\nThis ensures that only confirmed cases are notified via the app."); + setLinkTitle("+41 58 463 00 00"); + setLinkUrl("tel://+41584630000"); + setIconAndroid("ic_verified_user"); + setIconIos("ic-verified_user"); + }}, new FaqEntry(){{ + setTitle("What information gets sent?"); + setText("Only the random IDs from your app are sent, no personal data."); + setIconAndroid("ic_key"); + setIconIos("ic-key"); + }})); + }}); + }}; private SDKConfig sdkConfig = new SDKConfig(); private GAENSDKConfig iOSGaenSdkConfig = new GAENSDKConfig(); @@ -45,7 +76,15 @@ public void setInfoBox(InfoBoxCollection infoBox) { this.infoBox = infoBox; } - public boolean isForceTraceShutdown() { + public WhatToDoPositiveTestTextsCollection getWhatToDoPositiveTestTexts() { + return whatToDoPositiveTestTexts; + } + + public void setWhatToDoPositiveTestTexts(WhatToDoPositiveTestTextsCollection whatToDoPositiveTestTexts) { + this.whatToDoPositiveTestTexts = whatToDoPositiveTestTexts; + } + + public boolean isForceTraceShutdown() { return forceTraceShutdown; } diff --git a/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/FaqEntry.java b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/FaqEntry.java new file mode 100644 index 0000000..59f8504 --- /dev/null +++ b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/FaqEntry.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.switzerland.backend.sdk.config.ws.model; + +public class FaqEntry { + + private String title; + private String text; + private String iconAndroid; + private String iconIos; + + /* optional */ + private String linkTitle; + private String linkUrl; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public String getIconAndroid() { + return iconAndroid; + } + + public void setIconAndroid(String iconAndroid) { + this.iconAndroid = iconAndroid; + } + + public String getIconIos() { + return iconIos; + } + + public void setIconIos(String iconIos) { + this.iconIos = iconIos; + } + + public String getLinkTitle() { + return linkTitle; + } + + public void setLinkTitle(String linkTitle) { + this.linkTitle = linkTitle; + } + + public String getLinkUrl() { + return linkUrl; + } + + public void setLinkUrl(String linkUrl) { + this.linkUrl = linkUrl; + } +} diff --git a/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTexts.java b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTexts.java new file mode 100644 index 0000000..850f50d --- /dev/null +++ b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTexts.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.switzerland.backend.sdk.config.ws.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class WhatToDoPositiveTestTexts { + + private String enterCovidcodeBoxSupertitle; + private String enterCovidcodeBoxTitle; + private String enterCovidcodeBoxText; + private String enterCovidcodeBoxButtonTitle; + + //dismissible will be ignored by clients + private InfoBox infoBox; + + private List faqEntries; + + public String getEnterCovidcodeBoxSupertitle() { + return enterCovidcodeBoxSupertitle; + } + + public void setEnterCovidcodeBoxSupertitle(String enterCovidcodeBoxSupertitle) { + this.enterCovidcodeBoxSupertitle = enterCovidcodeBoxSupertitle; + } + + public String getEnterCovidcodeBoxTitle() { + return enterCovidcodeBoxTitle; + } + + public void setEnterCovidcodeBoxTitle(String enterCovidcodeBoxTitle) { + this.enterCovidcodeBoxTitle = enterCovidcodeBoxTitle; + } + + public String getEnterCovidcodeBoxText() { + return enterCovidcodeBoxText; + } + + public void setEnterCovidcodeBoxText(String enterCovidcodeBoxText) { + this.enterCovidcodeBoxText = enterCovidcodeBoxText; + } + + public String getEnterCovidcodeBoxButtonTitle() { + return enterCovidcodeBoxButtonTitle; + } + + public void setEnterCovidcodeBoxButtonTitle(String enterCovidcodeBoxButtonTitle) { + this.enterCovidcodeBoxButtonTitle = enterCovidcodeBoxButtonTitle; + } + + public InfoBox getInfoBox() { + return infoBox; + } + + public void setInfoBox(InfoBox infoBox) { + this.infoBox = infoBox; + } + + public List getFaqEntries() { + return faqEntries; + } + + public void setFaqEntries(List faqEntries) { + this.faqEntries = faqEntries; + } +} diff --git a/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTextsCollection.java b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTextsCollection.java new file mode 100644 index 0000000..aa1e9c6 --- /dev/null +++ b/dpppt-config-backend/src/main/java/org/dpppt/switzerland/backend/sdk/config/ws/model/WhatToDoPositiveTestTextsCollection.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.switzerland.backend.sdk.config.ws.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value = Include.NON_NULL) +public class WhatToDoPositiveTestTextsCollection { + + private WhatToDoPositiveTestTexts de; + private WhatToDoPositiveTestTexts fr; + private WhatToDoPositiveTestTexts it; + private WhatToDoPositiveTestTexts en; + private WhatToDoPositiveTestTexts pt; + private WhatToDoPositiveTestTexts es; + private WhatToDoPositiveTestTexts sq; + private WhatToDoPositiveTestTexts bs; + private WhatToDoPositiveTestTexts hr; + private WhatToDoPositiveTestTexts sr; + private WhatToDoPositiveTestTexts rm; + private WhatToDoPositiveTestTexts tr; + private WhatToDoPositiveTestTexts ti; + + public WhatToDoPositiveTestTexts getDe() { + return de; + } + + public void setDe(WhatToDoPositiveTestTexts de) { + this.de = de; + } + + public WhatToDoPositiveTestTexts getFr() { + return fr; + } + + public void setFr(WhatToDoPositiveTestTexts fr) { + this.fr = fr; + } + + public WhatToDoPositiveTestTexts getIt() { + return it; + } + + public void setIt(WhatToDoPositiveTestTexts it) { + this.it = it; + } + + public WhatToDoPositiveTestTexts getEn() { + return en; + } + + public void setEn(WhatToDoPositiveTestTexts en) { + this.en = en; + } + + public WhatToDoPositiveTestTexts getPt() { + return pt; + } + + public void setPt(WhatToDoPositiveTestTexts pt) { + this.pt = pt; + } + + public WhatToDoPositiveTestTexts getEs() { + return es; + } + + public void setEs(WhatToDoPositiveTestTexts es) { + this.es = es; + } + + public WhatToDoPositiveTestTexts getSq() { + return sq; + } + + public void setSq(WhatToDoPositiveTestTexts sq) { + this.sq = sq; + } + + public WhatToDoPositiveTestTexts getBs() { + return bs; + } + + public void setBs(WhatToDoPositiveTestTexts bs) { + this.bs = bs; + } + + public WhatToDoPositiveTestTexts getHr() { + return hr; + } + + public void setHr(WhatToDoPositiveTestTexts hr) { + this.hr = hr; + } + + public WhatToDoPositiveTestTexts getSr() { + return sr; + } + + public void setSr(WhatToDoPositiveTestTexts sr) { + this.sr = sr; + } + + public WhatToDoPositiveTestTexts getRm() { + return rm; + } + + public void setRm(WhatToDoPositiveTestTexts rm) { + this.rm = rm; + } + + public WhatToDoPositiveTestTexts getTr() { + return tr; + } + + public void setTr(WhatToDoPositiveTestTexts tr) { + this.tr = tr; + } + + public WhatToDoPositiveTestTexts getTi() { + return ti; + } + + public void setTi(WhatToDoPositiveTestTexts ti) { + this.ti = ti; + } +} \ No newline at end of file