Skip to content

Commit

Permalink
added new model for configuration of texts for positive tested app sc…
Browse files Browse the repository at this point in the history
…reen
  • Loading branch information
simonroesch committed Oct 19, 2020
1 parent b4c89e6 commit 889d6a6
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* 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;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* 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<FaqEntry> 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<FaqEntry> getFaqEntries() {
return faqEntries;
}

public void setFaqEntries(List<FaqEntry> faqEntries) {
this.faqEntries = faqEntries;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/*
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* 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;
}
}

0 comments on commit 889d6a6

Please sign in to comment.