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

Commit b0fbeb0

Browse files
author
jenkins
committed
[GITFLOW]merging 'release-1.46.0' into 'master'
2 parents bb5d9a1 + 00ad822 commit b0fbeb0

228 files changed

Lines changed: 5699 additions & 758 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.

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
``<java-config classpath-suffix="" debug-enabled="true" debug-options="-agentlib:jdwp=transport=dt_socket,address=6009,server=n,suspend=y" ...``
5656
- Open the Ant window, click on the "+" icon and select the build.xml file from the sormas-base project
5757
- Execute the "install" and "deploy-serverlibs" scripts in this order
58+
- Set the default working directory for run configurations: Run -> Edit Configurations -> Templates -> Application -> set the value for *Working directory* to ``$MODULE_WORKING_DIR$``
5859
- Configure code formatting:
5960
- install Eclipse Code Formatter for IntelliJ (https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter)
6061
- open the plugin settings (Other Settings -> Eclipse Code Formatter) and select "Use the Eclipse Code Formatter"

GUIDE_ADD_NEW_FIELD.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ The SORMAS API is the heart of the data schema. Accordingly, this is where you h
3434
```
3535
Symptoms.soreThroat = Sore throat/pharyngitis
3636
```
37-
5. *Very important*: We have now officially made a change to the API which likely means that old versions are no longer fully compatible.
37+
5. When you made additions/changes on keys in ``captions.properties``, ``strings.properties`` or ``validations.properties`` you have to run ``I18nConstantGenerator`` (run as ... Java Application) to update the corresponding Constants classes.
38+
6. *Very important*: We have now officially made a change to the API which likely means that old versions are no longer fully compatible.
3839
When data with the new field is sent to a mobile device with an old version, it will not know about the field and the data is lost on the device.
3940
When the data is send back to the server the empty field may override any existing data and it's now also lost on the server itself.
4041
To avoid this the following has to be done:
@@ -81,7 +82,28 @@ Now we need to make sure data in the new field is exchanged between the backend
8182
```
8283
target.setSoreThroat(source.getSoreThroat());
8384
```
85+
Now we need to make sure data in the new field is exported by the detailed export.
8486
87+
11. Identify corresponding *ExportDto (e.g. CaseExportDto)
88+
12. Add the field as a private member of the dto class with a get- and set-method.
89+
13. Add the @Order annotation on the getter method of the new field
90+
```
91+
@Order(33)
92+
public SymptomState getSoreThroat() {
93+
return soreThroat;
94+
}
95+
```
96+
> **NOTE**: The @Order numbers should be unique so please increase the order of the getters below if there are any.
97+
14. Initialize the new field in the constructor
98+
15. Add the new field in the selection list in the `getExportList` method of the *FacadeEJB
99+
```
100+
cq.multiselect(
101+
...,
102+
caseRoot.get(Case.SORE_THROAT),
103+
...
104+
)
105+
```
106+
> **NOTE**: Make sure the order of the fields in the selection list corresponds the order of arguments in the constructor of *ExportDto class
85107
### III. Adding the field to the SORMAS UI
86108
87109
The SORMAS UI is the web application that is used by supervisors, laboratory users, national instances and others.

SERVER_CUSTOMIZATION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The following properties are currently configurable:
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.
3030
* **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).
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.
32+
* **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.
33+
* **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.
3234

