Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.84.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed May 24, 2023
2 parents 7d1ef78 + 112cf5f commit 44d4807
Show file tree
Hide file tree
Showing 421 changed files with 11,516 additions and 6,198 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: Java CI with Maven

env:
JAVA: 11
JAVA: 17
PRIVILEGED_RUN: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/development')
|| github.event.pull_request.head.repo.full_name == github.repository }}
CODEQL_LANGUAGES: 'java' # FIXME(@JonasCir) add 'javascript'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sormas_app_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name: Java CI with Gradle

env:
JAVA: 11
JAVA: 17
PRIVILEGED_RUN: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/development')
|| github.event.pull_request.head.repo.full_name == github.repository }}

Expand Down
17 changes: 10 additions & 7 deletions docs/DEVELOPMENT_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ This step-by-step guide explains how to set up your development environment, usi

## Step 1: Check Out the SORMAS Repository
- [Download and install the latest Git version](https://git-scm.com/downloads) for your operating system
- *Optional:* Install a Git client such as [TortoiseGit](https://tortoisegit.org/) or [GitHub Desktop](https://desktop.github.com/) if you don't want to handle version control from the command line or within your IDE
- *Optional:* Install a Git client such as [TortoiseGit](https://tortoisegit.org/) or [GitHub Desktop](https://desktop.github.com/) if you don't want to handle version control from the command-line or within your IDE
- *Optional:* Clone the SORMAS-Project repository with `git clone https://github.com/hzi-braunschweig/SORMAS-Project.git`; if you want to use Git from within your IDE, you can also clone the repository in Step 4
- Open Git Bash and execute the following command to ensure that rebase is used when pulling the development branch rather than merge: `git config --global branch.development.rebase true`

## Step 2: Install Java
Download and install the **Java 11 JDK** (not JRE) for your operating system.
Download and install the **Java 11 JDK** (not JRE) for your operating system, which is also needed for the [Server Setup](SERVER_SETUP.md).
We suggest using [Zulu OpenJDK](https://www.azul.com/downloads/?version=java-11-lts&package=jdk). If you're running Linux, please refer to the [official documentation](https://docs.azul.com/zulu/zuludocs/ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm) on how to install Zulu OpenJDK on your system.
If you plan to work on the Android App as well, you will also need the **Java 8 JDK** to use with Android Studio.

Note: To work with the Android app JDK 17 is needed for the gradle build. The needed JDK is part of Android Studio, thus there is no need to manually install it.

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/)
Expand Down Expand Up @@ -134,10 +137,10 @@ Optional, but strongly recommended:
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
-> 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
-> Stop the payara domain, run Ant deploy-serverlibs 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

## Avoid redeployment problems

**Problem**: Due to currently a not mitigated problem, it is only possible to deploy the `sormas-ear.ear` (contains `sormas-backend`) once without problems. If you undeploy it and deploy `sormas-ear.ear` again, the other artifacts `sormas-ui`and `sormas-rest` cannot successfully call the backend.
Expand Down
2 changes: 1 addition & 1 deletion docs/SERVER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can check your Java version from the shell/command line using: ``java -versi

### Postgres Database

* Install PostgreSQL (currently 9.5, 9.6 or 10) on your system (manuals for all OS can be found here: <https://www.postgresql.org/download>)
* Install PostgreSQL (currently 9.5, 9.6 or 10 to 15) on your system (manuals for all OS can be found here: <https://www.postgresql.org/download>)
* Set **max_connections = 288** and **max_prepared_transactions = 256** (at least, sum of all connection pools) in ``postgresql.conf`` (e.g. ``/etc/postgresql/10.0/main/postgresql.conf``; ``C:/Program Files/PostgreSQL/10.0/data``) - make sure the property is uncommented and restart the service to apply the changes.
* Install the "temporal tables" extension for Postgres (<https://github.com/arkhipov/temporal_tables>)
* **Windows**: Download the latest version for your Postgres version:
Expand Down
10 changes: 1 addition & 9 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.83.1</version>
<version>1.84.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -19,12 +19,6 @@
</plugins>
</build>

<properties>
<!-- sormas-api is used in android-app, which needs to be compatible to Java 7 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>

<dependency>
Expand Down Expand Up @@ -94,8 +88,6 @@
<dependency>
<groupId>uk.co.jemos.podam</groupId>
<artifactId>podam</artifactId>
<version>7.2.8.RELEASE</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import de.symeda.sormas.api.messaging.MessageType;
import de.symeda.sormas.api.person.PersonReferenceDto;
import de.symeda.sormas.api.sample.PathogenTestDto;
import de.symeda.sormas.api.utils.BulkOperationResults;
import de.symeda.sormas.api.utils.DataHelper.Pair;
import de.symeda.sormas.api.utils.SortProperty;
import de.symeda.sormas.api.utils.ValidationRuntimeException;
Expand Down Expand Up @@ -90,6 +89,8 @@ List<CaseExportDto> getExportList(

CaseDataDto updateFollowUpComment(@Valid @NotNull CaseDataDto dto) throws ValidationRuntimeException;

void updateVaccinationStatus(CaseReferenceDto caseRef, VaccinationStatus status);

CaseDataDto save(@Valid @NotNull CaseDataDto dto, boolean systemSave) throws ValidationRuntimeException;

CoreAndPersonDto<CaseDataDto> save(@Valid @NotNull CoreAndPersonDto<CaseDataDto> dto) throws ValidationRuntimeException;
Expand Down Expand Up @@ -184,7 +185,7 @@ Page<CaseFollowUpDto> getCaseFollowUpIndexPage(

List<String> getUuidsNotShareableWithExternalReportingTools(List<String> caseUuids);

BulkOperationResults<String> saveBulkCase(
Integer saveBulkCase(
List<String> caseUuidList,
@Valid CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
Expand All @@ -193,7 +194,7 @@ BulkOperationResults<String> saveBulkCase(
boolean outcomeChange,
boolean surveillanceOfficerChange);

BulkOperationResults<String> saveBulkEditWithFacilities(
Integer saveBulkEditWithFacilities(
List<String> caseUuidList,
@Valid CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
Expand Down Expand Up @@ -234,5 +235,4 @@ BulkOperationResults<String> saveBulkEditWithFacilities(
boolean hasOtherValidVaccination(CaseDataDto caze, String vaccinationUuid);

Pair<RegionReferenceDto, DistrictReferenceDto> getRegionAndDistrictRefsOf(CaseReferenceDto caze);

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.jsoup.safety.Whitelist;
import org.jsoup.safety.Safelist;

import de.symeda.sormas.api.ConfigFacade;
import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.FacadeProvider;
import de.symeda.sormas.api.Language;
import de.symeda.sormas.api.caze.classification.ClassificationXOfCriteriaDto.ClassificationXOfSubCriteriaDto;
import de.symeda.sormas.api.i18n.I18nProperties;
Expand Down Expand Up @@ -292,7 +291,7 @@ private static String buildSubCriteriaDiv(
for (ClassificationCriteriaDto subCriteria : ((ClassificationCollectiveCriteria) criteria).getSubCriteria()) {
if (!(subCriteria instanceof ClassificationCollectiveCriteria) || subCriteria instanceof ClassificationCompactCriteria) {
// For non-collective or compact collective criteria, add the description as a list item
subCriteriaSb.append("- " + HtmlHelper.cleanHtml(subCriteria.buildDescription(), Whitelist.basic()) + "</br>");
subCriteriaSb.append("- " + HtmlHelper.cleanHtml(subCriteria.buildDescription(), Safelist.basic()) + "</br>");
} else if (subCriteria instanceof ClassificationCollectiveCriteria
&& !(subCriteria instanceof ClassificationAllOfCriteriaDto)
&& !(subCriteria.getClass() == ClassificationXOfCriteriaDto.class)) {
Expand Down Expand Up @@ -338,7 +337,7 @@ private static String createHeadlineDiv(String headline) {

//@formatter:off
return "<div class='headline'>"
+ HtmlHelper.cleanHtml(headline, Whitelist.basic())
+ HtmlHelper.cleanHtml(headline, Safelist.basic())
+ "</div>";
//@formatter:on
}
Expand Down Expand Up @@ -384,7 +383,7 @@ private static String createSubCriteriaSurroundingDiv(String content) {
* Specific tags are allowed to be contained in i18n strings and are thus unescaped
*/
private static String createCriteriaItemDiv(String text) {
return (HtmlHelper.cleanHtml(text, Whitelist.basic()) + "<br>");
return (HtmlHelper.cleanHtml(text, Safelist.basic()) + "<br>");
}

private enum ClassificationCriteriaType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import de.symeda.sormas.api.importexport.ExportConfigurationDto;
import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
import de.symeda.sormas.api.utils.BulkOperationResults;
import de.symeda.sormas.api.utils.SortProperty;
import de.symeda.sormas.api.utils.ValidationRuntimeException;
import de.symeda.sormas.api.visit.VisitSummaryExportDto;
Expand Down Expand Up @@ -155,7 +154,7 @@ List<MergeContactIndexDto[]> getContactsForDuplicateMerging(

void updateExternalData(@Valid List<ExternalDataDto> externalData) throws ExternalDataUpdateException;

BulkOperationResults<String> saveBulkContacts(
Integer saveBulkContacts(
List<String> contactUuidlist,
@Valid ContactBulkEditData updatedContacBulkEditData,
boolean classificationChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import de.symeda.sormas.api.externaldata.ExternalDataDto;
import de.symeda.sormas.api.externaldata.ExternalDataUpdateException;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
import de.symeda.sormas.api.utils.BulkOperationResults;
import de.symeda.sormas.api.utils.SortProperty;

@Remote
Expand Down Expand Up @@ -81,7 +80,7 @@ public interface EventFacade extends CoreFacade<EventDto, EventIndexDto, EventRe

boolean hasAnyEventParticipantWithoutJurisdiction(String eventUuid);

BulkOperationResults<String> saveBulkEvents(
Integer saveBulkEvents(
List<String> eventUuidList,
EventDto updatedTempEvent,
boolean eventStatusChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public interface Captions {
String actionClose = "actionClose";
String actionCompare = "actionCompare";
String actionConfirm = "actionConfirm";
String actionConfirmAction = "actionConfirmAction";
String actionConfirmFilters = "actionConfirmFilters";
String actionContinue = "actionContinue";
String actionCreate = "actionCreate";
Expand Down Expand Up @@ -214,6 +215,7 @@ public interface Captions {
String bulkCaseClassification = "bulkCaseClassification";
String bulkCaseOutcome = "bulkCaseOutcome";
String bulkCaseShareWithReportingTool = "bulkCaseShareWithReportingTool";
String bulkCompleted = "bulkCompleted";
String bulkContactClassification = "bulkContactClassification";
String bulkContactOfficer = "bulkContactOfficer";
String bulkDelete = "bulkDelete";
Expand All @@ -230,6 +232,8 @@ public interface Captions {
String bulkLinkToEvent = "bulkLinkToEvent";
String bulkLostToFollowUp = "bulkLostToFollowUp";
String bulkRestore = "bulkRestore";
String bulkSkipped = "bulkSkipped";
String bulkSuccessful = "bulkSuccessful";
String bulkSurveillanceOfficer = "bulkSurveillanceOfficer";
String bulkTaskAssignee = "bulkTaskAssignee";
String bulkTaskPriority = "bulkTaskPriority";
Expand Down Expand Up @@ -2480,6 +2484,7 @@ public interface Captions {
String User_userName = "User.userName";
String User_userRoles = "User.userRoles";
String User_uuid = "User.uuid";
String userMyUserId = "userMyUserId";
String userNewUser = "userNewUser";
String userResetPassword = "userResetPassword";
String userRight = "userRight";
Expand Down
18 changes: 14 additions & 4 deletions sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public interface Strings {
String confirmationArchiveTask = "confirmationArchiveTask";
String confirmationArchiveTasks = "confirmationArchiveTasks";
String confirmationArchiveTravelEntry = "confirmationArchiveTravelEntry";
String confirmationCancelBulkAction = "confirmationCancelBulkAction";
String confirmationCancelExternalFollowUpPopup = "confirmationCancelExternalFollowUpPopup";
String confirmationCancelFollowUp = "confirmationCancelFollowUp";
String confirmationChangeCaseDisease = "confirmationChangeCaseDisease";
Expand Down Expand Up @@ -317,6 +318,7 @@ public interface Strings {
String errorNoPopulationDataLocations = "errorNoPopulationDataLocations";
String errorNoRightsForChangingField = "errorNoRightsForChangingField";
String errorNoRightsForChangingMultipleFields = "errorNoRightsForChangingMultipleFields";
String errorNotFound = "errorNotFound";
String errorNotifyingExternalSurveillanceTool = "errorNotifyingExternalSurveillanceTool";
String errorNotRequiredRights = "errorNotRequiredRights";
String errorOccurred = "errorOccurred";
Expand Down Expand Up @@ -347,6 +349,7 @@ public interface Strings {
String errorSormasToSormasShare = "errorSormasToSormasShare";
String errorSormasToSormasShareContactWithoutCase = "errorSormasToSormasShareContactWithoutCase";
String errorSormasToSormasShareContactWithUnsharedSourceCase = "errorSormasToSormasShareContactWithUnsharedSourceCase";
String errorSormasToSormasSharequestNotFound = "errorSormasToSormasSharequestNotFound";
String errorSurveillanceReportNotEditable = "errorSurveillanceReportNotEditable";
String errorTemplateFileCorrupt = "errorTemplateFileCorrupt";
String errorViewNotFound = "errorViewNotFound";
Expand Down Expand Up @@ -528,6 +531,7 @@ public interface Strings {
String headingEditTask = "headingEditTask";
String headingEditTreatment = "headingEditTreatment";
String headingEditUser = "headingEditUser";
String headingEditVaccination = "headingEditVaccination";
String headingEditVisit = "headingEditVisit";
String headingEnvironmentalExposure = "headingEnvironmentalExposure";
String headingEpiCurve = "headingEpiCurve";
Expand Down Expand Up @@ -720,6 +724,7 @@ public interface Strings {
String headingSormasToSormasCanAcceptContactsWithoutCase = "headingSormasToSormasCanAcceptContactsWithoutCase";
String headingSormasToSormasCantShareContactWithoutCase = "headingSormasToSormasCantShareContactWithoutCase";
String headingSormasToSormasDuplicateDetection = "headingSormasToSormasDuplicateDetection";
String headingSormasToSormasShareRequestNotFound = "headingSormasToSormasShareRequestNotFound";
String headingStoppedFollowUp = "headingStoppedFollowUp";
String headingSurveillanceReports = "headingSurveillanceReports";
String headingSymptomJournalAccountCreation = "headingSymptomJournalAccountCreation";
Expand Down Expand Up @@ -751,10 +756,14 @@ public interface Strings {
String headingUserSettings = "headingUserSettings";
String headingVaccination = "headingVaccination";
String headingViewAdditionalTest = "headingViewAdditionalTest";
String headingViewClinicalVisit = "headingViewClinicalVisit";
String headingViewNotFound = "headingViewNotFound";
String headingViewPathogenTestResult = "headingViewPathogenTestResult";
String headingViewPrescription = "headingViewPrescription";
String headingViewSurveillanceReport = "headingViewSurveillanceReport";
String headingViewTask = "headingViewTask";
String headingViewTreatment = "headingViewTreatment";
String headingViewVaccination = "headingViewVaccination";
String headingViewVisit = "headingViewVisit";
String headingVisits = "headingVisits";
String headingVisitsDeleted = "headingVisitsDeleted";
Expand All @@ -780,6 +789,11 @@ public interface Strings {
String infoAutomaticDeletionTooltipYears = "infoAutomaticDeletionTooltipYears";
String infoBAGExport = "infoBAGExport";
String infoBasicExport = "infoBasicExport";
String infoBulkProcess = "infoBulkProcess";
String infoBulkProcessCancelled = "infoBulkProcessCancelled";
String infoBulkProcessFinished = "infoBulkProcessFinished";
String infoBulkProcessFinishedWithSkips = "infoBulkProcessFinishedWithSkips";
String infoBulkUnresponsiveWindowHint = "infoBulkUnresponsiveWindowHint";
String infoCalculateCompleteness = "infoCalculateCompleteness";
String infoCampaignsDashboard = "infoCampaignsDashboard";
String infoCanceledBy = "infoCanceledBy";
Expand Down Expand Up @@ -994,8 +1008,6 @@ public interface Strings {
String messageBulkContactsWithDifferentDiseasesSelected = "messageBulkContactsWithDifferentDiseasesSelected";
String messageBulkDontShareWithReportingToolWarning = "messageBulkDontShareWithReportingToolWarning";
String messageBulkLinkEventHint = "messageBulkLinkEventHint";
String messageBulkOperationEntryLimitReached = "messageBulkOperationEntryLimitReached";
String messageBulkOperationTimeLimitReached = "messageBulkOperationTimeLimitReached";
String messageCampaignArchived = "messageCampaignArchived";
String messageCampaignCreated = "messageCampaignCreated";
String messageCampaignDearchived = "messageCampaignDearchived";
Expand Down Expand Up @@ -1142,8 +1154,6 @@ public interface Strings {
String messageEventSaved = "messageEventSaved";
String messageEventsDearchived = "messageEventsDearchived";
String messageEventsDeleted = "messageEventsDeleted";
String messageEventsEdited = "messageEventsEdited";
String messageEventsEditedExceptArchived = "messageEventsEditedExceptArchived";
String messageEventsNotDeletedReason = "messageEventsNotDeletedReason";
String messageEventsNotDeletedReasonExternalSurveillanceTool = "messageEventsNotDeletedReasonExternalSurveillanceTool";
String messageEventsRestored = "messageEventsRestored";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ public ShareRequestIndexDto(
this.comment = comment;
}

public ShareRequestIndexDto(
String uuid,
Date creationDate,
ShareRequestDataType dataType,
ShareRequestStatus status,
String organizationId,
String senderFirstName,
String senderLastName,
boolean ownershipHandedOver,
String comment) {
this(uuid, creationDate, dataType, status, organizationId, senderFirstName + " " + senderLastName, ownershipHandedOver, comment);
}

public Date getCreationDate() {
return creationDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.contact.ContactReferenceDto;
import de.symeda.sormas.api.event.EventReferenceDto;
import de.symeda.sormas.api.utils.BulkOperationResults;
import de.symeda.sormas.api.utils.SortProperty;

@Remote
Expand Down Expand Up @@ -88,7 +87,7 @@ public interface TaskFacade {

EditPermissionType getEditPermissionType(String uuid);

BulkOperationResults<String> saveBulkTasks(
Integer saveBulkTasks(
List<String> taskUuidList,
TaskDto updatedTempTask,
boolean priorityChange,
Expand Down
10 changes: 10 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/user/UserFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,14 @@ List<UserReferenceDto> getUserRefsByInfrastructure(
long getUserCountHavingRole(UserRoleReferenceDto userRoleRef);

List<UserReferenceDto> getUsersHavingOnlyRole(UserRoleReferenceDto userRoleRef);

/**
* Retrieves the user rights of the user specified by the passed UUID, or those of the current user if no UUID is specified.
* Requesting the user rights of another user without the rights to view users and user roles results in an AccessDeniedException.
*
* @param userUuid
* The UUID of the user to request the user rights for
* @return A set containing the user rights associated to all user roles assigned to the user
*/
List<UserRight> getUserRights(String userUuid);
}
Loading

0 comments on commit 44d4807

Please sign in to comment.