Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.66.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Nov 30, 2021
2 parents a8e00a8 + 1d8305a commit bfc2402
Show file tree
Hide file tree
Showing 521 changed files with 15,426 additions and 4,207 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Epic
about: Document a epic to be done by the development team. It does not change the software directly, but will lead to other tickets.
title: ''
labels: epic
assignees: ''

---

<!--
If you've never submitted an issue to the SORMAS repository before or this is your first time using this template, please read the Contributing guidelines (https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/docs/CONTRIBUTING.md) for an explanation of the information we need you to provide. You don't have to remove this comment or any other comment from this issue as they will automatically be hidden.
-->
### Situation Description & Motivation
<!-- Why -->
<!-- Mandatory -->

#### Use cases

### High-Level Explanation
<!-- What -->
<!-- Mandatory: To be refined before sliced into tickets -->
<!-- For a proper description please consider the following points:
- scope
- topic
- user groups
- data links or connections to existing system
- out of scope
-->

### Timeline
<!-- When -->
<!-- Optional -->

### Tasks
<!-- How: Lists all subtickets that resolve this epic. -->
<!-- example
- [ ] #1234
- [ ] #4711
-->

### Alternatives
<!-- Optional -->

### Risks
<!-- Optional -->

### Additional Information
<!-- Optional -->
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
test:
name: mvn verify
runs-on: ubuntu-latest
strategy:
matrix:
module: [sormas-api, sormas-backend, sormas-rest, sormas-ui]

steps:
- name: Checkout repository (with token)
Expand Down Expand Up @@ -57,12 +54,12 @@ jobs:
- name: Run mvn verify
# FIXME(@JonasCir) see https://github.com/hzi-braunschweig/SORMAS-Project/issues/3730#issuecomment-745165678
working-directory: ./sormas-base
run: mvn verify -B -ntp -pl :${{ matrix.module }} -am
run: mvn verify -B -ntp

- name: Commit external visits API spec to development
# Privileged action needing a secret token. Since this only runs on development in our own repo
# the token will be available through a privileged checkout.
if: github.event_name == 'push' && github.ref == 'refs/heads/development' && matrix.module == 'sormas-rest' && hashFiles('sormas-rest/target/external_visits_API.yaml') != hashFiles('openapi/external_visits_API.yaml')
if: github.event_name == 'push' && github.ref == 'refs/heads/development' && hashFiles('sormas-rest/target/external_visits_API.yaml') != hashFiles('openapi/external_visits_API.yaml')
# https://stackoverflow.com/questions/59604922/authorize-bash-to-access-github-protected-branch
run: |
git config --global user.name "sormas-vitagroup"
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 @@ -4,7 +4,7 @@
name: Java CI with Gradle

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

on:
Expand Down
4 changes: 2 additions & 2 deletions docs/DEVELOPMENT_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you plan to work on the Android App as well, you will also need the **Java 8
- Enter `http://localhost:6080/sormas-ui` into the `URL` field
- Make sure that the correct JRE is specified (your Java 11 JDK)
- Enter the path to the SORMAS domain and the credentials that you've specified when setting up the server
- Open the `Deployment` tab and add the artifacts `sormas-ear`, `sormas-rest` and `sormas-ui`
- Open the `Deployment` tab and add the artifacts `sormas-ear`, `sormas-rest` and `sormas-ui` (make sure to respect this order as there are dependencies between artifacts at startup)
- 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" ...`
Expand All @@ -62,7 +62,7 @@ If you plan to work on the Android App as well, you will also need the **Java 8
- 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
- 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
- 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

### Android Studio
Expand Down
26 changes: 19 additions & 7 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.65.1</version>
<version>1.66.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -89,12 +89,24 @@
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<scope>compile</scope>
</dependency>

</dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<scope>compile</scope>
</dependency>

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

