Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 6c26a96

Browse files
author
jenkins
committed
[GITFLOW]merging 'release-1.47.0' into 'master'
2 parents b0fbeb0 + 8a181f2 commit 6c26a96

778 files changed

Lines changed: 37114 additions & 14906 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ language: java
22
jdk:
33
- openjdk8
44
before_install: cd sormas-base
5-
install: mvn test -B
5+
install: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
- Recommended: Install a Git client such as [TortoiseGit](https://tortoisegit.org/) if you don't want to handle version control from the command line or separately for the Eclipse and Android Studio projects
1010
- Open the Git Bash and execute the command <code>git config --global branch.development.rebase true</code> (which ensures that rebase is used when pulling rather than merge)
1111

12+
## Java
13+
- Download and install the Java 8 **JDK** (not JRE) for your operating system. We suggest to use Zulu OpenJDK: https://www.azul.com/downloads/zulu/
14+
* **Linux**: https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm
15+
16+
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
17+
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
18+
sudo apt-get update
19+
sudo apt-get install zulu-8
20+
- **Windows**: For testing and development environments we suggest to download and run the installer of the Java 8 **JDK** for 32 or 64 bit client systems (depending on your system).
21+
1222
## Eclipse
1323
- Install the latest Eclipse version
1424
- Set the default JRE of Eclipse to the installed Zulu Java SDK: [Assigning the default JRE for the workbench ](https://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-assign_default_jre.htm)
@@ -35,7 +45,7 @@
3545

3646
## IntelliJ
3747
- Install the latest Ultimate edition IntelliJ
38-
- Set the project SDK to use the installed Zulu Java SDK
48+
- Set the project SDK to use the installed Zulu Java 8 SDK
3949
- Clone the SORMAS-Project repository and open the project in IntelliJ
4050
- make sure the under "File -> Project Structure -> Modules" all the modules (except the android app - this should not be added) are recognized, if not add the modules with +
4151
- Make sure under "File -> Settings -> Plugins" Glassfish & Ant integrations are enabled (look into the "Installed" tab)
@@ -60,9 +70,9 @@
6070
- install Eclipse Code Formatter for IntelliJ (https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter)
6171
- open the plugin settings (Other Settings -> Eclipse Code Formatter) and select "Use the Eclipse Code Formatter"
6272
- under "Eclipse Formatter config file", select ``sormas-base/java-formatter-profile.xml``
63-
- check optimize imports and, for "Iport order", select ``sormas-base/java-importorder-profile.importorder``
73+
- check optimize imports and, for "Import order", select ``sormas-base/java-importorder-profile.importorder``
6474
- **Important:** select "Do not format other file types by IntelliJ formatter"
65-
- go to Preferences -> Editor -> Code style -> Java : set class and static names counts for import with * to 99
75+
- go to Preferences -> Editor -> Code style -> Java -> Imports: set class and static names counts for import with * to 99
6676
- for IntelliJ, code formatting is usually done with Ctrl+Alt+L. For automatic formatting, it's recommended to use the plugin Save Actions (https://plugins.jetbrains.com/plugin/7642-save-actions)
6777

6878
## Android Studio

GUIDE_CREATE_CERTIFICATE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# How to create a new certificate?
2+
3+
This guide explains how to create a new self-signed certificate, used for SORMAS to SORMAS communication.
4+
5+
### Using the certificate generation script
6+
7+
1. Run ``bash ./generate-cert.sh``
8+
2. For the generation of the certificate, the following data is needed: a password, a *Common Name* (CN)
9+
and an *Organization* (O). These may be set in environment variables (recommended), or provided
10+
manually as the script executes.
11+
* The password environment variable should be named ``SORMAS_S2S_CERT_PASS``.
12+
* the *Common Name* environment variable should be named ``SORMAS_S2S_CERT_CN``.<br/>
13+
**Important**: for Germany, this value should be the SurvNet Code Site. <br/>
14+
E.g. *2.03.1.01.*
15+
* the *Organization* (O) environment variable should be named ``SORMAS_S2S_CERT_ORG``.<br/>
16+
**Important**: for Germany, this value should be the name of the Health Department (Gesundheitsamt)
17+
to which the SORMAS instance will be assigned. <br/>
18+
E.g. *GA Braunschweig*
19+
3. After providing the requested data, the certificate files will be generated. <br/>
20+
The generated certificate has a validity of 3 years.
21+
The certificate files will be available in the root SORMAS directory, in the folder ``/sormas2sormas``.
22+
4. The generated ``.p12`` file should not be shared with third parties. <br/>
23+
The generated ``.crt`` file will be verified and shared with other SORMAS instances, from which this instance
24+
will be able to request data. Conversely, in order to enable other SORMAS instances to request data from this
25+
instance, their certificate files should be obtained and added to the local truststore. More details can be found
26+
in the next section.
27+
5. If the ``SORMAS_PROPERTIES`` environment variable is available, the relevant properties will be
28+
automatically set by the script.
29+
* Else, the properties which need to be added will be displayed in the console after the script finishes executing.
30+
* Please note these properties and add them to the ``sormas.properties`` file. This should be located in the
31+
``/domains/sormas`` folder.
32+
* Example output:
33+
```
34+
sormas.properties file was not found.
35+
Please add the following properties to the sormas.properties file:
36+
sormas2sormas.keyAlias=mycertificate
37+
sormas2sormas.keyPassword=changeit
38+
```
39+
40+
### Adding a new certificate to the Truststore
41+

SERVER_CUSTOMIZATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following properties are currently configurable:
2727
* **Name similarity threshold** *(namesimilaritythreshold)*: This is used when comparing cases or contacts to find duplicates in the system, either in retrospection or during creation or import. The higher the value, the more restrictive the algorithm, i.e. less potential duplicates will be found. It is suggested to play around with this setting to see which value works for your country and language.
2828
* **Dev mode** *(devmode)*: Enabling developer mode will give you access to a tab in the Configuration menu that allows admins to create dummy cases and contacts to quickly fill the database. This is only meant to be used on development or demo systems and should be left disabled for production servers.
2929
* **Infrastructure sync threshold** *(infrastructuresyncthreshold)*: Synchronizing infrastructure data to mobile apps (e.g. regions or health facilities) is done in chunks to avoid connection timeouts. If you expect your users to have very bad internet connection, lowering this threshold could make it easier for them to synchronize this data.
30-
* **Archiving thresholds** *(daysAfterCaseGetsArchived and daysAfterEventGetsArchived)*: The number of days without any changes after which cases/events are automatically archived (i.e. they will no longer be displayed in the normal directories, but still count towards statistics or counts on the dashboard and can still be viewed by users with the respective user right).
30+
* **Archiving thresholds** *(daysAfterCaseGetsArchived and daysAfterEventGetsArchived)*: The number of days without any changes after which cases/events are automatically archived (i.e. they will no longer be displayed in the normal directories, but still count towards statistics or counts on the dashboard and can still be viewed by users with the respective user right). If set to 0, automatic archiving is disabled.
3131
* **Rscript executable** *(rscript.executable)*: The location of the Rscript executable. If you've installed Rscript on your server and specify the path here (the default should work for Linux systems as long as you've used the default install path), network diagrams for transmission chains will be shown in the web app.
3232
* **Symptom journal interface**: Properties used to connect to an external symptom journal service. *interface.symptomjournal.url* is the URL to the website that SORMAS should connect to; *interface.symptomjournal.authurl* is the URL used to authenticate SORMAS at the external service; *interface.symptomjournal.clientid* and *interface.symptomjournal.secret* are the credentials used for the authentication process.
3333
* **Custom branding**: Properties used to apply a custom branding to SORMAS that overrides its name and default logo. Using these properties also alters the sidebar and adds another customizable area to it. If you want to use this feature, set *custombranding* to true. *custombranding.name* is the name that you want to use, *custombranding.logo.path* is the path to the logo that should be used.

SERVER_SETUP.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@ This can be conveniently accomplished by executing the R setup script from the S
236236

237237
* Follow the instructions of the script.
238238

239+
## SORMAS to SORMAS Certificate Setup
240+
241+
To be able to communicate with other SORMAS instances, there are some additional steps which need to be taken, in order to set
242+
up the certificate and the truststore. Please see the [related guide](GUIDE_CREATE_CERTIFICATE.md) for detailed instructions regarding
243+
SORMAS to SORMAS setup.
244+
<br/>
239245

240246
## Troubleshooting
241247

sormas-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.symeda.sormas</groupId>
44
<artifactId>sormas-base</artifactId>
5-
<version>1.46.0</version>
5+
<version>1.47.0</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +11,7 @@
1111

1212
<build>
1313
<finalName>${project.artifactId}</finalName>
14-
<resources>
14+
<resources>
1515
<resource>
1616
<directory>src/main/resources</directory>
1717
<filtering>true</filtering>

sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api;
1919

20-
import de.symeda.sormas.api.region.GeoLatLon;
21-
2220
import javax.ejb.Remote;
2321

22+
import de.symeda.sormas.api.region.GeoLatLon;
23+
2424
@Remote
2525
public interface ConfigFacade {
2626

@@ -30,6 +30,8 @@ public interface ConfigFacade {
3030

3131
boolean isGermanServer();
3232

33+
boolean isSwissServer();
34+
3335
String getEpidPrefix();
3436

3537
String getAppUrl();

sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api;
1919

20+
import javax.naming.InitialContext;
21+
import javax.naming.NamingException;
22+
2023
import de.symeda.sormas.api.action.ActionFacade;
2124
import de.symeda.sormas.api.campaign.CampaignFacade;
2225
import de.symeda.sormas.api.campaign.data.CampaignFormDataFacade;
26+
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramDefinitionFacade;
2327
import de.symeda.sormas.api.campaign.form.CampaignFormMetaFacade;
2428
import de.symeda.sormas.api.caze.CaseFacade;
2529
import de.symeda.sormas.api.caze.CaseStatisticsFacade;
30+
import de.symeda.sormas.api.caze.caseimport.CaseImportFacade;
2631
import de.symeda.sormas.api.caze.classification.CaseClassificationFacade;
2732
import de.symeda.sormas.api.caze.maternalhistory.MaternalHistoryFacade;
2833
import de.symeda.sormas.api.clinicalcourse.ClinicalCourseFacade;
@@ -64,9 +69,6 @@
6469
import de.symeda.sormas.api.visit.VisitFacade;
6570
import de.symeda.sormas.api.visualization.VisualizationFacade;
6671

67-
import javax.naming.InitialContext;
68-
import javax.naming.NamingException;
69-
7072
public class FacadeProvider {
7173

7274
private static final String JNDI_PREFIX = "java:global/sormas-ear/sormas-backend/";
@@ -99,6 +101,10 @@ public static CaseStatisticsFacade getCaseStatisticsFacade() {
99101
return get().lookupEjbRemote(CaseStatisticsFacade.class);
100102
}
101103

104+
public static CaseImportFacade getCaseImportFacade() {
105+
return get().lookupEjbRemote(CaseImportFacade.class);
106+
}
107+
102108
public static ContactFacade getContactFacade() {
103109
return get().lookupEjbRemote(ContactFacade.class);
104110
}
@@ -267,6 +273,10 @@ public static CampaignFacade getCampaignFacade() {
267273
return get().lookupEjbRemote(CampaignFacade.class);
268274
}
269275

276+
public static CampaignDiagramDefinitionFacade getCampaignDiagramDefinitionFacade() {
277+
return get().lookupEjbRemote(CampaignDiagramDefinitionFacade.class);
278+
}
279+
270280
public static CampaignFormMetaFacade getCampaignFormMetaFacade() {
271281
return get().lookupEjbRemote(CampaignFormMetaFacade.class);
272282
}

sormas-api/src/main/java/de/symeda/sormas/api/campaign/data/CampaignFormDataEntry.java

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@
1515

1616
package de.symeda.sormas.api.campaign.data;
1717

18+
import java.io.Serializable;
19+
1820
import de.symeda.sormas.api.i18n.I18nProperties;
1921
import de.symeda.sormas.api.i18n.Strings;
2022

21-
import java.io.Serializable;
22-
import java.util.Objects;
23-
2423
public class CampaignFormDataEntry implements Serializable {
2524

2625
private static final long serialVersionUID = -3096020120349257398L;
2726

27+
public static final String ID = "id";
28+
public static final String VALUE = "value";
29+
2830
private String id;
2931
private Object value;
3032

@@ -53,20 +55,21 @@ public void setValue(Object value) {
5355
this.value = value;
5456
}
5557

56-
@Override
57-
public boolean equals(Object o) {
58-
if (this == o)
59-
return true;
60-
if (o == null || getClass() != o.getClass())
61-
return false;
62-
CampaignFormDataEntry that = (CampaignFormDataEntry) o;
63-
return Objects.equals(id, that.id);
64-
}
65-
66-
@Override
67-
public int hashCode() {
68-
return Objects.hash(id);
69-
}
58+
// does not make sense. Leads to hibernate not persisting any changes in value
59+
// @Override
60+
// public boolean equals(Object o) {
61+
// if (this == o)
62+
// return true;
63+
// if (o == null || getClass() != o.getClass())
64+
// return false;
65+
// CampaignFormDataEntry that = (CampaignFormDataEntry) o;
66+
// return Objects.equals(id, that.id);
67+
// }
68+
//
69+
// @Override
70+
// public int hashCode() {
71+
// return Objects.hash(id);
72+
// }
7073

7174
@Override
7275
public String toString() {
@@ -80,5 +83,4 @@ public String toString() {
8083

8184
return value.toString();
8285
}
83-
8486
}

sormas-api/src/main/java/de/symeda/sormas/api/campaign/data/CampaignFormDataFacade.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020

2121
package de.symeda.sormas.api.campaign.data;
2222

23-
import de.symeda.sormas.api.utils.SortProperty;
23+
import java.util.List;
2424

2525
import javax.ejb.Remote;
26-
import java.util.List;
26+
27+
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramCriteria;
28+
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramDataDto;
29+
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramSeries;
30+
import de.symeda.sormas.api.utils.SortProperty;
2731

2832
@Remote
2933
public interface CampaignFormDataFacade {
@@ -45,4 +49,6 @@ public interface CampaignFormDataFacade {
4549
List<CampaignFormDataIndexDto> getIndexList(CampaignFormDataCriteria criteria, Integer first, Integer max, List<SortProperty> sortProperties);
4650

4751
long count(CampaignFormDataCriteria criteria);
52+
53+
List<CampaignDiagramDataDto> getDiagramData(List<CampaignDiagramSeries> diagramSeriesList, CampaignDiagramCriteria campaignDiagramCriteria);
4854
}

0 commit comments

Comments
 (0)