Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.83.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Apr 27, 2023
2 parents e05af13 + 330bae7 commit 18b80dd
Show file tree
Hide file tree
Showing 607 changed files with 29,013 additions and 5,343 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
You can give SORMAS a try on our demo server at <https://demo.sormas.org>!

### How Can I Get Involved?
Read through our [*Contributing Readme*](docs/CONTRIBUTING.md) and contact us at [email protected] to learn how you can help to drive the development of SORMAS forward,
Read through our [*Contributing Readme*](docs/CONTRIBUTING.md) and contact us at [email protected] to learn how you can help to drive the development of SORMAS forward,
or check out our [Discussions](https://github.com/hzi-braunschweig/SORMAS-Project/discussions) to get development support from the core developers and other community members.
SORMAS is a community-driven project, and we'd love to have you on board!

Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ Once you have chosen an issue that you want to work on, **please adhere to the f
2. A member of the core development team will check the issue and might:
- Turn the issue into a discussion if they're not sure whether it fits the overall SORMAS vision or there are a lot of discussion points.
- Ask for additional details to be added to the issue description if you have created the issue yourself and there are questions e.g. concerning its added value or the proposed solution.
- Take the issue into internal refinement if it doesn't meet the [Definition of Done](DEFINITION_OF_DONE.md) yet.
3. If the issue meets the Definition of Done, a member of the core development team adds the `ready` label and notifies you that you can start to implement it.
- Take the issue into internal refinement if it doesn't meet the [Definition of Ready](DEFINITION_OF_READY.md) yet.
3. If the issue meets the Definition of Ready, a member of the core development team adds the `ready` label and notifies you that you can start to implement it.

Issues that are already marked with the `ready` label can theoretically be picked up for development immediately. However, please note that these issues will usually already be planned for one of the upcoming iterations and it's possible that we'll start development on it ourselves. This is especially true for issues that are assigned to one of the sprint backlog projects.

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.82.0</version>
<version>1.83.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 @@ -19,22 +19,15 @@
import java.util.Date;
import java.util.List;

import de.symeda.sormas.api.common.DeletionDetails;
import de.symeda.sormas.api.deletionconfiguration.DeletionInfoDto;
import de.symeda.sormas.api.externalsurveillancetool.ExternalSurveillanceToolException;
import de.symeda.sormas.api.utils.criteria.BaseCriteria;

public interface CoreFacade<DTO extends EntityDto, INDEX_DTO extends Serializable, REF_DTO extends ReferenceDto, CRITERIA extends BaseCriteria>
extends BaseFacade<DTO, INDEX_DTO, REF_DTO, CRITERIA> {
extends BaseFacade<DTO, INDEX_DTO, REF_DTO, CRITERIA>, DeletableFacade {

boolean isArchived(String uuid);

boolean isDeleted(String uuid);

void delete(String uuid, DeletionDetails deletionDetails);

void undelete(String uuid);

boolean exists(String uuid);

DeletionInfoDto getAutomaticDeletionInfo(String uuid);
Expand Down
12 changes: 12 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/DeletableFacade.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package de.symeda.sormas.api;

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

public interface DeletableFacade {

void delete(String uuid, DeletionDetails deletionDetails);

void restore(String uuid);

boolean isDeleted(String uuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum Language {
EN_AF(new Locale("en", "AF"), "dd/MM/yyyy", "dd/MM/yyyy h:mm a", "dd/MM"),
FR(new Locale("fr", "FR"), "dd/MM/yyyy", "dd/MM/yyyy HH:mm", "dd/MM"),
FR_CH(new Locale("fr", "CH"), "dd/MM/yyyy", "dd/MM/yyyy HH:mm", "dd/MM"),
FR_TN(new Locale("fr", "TN"), "dd/MM/yyyy", "dd/MM/yyyy HH:mm", "dd/MM"),
DE(new Locale("de", "DE"), "dd.MM.yyyy", "dd.MM.yyyy HH:mm", "dd.MM"),
DE_CH(new Locale("de", "CH"), "dd.MM.yyyy", "dd.MM.yyyy HH:mm", "dd.MM"),
ES_EC(new Locale("es", "EC"), "dd/MM/yyyy", "dd/MM/yyyy H:mm", "dd/MM"),
Expand Down
34 changes: 22 additions & 12 deletions sormas-api/src/main/java/de/symeda/sormas/api/Month.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ public enum Month
implements
StatisticsGroupingKey {

JANUARY,
FEBRUARY,
MARCH,
APRIL,
MAY,
JUNE,
JULY,
AUGUST,
SEPTEMBER,
OCTOBER,
NOVEMBER,
DECEMBER;
JANUARY(1),
FEBRUARY(2),
MARCH(3),
APRIL(4),
MAY(5),
JUNE(6),
JULY(7),
AUGUST(8),
SEPTEMBER(9),
OCTOBER(10),
NOVEMBER(11),
DECEMBER(12);

private final int monthNumber;

Month(int monthNumber) {
this.monthNumber = monthNumber;
}

@Override
public String toString() {
Expand All @@ -54,4 +60,8 @@ public int keyCompareTo(StatisticsGroupingKey o) {

return compareTo((Month) o);
}

public int getMonthNumber() {
return monthNumber;
}
}
47 changes: 47 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/PostResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* 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.sormas.api;

import com.fasterxml.jackson.annotation.JsonInclude;

public class PostResponse {

private int statusCode;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Object body;

public PostResponse(int statusCode, Object body) {
this.statusCode = statusCode;
this.body = body;
}

public int getStatusCode() {
return statusCode;
}

public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}

public Object getBody() {
return body;
}

public void setBody(Object body) {
this.body = body;
}
}
10 changes: 0 additions & 10 deletions sormas-api/src/main/java/de/symeda/sormas/api/PushResult.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import de.symeda.sormas.api.statistics.StatisticsGroupingKey;

public class QuarterOfYear implements Serializable, Comparable<QuarterOfYear>, StatisticsGroupingKey {
public class QuarterOfYear implements Serializable, Comparable<QuarterOfYear>, StatisticsGroupingKey, Cloneable {

private static final long serialVersionUID = -7158625755180563434L;

Expand All @@ -40,6 +40,12 @@ public void increaseQuarter() {
}
}

public QuarterOfYear createNextQuarter() {
QuarterOfYear nextQuarter = new QuarterOfYear(new Quarter(quarter.getValue()), new Year(year.getValue()));
nextQuarter.increaseQuarter();
return nextQuarter;
}

public Quarter getQuarter() {
return quarter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.apache.commons.lang3.ObjectUtils;
Expand All @@ -26,7 +27,6 @@
import de.symeda.sormas.api.audit.AuditedClass;
import de.symeda.sormas.api.i18n.Validations;
import de.symeda.sormas.api.utils.HasCaption;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.uuid.HasUuid;

@AuditedClass
Expand All @@ -35,7 +35,7 @@ public abstract class ReferenceDto implements Serializable, HasUuid, HasCaption,
public static final String CAPTION = "caption";
public static final String NO_REFERENCE_UUID = "SORMAS-CONSTID-NO-REFERENCE";

@Required
@NotNull(message = Validations.requiredField)
@AuditIncludeProperty
@Pattern(regexp = UUID_REGEX, message = Validations.uuidPatternNotMatching)
private String uuid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.EntityDto;
Expand All @@ -35,7 +36,6 @@
import de.symeda.sormas.api.utils.DependingOnFeatureType;
import de.symeda.sormas.api.utils.FieldConstraints;
import de.symeda.sormas.api.utils.HtmlHelper;
import de.symeda.sormas.api.utils.Required;

@DependingOnFeatureType(featureType = FeatureType.EVENT_SURVEILLANCE)
public class ActionDto extends EntityDto {
Expand All @@ -53,13 +53,13 @@ public class ActionDto extends EntityDto {
public static final String ACTION_STATUS = "actionStatus";
public static final String ACTION_MEASURE = "actionMeasure";

@Required
@NotNull(message = Validations.requiredField)
private ActionContext actionContext;
private EventReferenceDto event;

private ActionMeasure actionMeasure;
private ActionPriority priority;
@Required
@NotNull(message = Validations.requiredField)
private Date date;
private ActionStatus actionStatus;
private Date statusChangeDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javax.ejb.Remote;
import javax.validation.Valid;

import de.symeda.sormas.api.EditPermissionType;
import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.event.EventActionExportDto;
import de.symeda.sormas.api.event.EventActionIndexDto;
Expand Down Expand Up @@ -61,4 +62,8 @@ public interface ActionFacade {
long countEventActions(EventCriteria criteria);

long countActions(ActionCriteria criteria);

boolean isInJurisdiction(String uuid);

EditPermissionType getEditPermissionType(String uuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Date;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.event.MeansOfTransport;
Expand All @@ -39,7 +40,6 @@
import de.symeda.sormas.api.utils.DependingOnFeatureType;
import de.symeda.sormas.api.utils.FieldConstraints;
import de.symeda.sormas.api.utils.HideForCountries;
import de.symeda.sormas.api.utils.Required;
import de.symeda.sormas.api.utils.SensitiveData;
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;

Expand Down Expand Up @@ -81,7 +81,7 @@ public class ActivityAsCaseDto extends PseudonymizableDto {
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String description;
@Required
@NotNull(message = Validations.requiredField)
private ActivityAsCaseType activityAsCaseType;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Constants {
"write",
"cleanup",
"mark",
"undelete")));
"restore")));
public static final Set<String> deletePrefix = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("delete", "merge", "remove")));
public static final Set<String> executePrefix = Collections.unmodifiableSet(
new HashSet<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ List<CampaignDiagramDataDto> getDiagramDataByAgeGroup(
List<CampaignFormDataDto> getAllActiveAfter(Date date);

void overwriteCampaignFormData(CampaignFormDataDto existingData, CampaignFormDataDto newData);

boolean isInJurisdiction(String campaignFormDataUuid);
}
Loading

0 comments on commit 18b80dd

Please sign in to comment.