</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private AuthProvider(ConfigFacade configFacade) {
isUsernameCaseSensitive = SORMAS.equalsIgnoreCase(configuredProvider);
isDefaultProvider = SORMAS.equalsIgnoreCase(configuredProvider);
isUserSyncSupported = KEYCLOAK.equalsIgnoreCase(configuredProvider);
isUserSyncAtStartupEnabled = isUserSyncSupported && FacadeProvider.getConfigFacade().isAuthenticationProviderUserSyncAtStartupEnabled();
isUserSyncAtStartupEnabled = isUserSyncSupported && configFacade.isAuthenticationProviderUserSyncAtStartupEnabled();
name = configuredProvider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
import de.symeda.sormas.api.share.ExternalShareInfoFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptionFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasLabMessageFacade;
import de.symeda.sormas.api.sormastosormas.labmessage.SormasToSormasLabMessageFacade;
import de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseFacade;
import de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactFacade;
import de.symeda.sormas.api.sormastosormas.event.SormasToSormasEventFacade;
Expand Down
4 changes: 2 additions & 2 deletions sormas-api/src/main/java/de/symeda/sormas/api/HasUuid.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*******************************************************************************
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
Expand All @@ -14,7 +14,7 @@
*
* 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.sormas.api;

public interface HasUuid {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.commons.lang3.StringUtils;
import org.jsoup.safety.Whitelist;

import de.symeda.sormas.api.ConfigFacade;
import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.FacadeProvider;
Expand Down Expand Up @@ -151,7 +152,12 @@ public static String createNotACaseHtmlString(DiseaseClassificationCriteriaDto c
return sb.toString();
}

public static String createHtmlForDownload(String sormasServerUrl, List<Disease> diseases, Language language) {
public static String createHtmlForDownload(
String sormasServerUrl,
List<Disease> diseases,
Language language,
CaseClassificationFacade caseClassificationFacade,
ConfigFacade configFacade) {
StringBuilder html = new StringBuilder();
html.append("<html><header><style>");

Expand Down Expand Up @@ -223,13 +229,13 @@ public static String createHtmlForDownload(String sormasServerUrl, List<Disease>
//@formatter:on

for (Disease disease : diseases) {
DiseaseClassificationCriteriaDto diseaseCriteria = FacadeProvider.getCaseClassificationFacade().getByDisease(disease);
DiseaseClassificationCriteriaDto diseaseCriteria = caseClassificationFacade.getByDisease(disease);
if (diseaseCriteria != null && diseaseCriteria.hasAnyCriteria()) {
html.append("<h2 style=\"text-align: center; color: #005A9C;\">" + disease.toString() + "</h2>");
html.append(createSuspectHtmlString(diseaseCriteria));
html.append(createProbableHtmlString(diseaseCriteria));
html.append(createConfirmedHtmlString(diseaseCriteria));
if (FacadeProvider.getConfigFacade().isConfiguredCountry(CountryHelper.COUNTRY_CODE_GERMANY)){
if (configFacade.isConfiguredCountry(CountryHelper.COUNTRY_CODE_GERMANY)) {
html.append(createConfirmedNoSymptomsHtmlString(diseaseCriteria));
html.append(createConfirmedUnknownSymptomsHtmlString(diseaseCriteria));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ public interface EventFacade {
void updateExternalData(@Valid List<ExternalDataDto> externalData) throws ExternalDataUpdateException;

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

boolean hasRegionAndDistrict(String eventUuid);

boolean hasAnyEventParticipantWithoutJurisdiction(String eventUuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,54 @@
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
import de.symeda.sormas.api.utils.SortProperty;

@Remote
public interface EventGroupFacade {

EventGroupReferenceDto getReferenceByUuid(String uuid);
EventGroupReferenceDto getReferenceByUuid(String uuid);

boolean exists(String uuid);
boolean exists(String uuid);

boolean isArchived(String uuid);
boolean isArchived(String uuid);

EventGroupDto getEventGroupByUuid(String uuid);
EventGroupDto getEventGroupByUuid(String uuid);

List<EventGroupReferenceDto> getCommonEventGroupsByEvents(List<EventReferenceDto> eventReferences);
List<EventGroupReferenceDto> getCommonEventGroupsByEvents(List<EventReferenceDto> eventReferences);

List<EventGroupIndexDto> getIndexList(EventGroupCriteria eventGroupCriteria, Integer first, Integer max, List<SortProperty> sortProperties);
List<EventGroupIndexDto> getIndexList(EventGroupCriteria eventGroupCriteria, Integer first, Integer max, List<SortProperty> sortProperties);

long count(EventGroupCriteria eventGroupCriteria);
long count(EventGroupCriteria eventGroupCriteria);

EventGroupDto saveEventGroup(@Valid @NotNull EventGroupDto eventGroup);
Page<EventGroupIndexDto> getIndexPage(
@NotNull EventGroupCriteria eventGroupCriteria,
Integer offset,
Integer size,
List<SortProperty> sortProperties);

void linkEventToGroup(EventReferenceDto eventReference, EventGroupReferenceDto eventGroupReference);
EventGroupDto saveEventGroup(@Valid @NotNull EventGroupDto eventGroup);

void linkEventToGroups(EventReferenceDto eventReference, List<EventGroupReferenceDto> eventGroupReferences);
void linkEventToGroup(EventReferenceDto eventReference, EventGroupReferenceDto eventGroupReference);

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

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

void unlinkEventGroup(EventReferenceDto eventReference, EventGroupReferenceDto eventGroupReference);
void linkEventsToGroups(List<EventReferenceDto> eventReferences, List<EventGroupReferenceDto> eventGroupReferences);

void deleteEventGroup(String uuid);
void unlinkEventGroup(EventReferenceDto eventReference, EventGroupReferenceDto eventGroupReference);

void archiveOrDearchiveEventGroup(String uuid, boolean archive);
void deleteEventGroup(String uuid);

List<RegionReferenceDto> getEventGroupRelatedRegions(String uuid);
void archiveOrDearchiveEventGroup(String uuid, boolean archive);

void notifyEventEventGroupCreated(EventGroupReferenceDto eventGroupReference);
List<RegionReferenceDto> getEventGroupRelatedRegions(String uuid);

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

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

void notifyEventRemovedFromEventGroup(EventGroupReferenceDto eventGroupReference, List<EventReferenceDto> eventReferences);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class FeatureConfigurationCriteria extends BaseCriteria implements Clonea
private DistrictReferenceDto district;
private Disease disease;
private Boolean enabled;
private String searchText;

public FeatureType[] getFeatureTypes() {
return featureTypes;
Expand All @@ -30,6 +31,10 @@ public FeatureConfigurationCriteria featureType(FeatureType... featureTypes) {
return this;
}

public String getSearchText() {
return searchText;
}

public RegionReferenceDto getRegion() {
return region;
}
Expand Down Expand Up @@ -65,4 +70,8 @@ public FeatureConfigurationCriteria enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

public void setFeatureTypes(FeatureType... featureTypes) {
this.featureTypes = featureTypes;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.symeda.sormas.api.feature;

import java.util.Date;
import java.util.Map;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.EntityDto;
Expand All @@ -12,7 +13,6 @@ public class FeatureConfigurationDto extends EntityDto {

private static final long serialVersionUID = 4027927530101427321L;

public static final String FEATURE_TYPE = "featureType";
public static final String REGION = "region";
public static final String DISTRICT = "district";
public static final String DISEASE = "disease";
Expand All @@ -25,6 +25,7 @@ public class FeatureConfigurationDto extends EntityDto {
private Disease disease;
private Date endDate;
private boolean enabled;
private Map<FeatureTypeProperty, Object> properties;

public static FeatureConfigurationDto build() {
FeatureConfigurationDto config = new FeatureConfigurationDto();
Expand Down Expand Up @@ -79,4 +80,12 @@ public boolean isEnabled() {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public Map<FeatureTypeProperty, Object> getProperties() {
return properties;
}

public void setProperties(Map<FeatureTypeProperty, Object> properties) {
this.properties = properties;
}
}
Loading

0 comments on commit bfc2402

Please sign in to comment.