Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.86.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Jul 10, 2023
2 parents e82ebb7 + 0171ffa commit 0fe72ea
Show file tree
Hide file tree
Showing 508 changed files with 14,797 additions and 9,139 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*.coffee text
*.css text
gradlew text eol=lf
.env text eol=lf
.env.example text eol=lf
*.htm text
*.html text
*.inc text
Expand Down
55 changes: 55 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,60 @@ updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 100
schedule:
interval: "daily"

# Maintain maven dependencies for sormas-base, including it's modules
- package-ecosystem: "maven"
directory: "/sormas-base"
open-pull-requests-limit: 100
schedule:
interval: "daily"
ignore:
# payara dependencies
- dependency-name: javax:javaee-api
- dependency-name: javax:javaee-web-api
- dependency-name: javax.activation:activation
- dependency-name: javax.activation:javax.activation-api
- dependency-name: javax.persistence:javax.persistence-api
- dependency-name: javax.security.enterprise:javax.security.enterprise-api<
- dependency-name: javax.servlet:javax.servlet-api
- dependency-name: javax.validation:validation-api
- dependency-name: com.fasterxml.jackson.core:jackson-*
- dependency-name: com.github.stephenc.jcip:jcip-annotations
- dependency-name: com.sun.activation:jakarta.activation
- dependency-name: com.sun.istack:istack-commons-runtime
- dependency-name: com.sun.mail:javax.mail
- dependency-name: fish.payara.security.connectors:security-connector-oidc-client
- dependency-name: jakarta.*:jakarta.*
- dependency-name: org.eclipse.microprofile.config:microprofile-config-api
- dependency-name: org.glassfish:javax.el
- dependency-name: org.glassfish.corba:glassfish-corba-omgapi
- dependency-name: org.glassfish.jaxb:*
- dependency-name: org.glassfish.jersey*:jersey-*
- dependency-name: org.glassfish.soteria:javax.security.enterprise
- dependency-name: org.javassist:javassist
- dependency-name: org.jboss.logging:jboss-logging
- dependency-name: org.yaml:snakeyaml
# Vaadin 8.14.3 is the last free version - https://vaadin.com/vaadin-8-extended-maintenance-releases
- dependency-name: com.vaadin:vaadin-*

# Maintain gradle dependencies for sormas-app
- package-ecosystem: "gradle"
directory: "/sormas-app"
open-pull-requests-limit: 100
schedule:
interval: "daily"

# Maintain gradle dependencies for sormas-e2e-tests
- package-ecosystem: "gradle"
directory: "/sormas-e2e-tests"
open-pull-requests-limit: 100
schedule:
interval: "daily"
# Only consider mayor updates that likely include new functionality.
# Minor updates and patches are not relevant for the testing module.
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor","version-update:semver-patch"]
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/sormas-widgetset/bin
/deploy/bundles
deploy
/sormas-base/build.properties
/sormas-base/dev.env
/sormas-base/bin
/sormas-ui/bin

Expand Down
31 changes: 14 additions & 17 deletions docs/DEVELOPMENT_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ Note: To work with the Android app JDK 17 is needed for the gradle build. The ne

The SORMAS CI is using JDK 17 to build all modules. The only known difference though are slight differences in the Java time API that affect unit tests, so again there is no need to setup two JDKs on your local system.

