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

Commit 6528aff

Browse files
author
jenkins
committed
[GITFLOW]merging 'release-1.49.0' into 'master'
2 parents a17d8dc + e70750c commit 6528aff

428 files changed

Lines changed: 12263 additions & 2423 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.

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ If you've never submitted an issue to the SORMAS repository before or this is yo
2424
* Device:
2525
* SORMAS version:
2626
* Android version/Browser:
27+
* Server URL:
28+
* User Role:
2729

2830
### Additional Information

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ deploy
2323
/sormas-app/java_pid21052.hprof
2424
bin
2525
/sormas-base/setup/setup.log
26+
/sormas-cargoserver/.env
27+
/sormas-cargoserver/custom.env
28+
/sormas-cargoserver/custom.properties

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ language: java
22
jdk:
33
- openjdk8 # FIXME remove after transition period (#2617)
44
- openjdk11
5-
before_install: cd sormas-base
6-
install: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
5+
before_install:
6+
- cd sormas-base
7+
install: skip
8+
script:
9+
- mvn install -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# SORMAS Development Environment
33

44
## Server
5-
- Install [your local server](SERVER_SETUP.md).
5+
- Install [your local server](SERVER_SETUP.md)
6+
- Or install your local development server using [maven cargo](sormas-cargoserver/README.md)
67
- Alternatively [SERVER_DEV_SETUP.md](SERVER_DEV_SETUP.md) could be used (at this time not recommended)
78

89
## Git

GUIDE_SORMAS2SORMAS_CERTIFICATE.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
This guide explains how to:
44
* create a new self-signed certificate, used for SORMAS to SORMAS communication
5+
* set up the server address list file
56
* add certificates of other SORMAS instances to the local truststore
6-
7+
* add other servers to the local server list
8+
79
### Prerequisites
810

911
Java is needed, because the keytool is used for certificate import. <br/>
@@ -31,18 +33,25 @@ the path to the ``sormas.properties`` file.
3133
5. After providing the requested data, the certificate files will be generated. <br/>
3234
The generated certificate has a validity of 3 years.
3335
The certificate files will be available in the root SORMAS directory, in the folder ``/sormas2sormas``.
34-
6. The generated ``.p12`` file should not be shared with third parties. <br/>
36+
6. A CSV file containing the access data for this instance will also be generated in the folder ``/sormas2sormas``.
37+
It will be named ``server-access-data.csv``.
38+
The file will contain on the first two columns of the first row the Common Name and the Organization, as provided
39+
when creating the certificate. <br/>
40+
**Please fill in on the third column the full URL of the server.** <br/>
41+
You will also have to set up a user for communicating with other SORMAS instances.
42+
7. The generated ``.p12`` file should not be shared with third parties. <br/>
3543
The generated ``.crt`` file will be verified and shared with other SORMAS instances, from which this instance
3644
will be able to request data. Conversely, in order to enable other SORMAS instances to request data from this
37-
instance, their certificate files should be obtained and added to the local truststore. More details can be found
38-
in the next section.
39-
7. The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
45+
instance, their certificate files should be obtained and added to the local truststore. The ``server-access-data.csv``
46+
file will also have to be shared so that the access data of this instance is known to other instances.
47+
More details can be found in the next section.
48+
8. The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
4049

4150
### Adding a new certificate to the Truststore
4251

