Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.87.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Aug 8, 2023
2 parents 0fe72ea + 91c5927 commit 04d4e6b
Show file tree
Hide file tree
Showing 323 changed files with 13,433 additions and 3,315 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ updates:
- 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.hk2:*
- dependency-name: org.glassfish.hk2.*:*
- dependency-name: org.glassfish.jaxb:*
- dependency-name: org.glassfish.jersey*:jersey-*
- dependency-name: org.glassfish.soteria:javax.security.enterprise
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
uses: github/codeql-action/analyze@v2

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.9.2
uses: aquasecurity/trivy-action@0.11.2
with:
scan-type: 'fs'
ignore-unfixed: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout development
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Copy files
run: |
cp README.md docs/index.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: github/super-linter/slim@v5
env:
DEFAULT_BRANCH: development
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ deploy
/sormas-app/java_pid21052.hprof
bin
/sormas-base/setup/setup.log
/sormas-base/setup/keycloak/keycloak_setup.log

# Exclude maven wrapper
!/.mvn/wrapper/maven-wrapper.jar
Expand Down
24 changes: 24 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This allows us to consider and process your contribution as quickly and smoothly
* [Development Workflow](#development-workflow)
* [Versioning](#versioning)
* [Branches](#branches)
* [Dependency Management](#dependency-management)

## Submitting an Issue

Expand Down Expand Up @@ -226,3 +227,26 @@ Once the new version is merged to `master`/`master-<version`, the `release-`/`ho

These kind of branches are manually created and maintained by developers who work on an issue. Such branches are used to create pull requests or to review the changes before merged into a permanent or supporting branch.
* **feature-1234_short_description**: Any branch that is supposed to contribute to `development` or a `hotfix` branch.

### Dependency Management

Dependencies are managed in Maven POM files. For most dependencies the version is defined in [sormas-base/pom.xml](sormas-base/pom.xml). \
[sormas-app](../sormas-app/app/build.gradle) and [sormas-e2e-tests](../sormas-e2e-tests/build.gradle) use Gradle instead.

#### Automatic updates

**Process**: At the beginning of each iteration, look over all [dependency update PRs](https://github.com/SORMAS-Foundation/SORMAS-Project/pulls?q=is%3Apr+is%3Aopen+label%3Adependencies) created by dependabot and process them according to the following rules:
1. Always use "Rebase and merge" instead of creating a merge commit! If needed use the comment `@dependabot rebase` to rebase the PR to the latest development commit.
2. If all CI checks are successful, minor and micro version updates can be merged
3. For major version updates read the changelog to understand implications and possible migration steps of the update. \
Decide on you own wheter it is necessary to manually test the PR before merging.
4. If CI checks are negative or migration steps are needed, decide whether the update is important enough to justify the effort of additional work. \
If the PR is not needed, you can use `@dependabot ignore this major version` or `@dependabot ignore this minor version`.

#### Payara
All required dependencies provided by the Payara application server are set to "provided" in maven and may only be updated in combination with an update of the Payara version. \
These dependencies have been added to the dependabot ignore list, so no dependency update PR is automatically created.

#### Keycloak
The Keycloak version in SORMAS-Project only defines the version of the Keycloak admin client library. When a new version of Keycloak is available this should be updated after the [Keycloak version is SORMAS-Docker](https://github.com/SORMAS-Foundation/SORMAS-Docker/blob/devops/keycloak/Dockerfile) has been updated. \
This can be tested locally by building the updated Keycloak docker image and then using it in a [container](https://github.com/SORMAS-Foundation/SORMAS-Project/tree/development/sormas-base/setup/keycloak) together with a local Payara instance.
2 changes: 1 addition & 1 deletion docs/SERVER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Unzip the archive, copy/upload its contents to **/root/deploy/sormas/$(date +%F)

```bash
sudo su
mkdir /root/deploy/sormas
mkdir -p /root/deploy/sormas
cd /root/deploy/sormas
SORMAS_VERSION=1.y.z
wget https://github.com/sormas-foundation/SORMAS-Project/releases/download/v${SORMAS_VERSION}/sormas_${SORMAS_VERSION}.zip
Expand Down
2 changes: 1 addition & 1 deletion 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.86.0</version>
<version>1.87.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public final class CountryHelper {
public static final String COUNTRY_CODE_GERMANY = "de";
public static final String COUNTRY_CODE_FRANCE = "fr";
public static final String COUNTRY_CODE_SWITZERLAND = "ch";
public static final String COUNTRY_CODE_LUXEMBOURG = "lu";

public static boolean isCountry(String countryLocale, String country) {
// If the country locale is complete (e.g. de-DE), check the last (country) part;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package de.symeda.sormas.api;

import java.util.List;

import de.symeda.sormas.api.common.DeletionDetails;

public interface DeletableFacade {

void delete(String uuid, DeletionDetails deletionDetails);

List<String> delete(List<String> uuids, DeletionDetails deletionDetails);

void restore(String uuid);

List<String> restore(List<String> uuids);

boolean isDeleted(String uuid);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package de.symeda.sormas.api;

import java.util.List;

public interface PermanentlyDeletableFacade {

void delete(String uuid);

void delete(List<String> uuids);
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ public class CaseBulkEditData extends EntityDto {
private static final long serialVersionUID = -4670022133882295863L;

public static final String DISEASE = "disease";
public static final String DISEASE_VARIANT = "diseaseVariant";
public static final String DISEASE_DETAILS = "diseaseDetails";
public static final String DISEASE_VARIANT = "diseaseVariant";
public static final String DISEASE_VARIANT_DETAILS = "diseaseVariantDetails";
public static final String PLAGUE_TYPE = "plagueType";
public static final String DENGUE_FEVER_TYPE = "dengueFeverType";
public static final String RABIES_TYPE = "rabiesType";
Expand All @@ -60,9 +61,11 @@ public class CaseBulkEditData extends EntityDto {
public static final String DONT_SHARE_WITH_REPORTING_TOOL = "dontShareWithReportingTool";

private Disease disease;
private DiseaseVariant diseaseVariant;
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String diseaseDetails;
private DiseaseVariant diseaseVariant;
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String diseaseVariantDetails;
private PlagueType plagueType;
private DengueFeverType dengueFeverType;
private RabiesType rabiesType;
Expand All @@ -87,6 +90,14 @@ public void setDisease(Disease disease) {
this.disease = disease;
}

public String getDiseaseDetails() {
return diseaseDetails;
}

public void setDiseaseDetails(String diseaseDetails) {
this.diseaseDetails = diseaseDetails;
}

public DiseaseVariant getDiseaseVariant() {
return diseaseVariant;
}
Expand All @@ -95,12 +106,12 @@ public void setDiseaseVariant(DiseaseVariant diseaseVariant) {
this.diseaseVariant = diseaseVariant;
}

public String getDiseaseDetails() {
return diseaseDetails;
public String getDiseaseVariantDetails() {
return diseaseVariantDetails;
}

public void setDiseaseDetails(String diseaseDetails) {
this.diseaseDetails = diseaseDetails;
public void setDiseaseVariantDetails(String diseaseVariantDetails) {
this.diseaseVariantDetails = diseaseVariantDetails;
}

public PlagueType getPlagueType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ Long countCasesForMap(

List<CaseDataDto> getAllCasesOfPerson(String personUuid);

List<String> deleteCases(List<String> caseUuids, DeletionDetails deletionDetails);

void deleteWithContacts(String caseUuid, DeletionDetails deletionDetails);

Date getOldestCaseOnsetDate();
Expand Down Expand Up @@ -182,6 +180,7 @@ Integer saveBulkCase(
List<String> caseUuidList,
@Valid CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean diseaseVariantChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
Expand All @@ -191,6 +190,7 @@ Integer saveBulkEditWithFacilities(
List<String> caseUuidList,
@Valid CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean diseaseVariantChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import de.symeda.sormas.api.MergeFacade;
import de.symeda.sormas.api.caze.CaseReferenceDto;
import de.symeda.sormas.api.caze.CoreAndPersonDto;
import de.symeda.sormas.api.common.DeletionDetails;
import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.dashboard.DashboardContactDto;
import de.symeda.sormas.api.externaldata.ExternalDataDto;
Expand Down Expand Up @@ -61,8 +60,6 @@ public interface ContactFacade extends CoreFacade<ContactDto, ContactIndexDto, C

List<MapContactDto> getContactsForMap(RegionReferenceDto regionRef, DistrictReferenceDto districtRef, Disease disease, Date from, Date to);

List<String> deleteContacts(List<String> contactUuids, DeletionDetails deletionDetails);

FollowUpPeriodDto getCalculatedFollowUpUntilDate(ContactDto contactDto, boolean ignoreOverwrite);

List<ContactListEntryDto> getEntriesList(String personUuid, Integer first, Integer max);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ public interface CustomizableEnumFacade {
*/
<T extends CustomizableEnum> T getEnumValue(CustomizableEnumType type, String value, Disease disease) throws CustomEnumNotFoundException;

/**
* Checks if the specified enum value exists for the specified type and disease.
*
* @param type
* The type for which to retrieve the enum value
* @param value
* The values to search for
* @param disease
* The disease for which to retrieve the enum values. If null, all enum values that are disease-independent are retrieved
* @return true if the enum value exists
*/
boolean existsEnumValue(CustomizableEnumType type, String value, Disease disease);

/**
* Retrieves the cached contents of all enum value instances of the specified type. The results are already
* internationalized based on the user's language, or the server language as a fallback. If the enum values for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package de.symeda.sormas.api.environment;

import java.util.Date;
import java.util.List;

import javax.ejb.Remote;

import de.symeda.sormas.api.CoreFacade;

@Remote
public interface EnvironmentFacade extends CoreFacade<EnvironmentDto, EnvironmentIndexDto, EnvironmentReferenceDto, EnvironmentCriteria> {

List<EnvironmentDto> getAllEnvironmentsAfter(Date date);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

import de.symeda.sormas.api.CoreFacade;
import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.common.DeletionDetails;
import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.externaldata.ExternalDataDto;
import de.symeda.sormas.api.externaldata.ExternalDataUpdateException;
Expand All @@ -46,8 +45,6 @@ public interface EventFacade extends CoreFacade<EventDto, EventIndexDto, EventRe

List<EventDto> getAllByCase(CaseDataDto caseDataDto);

List<String> deleteEvents(List<String> eventUuids, DeletionDetails deletionDetails);

Page<EventIndexDto> getIndexPage(@NotNull EventCriteria eventCriteria, Integer offset, Integer size, List<SortProperty> sortProperties);

List<EventExportDto> getExportList(EventCriteria eventCriteria, Collection<String> selectedRows, Integer first, Integer max);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package de.symeda.sormas.api.event;

import java.util.List;
import java.util.Set;

import javax.ejb.Remote;
import javax.validation.Valid;
Expand Down Expand Up @@ -58,7 +59,7 @@ Page<EventGroupIndexDto> getIndexPage(

void linkEventsToGroup(List<EventReferenceDto> eventReferences, EventGroupReferenceDto eventGroupReference);

void linkEventsToGroups(List<EventReferenceDto> eventReferences, List<EventGroupReferenceDto> eventGroupReferences);
void linkEventsToGroups(List<String> eventUuids, List<String> eventGroupReferences);

void unlinkEventGroup(EventReferenceDto eventReference, EventGroupReferenceDto eventGroupReference);

Expand All @@ -72,5 +73,7 @@ Page<EventGroupIndexDto> getIndexPage(

void notifyEventAddedToEventGroup(EventGroupReferenceDto eventGroupReference, List<EventReferenceDto> eventReferences);

void notifyEventAddedToEventGroup(String eventGroupUuid, Set<String> eventUuids);

void notifyEventRemovedFromEventGroup(EventGroupReferenceDto eventGroupReference, List<EventReferenceDto> eventReferences);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import javax.validation.constraints.Size;

import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.audit.AuditIncludeProperty;
import de.symeda.sormas.api.audit.AuditedClass;
Expand All @@ -29,6 +30,7 @@
import de.symeda.sormas.api.externalmessage.labmessage.SampleReportDto;
import de.symeda.sormas.api.feature.FeatureType;
import de.symeda.sormas.api.i18n.Validations;
import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto;
import de.symeda.sormas.api.person.PhoneNumberType;
import de.symeda.sormas.api.person.PresentCondition;
import de.symeda.sormas.api.person.Sex;
Expand All @@ -37,6 +39,7 @@
import de.symeda.sormas.api.utils.DataHelper;
import de.symeda.sormas.api.utils.DependingOnFeatureType;
import de.symeda.sormas.api.utils.FieldConstraints;
import de.symeda.sormas.api.utils.HideForCountriesExcept;

@AuditedClass
@DependingOnFeatureType(featureType = FeatureType.EXTERNAL_MESSAGES)
Expand Down Expand Up @@ -69,7 +72,7 @@ public class ExternalMessageDto extends SormasToSormasShareableDto {
public static final String PERSON_EMAIL = "personEmail";
public static final String PERSON_STREET = "personStreet";
public static final String PERSON_HOUSE_NUMBER = "personHouseNumber";
public static final String PERSON_COUNTRY_ISO_CODE = "personCountryIsoCode";
public static final String PERSON_COUNTRY = "personCountry";
public static final String EXTERNAL_MESSAGE_DETAILS = "externalMessageDetails";
public static final String PROCESSED = "processed";
public static final String REPORT_ID = "reportId";
Expand Down Expand Up @@ -100,8 +103,10 @@ public class ExternalMessageDto extends SormasToSormasShareableDto {
private String personFirstName;
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personLastName;
@HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG)
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String personExternalId;
@HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG)
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personNationalHealthId;
private Sex personSex;
Expand All @@ -117,10 +122,11 @@ public class ExternalMessageDto extends SormasToSormasShareableDto {
private String personStreet;
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personHouseNumber;
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personCountryIsoCode;
@HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG)
private CountryReferenceDto personCountry;
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personPhone;
@HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG)
private PhoneNumberType personPhoneNumberType;
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String personEmail;
Expand Down Expand Up @@ -329,12 +335,12 @@ public void setPersonHouseNumber(String personHouseNumber) {
this.personHouseNumber = personHouseNumber;
}

public String getPersonCountryIsoCode() {
return personCountryIsoCode;
public CountryReferenceDto getPersonCountry() {
return personCountry;
}

public void setPersonCountryIsoCode(String personCountryIsoCode) {
this.personCountryIsoCode = personCountryIsoCode;
public void setPersonCountry(CountryReferenceDto personCountry) {
this.personCountry = personCountry;
}

public String getPersonPhone() {
Expand Down
Loading

0 comments on commit 04d4e6b

Please sign in to comment.