## Step 3: Install Maven & Ant
Download and install Maven for your operating system, see [binaries](https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/)
*IMPORTANT*: M2_HOME environment variable needs to be set. By default, for newer version, it is set to MAVEN_HOME. But Ant script is looking for M2_HOME, please refer to the [official documentation](https://maven.apache.org/install.html)

Download and install Ant, it can be done from [Ant site](https://ant.apache.org/bindownload.cgi) or with packages from your Linux distribution.
## Step 3: Install Maven
The scripts in `sormas-base/dev` expect `mvn` as command-line tool.
Download and install Maven for your operating system, see [binaries](https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/).

## Step 4: Install a Local SORMAS Server
Please follow the [Server Installation Instructions](../docs/SERVER_SETUP.md#sormas-installation) to set up a local SORMAS instance that you will use to test your code. Alternatively, you can also use [Maven Cargo](../sormas-cargoserver/README.md), or a [Docker installation](SERVER_DOCKER_SETUP.md) (not recommended at this time).
Expand All @@ -36,9 +34,11 @@ Please follow the [Server Installation Instructions](../docs/SERVER_SETUP.md#sor
- *Optional:* Clone the SORMAS-Project repository if you haven't done so already
- Open the project in IntelliJ. Make sure the project is recognized by IntelliJ as a `maven project`; if not, right-click the `pom.xml` file in `sormas-base` and select `Add as maven project`.
- Make sure that under `File -> Project Structure -> Modules` all modules EXCEPT sormas-app are recognized; if not, add the missing modules with the `+` button
- Navigate to `File -> Settings -> Plugins` and make sure that Glassfish & Ant integrations are enabled
- Make a copy of `sormas-base/build.properties.example`, rename it to `build.properties` and set `glassfish.domain.root` to the location of the SORMAS domain inside your Payara installation
- Run `mvn install` on the `sormas-base` project (e.g. by opening the Maven view and executing `sormas-base -> Lifecycle -> install`)
- Navigate to `File -> Settings -> Plugins` and make sure that Glassfish integration is enabled
- Make a copy of `sormas-base/dev.env.example`, rename it to `dev.env` and set `GLASSFISH_DOMAIN_ROOT` to the location of the SORMAS domain inside your Payara installation
- Run `mvn install` on the `sormas-base` project (e.g. by opening the Maven view and executing `sormas-base -> Lifecycle -> install`). \
Alternatively, execute the `dev/build.sh` script. You can create a run configuration and use the Git bash executable as interpreter to directly run it from the IDE.
- Execute `dev/deploy-serverlibs.sh` script
- Add a Payara server to IntelliJ:
- Open `Run -> Edit Configurations`, add a new configuration and choose the Glassfish server template
- Click on `Configure` next to `Application server` and create a new server configuration by selecting your Payara installation directory
Expand All @@ -50,8 +50,6 @@ Please follow the [Server Installation Instructions](../docs/SERVER_SETUP.md#sor
- Open the `Logs` tab and add a new log file pointing to the `logs/server.log` file in your SORMAS domain
- Open the `Startup/Connection` tab and make sure that `Pass environment variables` is NOT checked; ignore warnings about the debug configuration not being correct
- Open the `config/domain.xml` file in your domain directory and make sure that the `java-config` node contains the following code: `<java-config classpath-suffix="" debug-enabled="true" debug-options="-agentlib:jdwp=transport=dt_socket,address=6009,server=n,suspend=y" ...`
- Open the Ant window, click on the `+` icon and select the `sormas-base/build.xml` file
- Execute the `install` and `deploy-serverlibs` Ant scripts
- Set the default working directory for run configurations by navigating to `Run -> Edit Configurations -> Templates -> Application` and setting `Working directory` to `$MODULE_WORKING_DIR$`
- *Optional:* Setup database access from Intellij: Open View -> Tool View -> Database, click on + icon and select DataSource -> PostgreSQL and configure the database (set user and password and download the missing driver files if needed)

Expand All @@ -66,10 +64,9 @@ Please follow the [Server Installation Instructions](../docs/SERVER_SETUP.md#sor
- Install the [Payara Tools plugin](https://marketplace.eclipse.org/content/payara-tools)
- Install the [Vaadin Plugin for Eclipse](https://marketplace.eclipse.org/content/vaadin-plugin-eclipse); the commercial UI designer is not needed
- Add a Payara server to Eclipse and enter the credentials you specified when setting up the local SORMAS server
- Make a copy of `sormas-base/build.properties.example`, rename it to `build.properties` and set `glassfish.domain.root` to the location of the SORMAS domain inside your Payara installation
- Drag the `sormas-base/build.xml` file into the Ant view in Eclipse
- Either run `mvn install` on the `sormas-base` project or execute the `install [default]` Ant script (this needs a Maven installation on your system with the M2_HOME variable set)
- Execute the `deploy-serverlibs` Ant script
- Make a copy of `sormas-base/dev.env.example`, rename it to `dev.env` and set `GLASSFISH_DOMAIN_ROOT` to the location of the SORMAS domain inside your Payara installation
- Either run `mvn install` on the `sormas-base` project or execute the `dev/build.sh` script (for example with Git Bash)
- Execute `dev/deploy-serverlibs.sh` script
- Highlight all Eclipse projects and choose `Maven -> Update Project` from the right-click menu; perform the update for all projects
- Start the Glassfish server and deploy `sormas-ear`, `sormas-rest` and `sormas-ui` by dragging the respective projects onto it, or use the `Add and Remove...` function by right-clicking on the server (make sure to respect this order as there are depdendencies between artifacts at startup)
- Open your browser and type in `http://localhost:6080/sormas-ui` to test whether the server and IDE have been set up correctly
Expand All @@ -87,7 +84,7 @@ Please follow the [Server Installation Instructions](../docs/SERVER_SETUP.md#sor
- Add an emulator and set the SDK version to the `minSdkVersion` or `targetSdkVersion` from `build.gradle`; we suggest to test your code on both, but `minSdkVersion` should be preferred to ensure compatibility to the minimum supported SDK
- Click on `Run 'app'` to install and run the app on your emulator; enter `http://10.0.2.2:6080/sormas-rest` as the server URL when you start the newly installed app for the first time

**Important:** Whenever you do or pull changes in the `sormas-api` project that you want to use in the mobile app or that are referenced there already, you need to execute the `install` Ant script to notify the `sormas-app` project of the changes.
**Important:** Whenever you do or pull changes in the `sormas-api` project that you want to use in the mobile app or that are referenced there already, you need to execute the `dev/build.sh` script to notify the `sormas-app` project of the changes.

## Step 6: Configure Code Formatting and Import Settings
In order to ensure a consistent code style and prevent so-called edit wars, we have set up custom configuration files for automatic code formatting and import ordering. Please make sure to adhere to the following steps for your IDE(s) before you start developing.
Expand Down Expand Up @@ -132,12 +129,12 @@ Optional, but strongly recommended:
-> For every installation, kill all Java/javaw processes and check the availability of 6048 port number.
-> Delete files with generated domain folders and payara. In order to have a clean installation of each next ./server-setup.sh run.

6. M2_HOME need to be set. By default, for newer version, it is set to MAVEN_HOME. But Ant script is looking for M2_HOME
6. For the `sormas-base/dev` scripts Maven needs to be installed as command-line tool or defined in `sormas-base/dev.env` as `MVN_BIN` which Maven to be used.

7. For eclipse formatted plugin, there is an issue for Idea: <https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter> - `cannot save settings Path to custom eclipse folder is not valid` - it works only when settings were saved from down to up. And not vice versa.

If something is still not working:
-> Stop the payara domain, run Ant deploy-serverlibs to update libs
-> Stop the payara domain, run `dev/deploy-serverlibs.sh` to update libs
-> clean up (delete all from domains/sormas/autodeploy, domains/sormas/applications, domains/sormas/generated, and domains/sormas/osgi-cache) try to build again by executing `mvn clean install -DskipTests` on the `sormas-base` module
-> start the domain and deploy again

Expand Down
3 changes: 2 additions & 1 deletion docs/SERVER_CUSTOMIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ A `MANUAL_DELETION` entry can exist in parallel to one of the other entries, and

* **`CREATION`**: The creation date of the entity will be used.
* **`END`**: The latest change date of the entity itself and any of its depending entities will be used. E.g. for cases, this includes but is not limited to its epi data, symptoms, or hospitalization.
* **`ORIGIN`**: This is currently only implemented for travel entries and means that the report date of the entity will be used. If this is specified for any other entity, the deletion job will be stopped and throw an error.
* **`ORIGIN`**: This is currently only implemented for travel entries and means that the arrival date of the entity will be used. If this is specified for any other entity, the deletion job will be stopped and throw an error.
* **`REPORT`**: The report date of the entity will be used. This is currently not implemented for event participants and campaigns.
* **`MANUAL_DELETION`**: The date on which the entity was manually deleted by a user.

## Infrastructure Data
Expand Down
93 changes: 59 additions & 34 deletions sormas-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.85.0</version>
<version>1.86.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -21,89 +21,114 @@

<dependencies>

<!-- *** Payara modules *** -->

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
</dependency>

<!-- *** Payara modules END *** -->

<!-- *** Domain libs *** -->
<!-- List dependencies here as "compile" scope so that they will be available as transitive dependencies when using sormas-api in other modules -->

<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<groupId>com.github.mpkorstanje</groupId>
<artifactId>simmetrics-core</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<!-- Prioritise to use commons-collections4 -->
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>provided</scope>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<scope>test</scope>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.github.mpkorstanje</groupId>
<artifactId>simmetrics-core</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>compile</scope>
</dependency>

<!-- *** Domain libs END *** -->

<!-- *** Test dependencies *** -->

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>uk.co.jemos.podam</groupId>
<artifactId>podam</artifactId>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- *** Test dependencies END *** -->

<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
/*******************************************************************************
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
* Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*******************************************************************************/
package de.symeda.auditlog.api.sample;

/**
* Enum with adjusted toString method that does not return {@link Enum#name()}.
*
* @author Stefan Kock
*/
public enum CustomEnum {

VALUE,
VALUE_1,
VALUE_2,
VALUE_3;
package de.symeda.sormas.api;

import java.util.List;

public interface ArchivableFacade {

void archive(String uuid);

void dearchive(String uuid);

List<String> archive(List<String> entityUuid);

List<String> dearchive(List<String> entityUuids);

@Override
public String toString() {
return "customToStringLabel";
}
boolean isArchived(String uuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public interface ConfigFacade {

boolean isSmsServiceSetUp();

String getDemisJndiName();
String getExternalMessageAdapterJndiName();

boolean isSkipDefaultPasswordCheck();

Expand Down
Loading

0 comments on commit 0fe72ea

Please sign in to comment.