43-
To enable other SORMAS instances to request data from this instance, their certificate must be added to the
44-
truststore of this instance. After obtaining their certificate file, which should be a ``.crt`` file, please
45-
follow the next steps:
52+
To enable other SORMAS instances to send and receive data from this instance, their certificate must be added to the
53+
truststore of this instance. Furthermore, the access data of other instances must be added to the local server
54+
list. To complete this setup, please follow the next steps:
4655
1. Run ``bash ./import-to-truststore.sh``
4756
2. If the ``sormas2sormas`` directory is not found, you will be prompted to provide its path.
4857
3. If the ``SORMAS_PROPERTIES`` environment variable is not available, the script will search for the ``sormas.properties``
@@ -54,7 +63,13 @@ follow the next steps:
5463
``sormas.properties`` file.
5564
* If it is not found there, you will be prompted to provide the truststore password.
5665
* The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
57-
5. You will be prompted to provide the file name of the certificate to be imported. This certificate should be located
66+
5. If the server address list file ``server-list.csv`` is not found in the folder ``/sormas2sormas``, it will also be created.
67+
6. You will be prompted to provide the file name of the certificate to be imported. This certificate should be located
5868
in the ``/sormas2sormas`` folder. Please provide the name including the extension. E.g ``mycert.crt``
59-
6. After providing the requested data, the certificate will be imported to the truststore.
60-
7. You may now delete the ``.crt`` file.
69+
7. After providing the requested data, the certificate will be imported to the truststore.
70+
8. You should have also received a CSV file with the server access data. From this file, copy the line corresponding to the
71+
instance you would like to communicate with and add it to the local server address list file. This file is named
72+
``server-list.csv`` and is located in the ``/sormas2sormas`` folder. <br/>
73+
*Note*: You may check that the Common Name and the Organization of the certificate match the ones corresponding to
74+
the server in the CSV file.
75+
9. You may now delete the ``.crt`` file.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Please [create a new issue](https://github.com/hzi-braunschweig/SORMAS-Project/i
2525
#### Which Browsers and Android Versions Are Supported?
2626
SORMAS officially supports and is tested on **Chromium-based browsers** (like Google Chrome) and **Mozilla Firefox**, and all Android versions starting from **Android 7.0** (Nougat). In principle, SORMAS should be usable with all web browsers that are supported by Vaadin 8 (Chrome, Firefox, Safari, Edge, Internet Explorer 11; see https://vaadin.com/faq).
2727

28+
#### Is there a ReST API documentation?
29+
Yes! Please download the [latest release](https://github.com/hzi-braunschweig/SORMAS-Project/releases/latest) and copy the content of /deploy/openapi/sormas-rest.yaml to an editor that generates a visual API documentation (e.g. https://editor.swagger.io/).
30+
2831
<p align="center"><img src="https://user-images.githubusercontent.com/23701005/74659600-ebb8fc00-5194-11ea-836b-a7ca9d682301.png"/></p>
2932

3033
## Project Structure
@@ -37,6 +40,8 @@ The project consists of the following modules:
3740
- **sormas-ear:** The ear needed to build the application
3841
- **sormas-rest:** The REST interface; see [`sormas-rest/README.md`](sormas-rest/README.md)
3942
- **sormas-ui:** The web application
43+
- **sormas-base/dependencies:** dependencies to be deployed with the payara server
44+
- **sormas-cargoserver:** setup for a local dev server using maven-cargo
4045

4146
## Server Management
4247

sormas-api/pom.xml

Lines changed: 1 addition & 1 deletion
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.48.2</version>
5+
<version>1.49.0</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public interface ConfigFacade {
2828

2929
String getCountryLocale();
3030

31+
String getCountryCode();
32+
3133
boolean isConfiguredCountry(String countryCode);
3234

3335
String getEpidPrefix();
@@ -96,5 +98,9 @@ public interface ConfigFacade {
9698

9799
String getSymptomJournalSecret();
98100

101+
String getPatientDiaryUrl();
102+
99103
void validateExternalUrls();
104+
105+
Sormas2SormasConfig getSormas2SormasConfig();
100106
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package de.symeda.sormas.api;
2+
3+
import java.io.Serializable;
4+
import java.util.Objects;
5+
6+
public class Sormas2SormasConfig implements Serializable, Cloneable {
7+
8+
private static final long serialVersionUID = -7981351672462016280L;
9+
10+
private String filePath;
11+
private String keyAlias;
12+
private String keystoreName;
13+
private String keystorePass;
14+
private String truststoreName;
15+
private String truststorePass;
16+
17+
public String getFilePath() {
18+
return filePath;
19+
}
20+
21+
public void setFilePath(String filePath) {
22+
this.filePath = filePath;
23+
}
24+
25+
public String getKeyAlias() {
26+
return keyAlias;
27+
}
28+
29+
public void setKeyAlias(String keyAlias) {
30+
this.keyAlias = keyAlias;
31+
}
32+
33+
public String getKeystoreName() {
34+
return keystoreName;
35+
}
36+
37+
public void setKeystoreName(String keystoreName) {
38+
this.keystoreName = keystoreName;
39+
}
40+
41+
public String getKeystorePass() {
42+
return keystorePass;
43+
}
44+
45+
public void setKeystorePass(String keystorePass) {
46+
this.keystorePass = keystorePass;
47+
}
48+
49+
public String getTruststoreName() {
50+
return truststoreName;
51+
}
52+
53+
public void setTruststoreName(String truststoreName) {
54+
this.truststoreName = truststoreName;
55+
}
56+
57+
public String getTruststorePass() {
58+
return truststorePass;
59+
}
60+
61+
public void setTruststorePass(String truststorePass) {
62+
this.truststorePass = truststorePass;
63+
}
64+
65+
@Override
66+
public boolean equals(Object o) {
67+
if (this == o)
68+
return true;
69+
if (o == null || getClass() != o.getClass())
70+
return false;
71+
Sormas2SormasConfig that = (Sormas2SormasConfig) o;
72+
return Objects.equals(filePath, that.filePath)
73+
&& Objects.equals(keyAlias, that.keyAlias)
74+
&& Objects.equals(keystorePass, that.keystorePass)
75+
&& Objects.equals(truststoreName, that.truststoreName)
76+
&& Objects.equals(truststorePass, that.truststorePass);
77+
}
78+
79+
@Override
80+
public int hashCode() {
81+
return Objects.hash(filePath, keyAlias, keystorePass, truststoreName, truststorePass);
82+
}
83+
84+
@Override
85+
public Sormas2SormasConfig clone() {
86+
try {
87+
return (Sormas2SormasConfig) super.clone();
88+
} catch (CloneNotSupportedException e) {
89+
throw new RuntimeException("Clone failed", e);
90+
}
91+
}
92+
}

sormas-api/src/main/java/de/symeda/sormas/api/campaign/CampaignFacade.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package de.symeda.sormas.api.campaign;
22

3+
import de.symeda.sormas.api.campaign.diagram.CampaignDashboardElement;
34
import de.symeda.sormas.api.utils.SortProperty;
45

56
import javax.ejb.Remote;
@@ -12,16 +13,19 @@ public interface CampaignFacade {
1213

1314
List<CampaignReferenceDto> getAllCampaignsAsReference();
1415

16+
CampaignReferenceDto getLastStartedCampaign();
17+
1518
long count(CampaignCriteria campaignCriteria);
1619

1720
CampaignDto saveCampaign(CampaignDto dto);
1821

1922
CampaignDto getByUuid(String uuid);
2023

24+
List<CampaignDashboardElement> getCampaignDashboardElements(String campaignUuid);
25+
2126
boolean isArchived(String uuid);
2227

2328
void deleteCampaign(String uuid);
2429

2530
void archiveOrDearchiveCampaign(String campaignUuid, boolean archive);
26-
2731
}

0 commit comments

Comments
 (0)