Skip to content

Commit

Permalink
[GITFLOW]merging 'release-0.9.1' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ciSymeda committed Nov 21, 2017
2 parents 6d6af0e + 42490eb commit 98ada74
Show file tree
Hide file tree
Showing 30 changed files with 49 additions and 67 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>0.9.0</version>
<version>0.9.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>0.9.0</version>
<version>0.9.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>0.9.0</version>
<version>0.9.1</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 @@ -10,7 +10,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.criteria.CriteriaBuilder;
Expand Down Expand Up @@ -606,7 +605,6 @@ public Map<RegionReferenceDto, Long> getCaseCountPerRegion(Date fromDate, Date t

@LocalBean
@Stateless
@Specializes
public static class CaseFacadeEjbLocal extends CaseFacadeEjb {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;
import javax.validation.ValidationException;
import javax.validation.constraints.NotNull;

Expand Down Expand Up @@ -425,7 +424,6 @@ public void generateContactFollowUpTasks() {

@LocalBean
@Stateless
@Specializes
public static class ContactFacadeEjbLocal extends ContactFacadeEjb {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.epidata.EpiDataBurialDto;
import de.symeda.sormas.api.epidata.EpiDataDto;
Expand Down Expand Up @@ -337,7 +336,6 @@ public static EpiDataTravelDto toDto(EpiDataTravel travel) {

@LocalBean
@Stateless
@Specializes
public static class EpiDataFacadeEjbLocal extends EpiDataFacadeEjb {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.hospitalization.HospitalizationDto;
import de.symeda.sormas.api.hospitalization.HospitalizationFacade;
Expand Down Expand Up @@ -179,7 +178,6 @@ public static PreviousHospitalizationDto toDto(PreviousHospitalization hospitali

@LocalBean
@Stateless
@Specializes
public static class HospitalizationFacadeEjbLocal extends HospitalizationFacadeEjb {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.location.LocationDto;
import de.symeda.sormas.api.location.LocationFacade;
Expand Down Expand Up @@ -86,7 +85,6 @@ public static LocationDto toDto(Location source) {

@LocalBean
@Stateless
@Specializes
public static class LocationFacadeEjbLocal extends LocationFacadeEjb {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;
import javax.validation.constraints.NotNull;

import de.symeda.sormas.api.Disease;
Expand Down Expand Up @@ -321,7 +320,6 @@ public static PersonDto toDto(Person source) {

@LocalBean
@Stateless
@Specializes
public static class PersonFacadeEjbLocal extends PersonFacadeEjb {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.region.DistrictDto;
import de.symeda.sormas.api.region.DistrictFacade;
Expand Down Expand Up @@ -81,7 +80,6 @@ private DistrictDto toDto(District entity) {

@LocalBean
@Stateless
@Specializes
public static class DistrictFacadeEjbLocal extends DistrictFacadeEjb {
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.symeda.sormas.backend.region;

import java.io.File;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -125,13 +125,13 @@ private void loadRegionData() {
// load shapefile
String countryName = configService.getCountryName();
String filepath = "shapefiles/" + countryName + "/regions.shp";
File file = new File(getClass().getClassLoader().getResource(filepath).getFile());
if (!file.exists() || !filepath.endsWith(".shp")) {
URL filepathUrl = getClass().getClassLoader().getResource(filepath);
if (filepathUrl == null || !filepath.endsWith(".shp")) {
throw new RuntimeException("Invalid shapefile filepath: " + filepath);
}

try {
ShapefileDataStore dataStore = new ShapefileDataStore(file.toURI().toURL());
ShapefileDataStore dataStore = new ShapefileDataStore(filepathUrl);
ContentFeatureSource featureSource = dataStore.getFeatureSource();
ContentFeatureCollection featureCollection = featureSource.getFeatures();

Expand Down Expand Up @@ -207,13 +207,13 @@ private void loadDistrictData() {
// load shapefile
String countryName = configService.getCountryName();
String filepath = "shapefiles/" + countryName + "/districts.shp";
File file = new File(getClass().getClassLoader().getResource(filepath).getFile());
if (!file.exists() || !filepath.endsWith(".shp")) {
URL filepathUrl = getClass().getClassLoader().getResource(filepath);
if (filepathUrl == null || !filepath.endsWith(".shp")) {
throw new RuntimeException("Invalid shapefile filepath: " + filepath);
}

try {
ShapefileDataStore dataStore = new ShapefileDataStore(file.toURI().toURL());
ShapefileDataStore dataStore = new ShapefileDataStore(filepathUrl);
ContentFeatureSource featureSource = dataStore.getFeatureSource();
ContentFeatureCollection featureCollection = featureSource.getFeatures();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.region.RegionDataDto;
import de.symeda.sormas.api.region.RegionDto;
Expand Down Expand Up @@ -95,7 +94,6 @@ private RegionDataDto toDataDto(Region entity) {

@LocalBean
@Stateless
@Specializes
public static class RegionFacadeEjbLocal extends RegionFacadeEjb {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;
import javax.validation.constraints.NotNull;

import de.symeda.sormas.api.FacadeProvider;
Expand Down Expand Up @@ -287,7 +286,6 @@ public void generateSubmitWeeklyReportTasks() {

@LocalBean
@Stateless
@Specializes
public static class WeeklyReportFacadeEjbLocal extends WeeklyReportFacadeEjb {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.symptoms.SymptomsDto;
import de.symeda.sormas.api.symptoms.SymptomsFacade;
Expand Down Expand Up @@ -241,7 +240,6 @@ public SymptomsDto saveSymptoms(SymptomsDto dto) {

@LocalBean
@Stateless
@Specializes
public static class SymptomsFacadeEjbLocal extends SymptomsFacadeEjb {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;

import de.symeda.sormas.api.facility.FacilityReferenceDto;
import de.symeda.sormas.api.region.DistrictReferenceDto;
Expand Down Expand Up @@ -212,7 +211,6 @@ public String resetPassword(String uuid) {

@LocalBean
@Stateless
@Specializes
public static class UserFacadeEjbLocal extends UserFacadeEjb {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
import de.symeda.sormas.backend.person.PersonFacadeEjb.PersonFacadeEjbLocal;
import de.symeda.sormas.backend.region.CommunityFacadeEjb;
import de.symeda.sormas.backend.region.CommunityService;
import de.symeda.sormas.backend.region.DistrictFacadeEjb;
import de.symeda.sormas.backend.region.DistrictFacadeEjb.DistrictFacadeEjbLocal;
import de.symeda.sormas.backend.region.DistrictService;
import de.symeda.sormas.backend.region.RegionFacadeEjb;
import de.symeda.sormas.backend.region.RegionFacadeEjb.RegionFacadeEjbLocal;
import de.symeda.sormas.backend.region.RegionService;
import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb.WeeklyReportFacadeEjbLocal;
import de.symeda.sormas.backend.sample.SampleFacadeEjb;
Expand Down Expand Up @@ -174,8 +174,8 @@ private TestDataCreator createTestDataCreator() {
return new TestDataCreator(getBean(UserFacadeEjbLocal.class), getBean(PersonFacadeEjbLocal.class),
getBean(CaseFacadeEjbLocal.class), getBean(ContactFacadeEjbLocal.class), getBean(TaskFacadeEjb.class),
getBean(VisitFacadeEjb.class), getBean(WeeklyReportFacadeEjbLocal.class), getBean(EventFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjb.class),
getBean(DistrictFacadeEjb.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjbLocal.class),
getBean(DistrictFacadeEjbLocal.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(RegionService.class), getBean(DistrictService.class), getBean(CommunityService.class), getBean(FacilityService.class));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
import de.symeda.sormas.backend.person.PersonFacadeEjb.PersonFacadeEjbLocal;
import de.symeda.sormas.backend.region.CommunityFacadeEjb;
import de.symeda.sormas.backend.region.CommunityService;
import de.symeda.sormas.backend.region.DistrictFacadeEjb;
import de.symeda.sormas.backend.region.DistrictFacadeEjb.DistrictFacadeEjbLocal;
import de.symeda.sormas.backend.region.DistrictService;
import de.symeda.sormas.backend.region.RegionFacadeEjb;
import de.symeda.sormas.backend.region.RegionFacadeEjb.RegionFacadeEjbLocal;
import de.symeda.sormas.backend.region.RegionService;
import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb.WeeklyReportFacadeEjbLocal;
import de.symeda.sormas.backend.sample.SampleFacadeEjb;
Expand Down Expand Up @@ -156,8 +156,8 @@ private TestDataCreator createTestDataCreator() {
return new TestDataCreator(getBean(UserFacadeEjbLocal.class), getBean(PersonFacadeEjbLocal.class),
getBean(CaseFacadeEjbLocal.class), getBean(ContactFacadeEjbLocal.class), getBean(TaskFacadeEjb.class),
getBean(VisitFacadeEjb.class), getBean(WeeklyReportFacadeEjbLocal.class), getBean(EventFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjb.class),
getBean(DistrictFacadeEjb.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjbLocal.class),
getBean(DistrictFacadeEjbLocal.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(RegionService.class), getBean(DistrictService.class), getBean(CommunityService.class), getBean(FacilityService.class));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import de.symeda.sormas.backend.person.PersonFacadeEjb.PersonFacadeEjbLocal;
import de.symeda.sormas.backend.region.CommunityFacadeEjb;
import de.symeda.sormas.backend.region.CommunityService;
import de.symeda.sormas.backend.region.DistrictFacadeEjb;
import de.symeda.sormas.backend.region.DistrictFacadeEjb.DistrictFacadeEjbLocal;
import de.symeda.sormas.backend.region.DistrictService;
import de.symeda.sormas.backend.region.RegionFacadeEjb;
import de.symeda.sormas.backend.region.RegionFacadeEjb.RegionFacadeEjbLocal;
import de.symeda.sormas.backend.region.RegionService;
import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb.WeeklyReportFacadeEjbLocal;
import de.symeda.sormas.backend.sample.SampleFacadeEjb;
Expand Down Expand Up @@ -70,8 +70,8 @@ private TestDataCreator createTestDataCreator() {
return new TestDataCreator(getBean(UserFacadeEjbLocal.class), getBean(PersonFacadeEjbLocal.class),
getBean(CaseFacadeEjbLocal.class), getBean(ContactFacadeEjbLocal.class), getBean(TaskFacadeEjb.class),
getBean(VisitFacadeEjb.class), getBean(WeeklyReportFacadeEjbLocal.class), getBean(EventFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjb.class),
getBean(DistrictFacadeEjb.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjbLocal.class),
getBean(DistrictFacadeEjbLocal.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(RegionService.class), getBean(DistrictService.class), getBean(CommunityService.class), getBean(FacilityService.class));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
import org.junit.BeforeClass;
import org.junit.Test;

import de.symeda.sormas.api.region.DistrictFacade;
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.region.GeoLatLon;
import de.symeda.sormas.api.region.RegionFacade;
import de.symeda.sormas.api.region.RegionReferenceDto;
import de.symeda.sormas.backend.common.ConfigService;
import de.symeda.sormas.backend.region.DistrictFacadeEjb.DistrictFacadeEjbLocal;
import de.symeda.sormas.backend.region.RegionFacadeEjb.RegionFacadeEjbLocal;
import info.novatec.beantest.api.BeanProviderHelper;

public class GeoShapeProviderEjbTest {
Expand Down Expand Up @@ -49,7 +53,7 @@ protected static <T> T getBean(Class<T> beanClass, Annotation... qualifiers) {
@Test
public void testGetRegionShape() throws Exception {
GeoShapeProviderEjb geoShapeProvider = getBean(GeoShapeProviderEjb.class);
RegionFacadeEjb regionFacade = getBean(RegionFacadeEjb.class);
RegionFacade regionFacade = getBean(RegionFacadeEjbLocal.class);

List<RegionReferenceDto> regions = regionFacade.getAllAsReference();
assertThat(regions.size(), greaterThan(1)); // make sure we have some regions
Expand All @@ -72,7 +76,7 @@ public void testGetDistrictShape() throws Exception {

RegionReferenceDto region = geoShapeProvider.getRegionByCoord(new GeoLatLon(9.076344, 7.276929));

DistrictFacadeEjb districtFacade = getBean(DistrictFacadeEjb.class);
DistrictFacade districtFacade = getBean(DistrictFacadeEjbLocal.class);
List<DistrictReferenceDto> districts = districtFacade.getAllByRegion(region.getUuid());
assertThat(districts.size(), greaterThan(1)); // make sure we have some districts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
import de.symeda.sormas.backend.region.CommunityFacadeEjb;
import de.symeda.sormas.backend.region.CommunityService;
import de.symeda.sormas.backend.region.District;
import de.symeda.sormas.backend.region.DistrictFacadeEjb;
import de.symeda.sormas.backend.region.DistrictFacadeEjb.DistrictFacadeEjbLocal;
import de.symeda.sormas.backend.region.DistrictService;
import de.symeda.sormas.backend.region.RegionFacadeEjb;
import de.symeda.sormas.backend.region.RegionFacadeEjb.RegionFacadeEjbLocal;
import de.symeda.sormas.backend.region.RegionService;
import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb.WeeklyReportFacadeEjbLocal;
import de.symeda.sormas.backend.sample.SampleFacadeEjb;
Expand All @@ -53,7 +53,7 @@ public void resetMocks() {

@Test
public void testShouldBuildDistrictSummaryDto() {
RegionFacade regionFacade = getBean(RegionFacadeEjb.class);
RegionFacade regionFacade = getBean(RegionFacadeEjbLocal.class);
WeeklyReportFacade reportFacade = getBean(WeeklyReportFacadeEjbLocal.class);

TestDataCreator creator = createTestDataCreator();
Expand Down Expand Up @@ -87,8 +87,8 @@ private TestDataCreator createTestDataCreator() {
return new TestDataCreator(getBean(UserFacadeEjbLocal.class), getBean(PersonFacadeEjbLocal.class),
getBean(CaseFacadeEjbLocal.class), getBean(ContactFacadeEjbLocal.class), getBean(TaskFacadeEjb.class),
getBean(VisitFacadeEjb.class), getBean(WeeklyReportFacadeEjbLocal.class), getBean(EventFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjb.class),
getBean(DistrictFacadeEjb.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(SampleFacadeEjb.class), getBean(SampleTestFacadeEjb.class), getBean(RegionFacadeEjbLocal.class),
getBean(DistrictFacadeEjbLocal.class), getBean(CommunityFacadeEjb.class), getBean(FacilityFacadeEjb.class),
getBean(RegionService.class), getBean(DistrictService.class), getBean(CommunityService.class), getBean(FacilityService.class));
}

Expand Down
Loading

0 comments on commit 98ada74

Please sign in to comment.