Skip to content

Commit

Permalink
[GITFLOW]merging 'release-1.97.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Jun 5, 2024
2 parents cbe38eb + 87d8900 commit 37f996b
Show file tree
Hide file tree
Showing 500 changed files with 68,270 additions and 10,393 deletions.
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.96.0</version>
<version>1.97.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
35 changes: 35 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/DocumentHelper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* ******************************************************************************
* * SORMAS® - Surveillance Outbreak Response Management & Analysis System
* * Copyright © 2016-2024 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 de.symeda.sormas.api.utils.FileExtensionNotAllowedException;

public class DocumentHelper {

public static String getFileExtension(String fileName) {
int index = fileName.lastIndexOf('.');
if (index > 0) {
return fileName.substring(index);
} else {
throw new FileExtensionNotAllowedException(String.format("File name (%s) is not properly formatted", fileName));
}
}
}
16 changes: 13 additions & 3 deletions sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
import de.symeda.sormas.api.sample.AdditionalTestFacade;
import de.symeda.sormas.api.sample.PathogenTestFacade;
import de.symeda.sormas.api.sample.SampleFacade;
import de.symeda.sormas.api.selfreport.SelfReportFacade;
import de.symeda.sormas.api.selfreport.SelfReportImportFacade;
import de.symeda.sormas.api.share.ExternalShareInfoFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptionFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasFacade;
Expand Down Expand Up @@ -521,14 +523,22 @@ public static ExternalEmailFacade getExternalEmailFacade() {
return get().lookupEjbRemote(ExternalEmailFacade.class);
}

public static ManualMessageLogFacade getManualMessageLogFacade() {
return get().lookupEjbRemote(ManualMessageLogFacade.class);
}
public static ManualMessageLogFacade getManualMessageLogFacade() {
return get().lookupEjbRemote(ManualMessageLogFacade.class);
}

public static SpecialCaseAccessFacade getSpecialCaseAccessFacade() {
return get().lookupEjbRemote(SpecialCaseAccessFacade.class);
}

public static SelfReportFacade getSelfReportFacade() {
return get().lookupEjbRemote(SelfReportFacade.class);
}

public static SelfReportImportFacade getSelfReportImportFacade() {
return get().lookupEjbRemote(SelfReportImportFacade.class);
}

@SuppressWarnings("unchecked")
public <P> P lookupEjbRemote(Class<P> clazz) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public enum Language {
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_BO(new Locale("es", "BO"), "dd/MM/yyyy", "dd/MM/yyyy H:mm", "dd/MM"),
ES_EC(new Locale("es", "EC"), "dd/MM/yyyy", "dd/MM/yyyy H:mm", "dd/MM"),
ES_CU(new Locale("es", "CU"), "dd/MM/yyyy", "dd/MM/yyyy H:mm", "dd/MM"),
IT(new Locale("it", "IT"), "dd/MM/yyyy", "dd/MM/yyyy H:mm", "dd/MM"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public interface CampaignFacade extends CoreFacade<CampaignDto, CampaignIndexDto

CampaignReferenceDto getLastStartedCampaign();

CampaignDto getCampaignByUuid(String uuid);

List<CampaignDashboardElement> getCampaignDashboardElements(String campaignUuid);

List<String> getAllActiveUuids();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC
*/
private Set<String> caseUuidsForMerge;

private String caseReferenceNumber;

public CaseCriteria() {
super(NewCaseDateType.class);
}
Expand Down Expand Up @@ -793,4 +795,14 @@ public CaseCriteria caseUuidsForMerge(Set<String> caseUuidsForMerge) {

return this;
}

@IgnoreForUrl
public String getCaseReferenceNumber() {
return caseReferenceNumber;
}

public CaseCriteria caseReferenceNumber(String caseReferenceNumber) {
this.caseReferenceNumber = caseReferenceNumber;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
public static final String EXTERNAL_ID = "externalID";
public static final String EXTERNAL_TOKEN = "externalToken";
public static final String INTERNAL_TOKEN = "internalToken";
public static final String CASE_REFERENCE_NUMBER = "caseReferenceNumber";
public static final String SHARED_TO_COUNTRY = "sharedToCountry";
public static final String NOSOCOMIAL_OUTBREAK = "nosocomialOutbreak";
public static final String INFECTION_SETTING = "infectionSetting";
Expand Down Expand Up @@ -453,6 +454,9 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_INTERNAL_TOKEN)
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String internalToken;
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@DependingOnFeatureType(featureType = FeatureType.SELF_REPORTING)
private String caseReferenceNumber;
private boolean sharedToCountry;
@HideForCountriesExcept
private boolean nosocomialOutbreak;
Expand Down Expand Up @@ -1268,6 +1272,14 @@ public void setInternalToken(String internalToken) {
this.internalToken = internalToken;
}

public String getCaseReferenceNumber() {
return caseReferenceNumber;
}

public void setCaseReferenceNumber(String caseReferenceNumber) {
this.caseReferenceNumber = caseReferenceNumber;
}

public boolean isSharedToCountry() {
return sharedToCountry;
}
Expand Down
Loading

0 comments on commit 37f996b

Please sign in to comment.