3335
## Importing Infrastructure Data
3436
When you start a SORMAS server for the first time, some default infrastructure data is generated to ensure that the server is usable and the default users can be created. It is recommended (and, unless you're working on a demo server, necessary) to archive this default data and import the official infrastructure data of the country or part of the country that you intend to use SORMAS in instead.

SERVER_SETUP.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,15 @@
5151

5252
* Get the latest SORMAS build by downloading the ZIP archive from the latest release on GitHub: https://github.com/hzi-braunschweig/SORMAS-Open/releases/latest
5353
* **Linux**:
54-
* Unzip the archive and copy/upload its contents to **/root/deploy/sormas/$(date +%F)**
55-
* ``cd /root/deploy/sormas/$(date +%F)``
56-
* Make the setup script executable with ``chmod +x server-setup.sh``
54+
* Unzip the archive, copy/upload its contents to **/root/deploy/sormas/$(date +%F)** and make the setup script executable.
55+
56+
cd /root/deploy/sormas
57+
SORMAS_VERSION=1.y.z
58+
wget https://github.com/hzi-braunschweig/SORMAS-Project/releases/download/v${SORMAS_VERSION}/sormas_${SORMAS_VERSION}.zip
59+
unzip sormas_${SORMAS_VERSION}.zip
60+
mv deploy/ $(date +%F)
61+
rm sormas_${SORMAS_VERSION}.zip
62+
chmod +x $(date +%F)/server-setup.sh
5763
* **Windows**:
5864
* Download & install Git for Windows. This will provide a bash emulation that you can use to run the setup script: https://gitforwindows.org/
5965
* Unzip the ZIP archive (e.g. into you download directory)

SERVER_UPDATE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ Note: You can skip this step if you've just set up your SORMAS server and have a
66

77
* Get the latest release files (deploy.zip) from https://github.com/hzi-braunschweig/SORMAS-Open/releases/latest
88
* Unzip the archive and copy/upload its contents to **/root/deploy/sormas/$(date +%F)**
9-
9+
10+
cd /root/deploy/sormas
11+
SORMAS_VERSION=1.y.z
12+
wget https://github.com/hzi-braunschweig/SORMAS-Project/releases/download/v${SORMAS_VERSION}/sormas_${SORMAS_VERSION}.zip
13+
unzip sormas_${SORMAS_VERSION}.zip
14+
mv deploy/ $(date +%F)
15+
rm sormas_${SORMAS_VERSION}.zip
1016
## Automatic Server Update
1117
* Navigate to the folder containing the unzipped deploy files:
1218
``cd /root/deploy/sormas/$(date +%F)``

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.45.0</version>
5+
<version>1.46.0</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

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

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

20-
import javax.naming.InitialContext;
21-
import javax.naming.NamingException;
22-
20+
import de.symeda.sormas.api.action.ActionFacade;
2321
import de.symeda.sormas.api.campaign.CampaignFacade;
2422
import de.symeda.sormas.api.campaign.data.CampaignFormDataFacade;
25-
import de.symeda.sormas.api.campaign.form.CampaignFormFacade;
23+
import de.symeda.sormas.api.campaign.form.CampaignFormMetaFacade;
2624
import de.symeda.sormas.api.caze.CaseFacade;
2725
import de.symeda.sormas.api.caze.CaseStatisticsFacade;
2826
import de.symeda.sormas.api.caze.classification.CaseClassificationFacade;
@@ -66,6 +64,9 @@
6664
import de.symeda.sormas.api.visit.VisitFacade;
6765
import de.symeda.sormas.api.visualization.VisualizationFacade;
6866

67+
import javax.naming.InitialContext;
68+
import javax.naming.NamingException;
69+
6970
public class FacadeProvider {
7071

7172
private static final String JNDI_PREFIX = "java:global/sormas-ear/sormas-backend/";
@@ -122,6 +123,10 @@ public static TaskFacade getTaskFacade() {
122123
return get().lookupEjbRemote(TaskFacade.class);
123124
}
124125

126+
public static ActionFacade getActionFacade() {
127+
return get().lookupEjbRemote(ActionFacade.class);
128+
}
129+
125130
public static SampleFacade getSampleFacade() {
126131
return get().lookupEjbRemote(SampleFacade.class);
127132
}
@@ -262,8 +267,8 @@ public static CampaignFacade getCampaignFacade() {
262267
return get().lookupEjbRemote(CampaignFacade.class);
263268
}
264269

265-
public static CampaignFormFacade getCampaignFormFacade() {
266-
return get().lookupEjbRemote(CampaignFormFacade.class);
270+
public static CampaignFormMetaFacade getCampaignFormMetaFacade() {
271+
return get().lookupEjbRemote(CampaignFormMetaFacade.class);
267272
}
268273

269274
public static CampaignFormDataFacade getCampaignFormDataFacade() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public String toString() {
5757
} else if (from != null && to == null) {
5858
return String.valueOf(from) + "+";
5959
} else {
60-
return I18nProperties.getString(Strings.unknown);
60+
return I18nProperties.getString(Strings.notSpecified);
6161
}
6262
}
6363

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*******************************************************************************
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*******************************************************************************/
18+
package de.symeda.sormas.api.action;
19+
20+
import de.symeda.sormas.api.i18n.I18nProperties;
21+
22+
/**
23+
* Context of an action.
24+
*/
25+
public enum ActionContext {
26+
27+
// XXX: add here new contexts (case, contact, …)
28+
EVENT;
29+
30+
public String toString() {
31+
return I18nProperties.getEnumCaption(this);
32+
}
33+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*******************************************************************************
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*******************************************************************************/
18+
package de.symeda.sormas.api.action;
19+
20+
import java.io.Serializable;
21+
22+
import de.symeda.sormas.api.BaseCriteria;
23+
import de.symeda.sormas.api.event.EventReferenceDto;
24+
import de.symeda.sormas.api.utils.IgnoreForUrl;
25+
26+
public class ActionCriteria extends BaseCriteria implements Serializable {
27+
28+
private static final long serialVersionUID = -9174165215694877624L;
29+
30+
private ActionStatus actionStatus;
31+
private EventReferenceDto event;
32+
33+
public ActionStatus getActionStatus() {
34+
return actionStatus;
35+
}
36+
37+
public void setActionStatus(ActionStatus actionStatus) {
38+
this.actionStatus = actionStatus;
39+
}
40+
41+
public ActionCriteria actionStatus(ActionStatus actionStatus) {
42+
setActionStatus(actionStatus);
43+
return this;
44+
}
45+
46+
public ActionCriteria event(EventReferenceDto event) {
47+
this.event = event;
48+
return this;
49+
}
50+
51+
@IgnoreForUrl
52+
public EventReferenceDto getEvent() {
53+
return event;
54+
}
55+
56+
public boolean hasContextCriteria() {
57+
return getEvent() != null;
58+
}
59+
}

0 commit comments

Comments
 (0)