conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
private Boolean quarantineOrderedVerbally;
private Boolean quarantineOrderedOfficialDocument;
private Boolean quarantineNotOrdered;
>>>>>>>
private Boolean quarantineOrderedVerbally;
private Boolean quarantineOrderedOfficialDocument;
private Boolean quarantineNotOrdered;
<<<<<<<
public void setQuarantineOrderMeans(OrderMeans quarantineOrderMeans) {
this.quarantineOrderMeans = quarantineOrderMeans;
=======
public ContactCriteria onlyQuarantineHelpNeeded(Boolean onlyQuarantineHelpNeeded) {
this.onlyQuarantineHelpNeeded = onlyQuarantineHelpNeeded;
return this;
}
public Date getQuarantineTo() {
return quarantineTo;
}
public ContactCriteria quarantineTo(Date quarantineTo) {
this.quarantineTo = quarantineTo;
return this;
>>>>>>>
public void setOnlyQuarantineHelpNeeded(Boolean onlyQuarantineHelpNeeded) {
this.onlyQuarantineHelpNeeded = onlyQuarantineHelpNeeded;
}
public Date getQuarantineTo() {
return quarantineTo;
}
public ContactCriteria quarantineTo(Date quarantineTo) {
this.quarantineTo = quarantineTo;
return this;
<<<<<<<
public void setOnlyQuarantineHelpNeeded(Boolean onlyQuarantineHelpNeeded) {
this.onlyQuarantineHelpNeeded = onlyQuarantineHelpNeeded;
=======
public ContactCriteria quarantineOrderedVerbally(Boolean quarantineOrderedVerbally) {
this.quarantineOrderedVerbally = quarantineOrderedVerbally;
return this;
}
public Boolean getQuarantineOrderedOfficialDocument() {
return quarantineOrderedOfficialDocument;
}
public ContactCriteria quarantineOrderedOfficialDocument(Boolean quarantineOrderedOfficialDocument) {
this.quarantineOrderedOfficialDocument = quarantineOrderedOfficialDocument;
return this;
}
public Boolean getQuarantineNotOrdered() {
return quarantineNotOrdered;
}
public ContactCriteria quarantineNotOrdered(Boolean quarantineNotOrdered) {
this.quarantineNotOrdered = quarantineNotOrdered;
return this;
>>>>>>>
public ContactCriteria quarantineOrderedVerbally(Boolean quarantineOrderedVerbally) {
this.quarantineOrderedVerbally = quarantineOrderedVerbally;
return this;
}
public Boolean getQuarantineOrderedOfficialDocument() {
return quarantineOrderedOfficialDocument;
}
public ContactCriteria quarantineOrderedOfficialDocument(Boolean quarantineOrderedOfficialDocument) {
this.quarantineOrderedOfficialDocument = quarantineOrderedOfficialDocument;
return this;
}
public Boolean getQuarantineNotOrdered() {
return quarantineNotOrdered;
}
public ContactCriteria quarantineNotOrdered(Boolean quarantineNotOrdered) {
this.quarantineNotOrdered = quarantineNotOrdered;
return this; |
<<<<<<<
=======
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
>>>>>>>
<<<<<<<
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.OptionGroup;
=======
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.OptionGroup;
>>>>>>>
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.OptionGroup;
<<<<<<<
import de.symeda.sormas.api.user.UserRight;
import de.symeda.sormas.api.utils.fieldaccess.FieldAccessCheckers;
import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
=======
import de.symeda.sormas.api.utils.Diseases;
import de.symeda.sormas.api.utils.HideForCountries;
import de.symeda.sormas.api.utils.HideForCountriesExcept;
import de.symeda.sormas.api.utils.Outbreaks;
>>>>>>>
import de.symeda.sormas.api.user.UserRight;
import de.symeda.sormas.api.utils.fieldaccess.FieldAccessCheckers;
import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
<<<<<<<
=======
protected boolean isFieldHiddenForCurrentCountry(Object propertyId) {
try {
final java.lang.reflect.Field declaredField =
getType().getDeclaredField(propertyId.toString());
final String countryLocale = FacadeProvider.getConfigFacade().getCountryLocale();
final Predicate<String> currentCountryIsHiddenForField =
country -> countryLocale.startsWith(country);
if (declaredField.isAnnotationPresent(HideForCountries.class) &&
Arrays.asList(declaredField.getAnnotation(HideForCountries.class).countries())
.stream().anyMatch(currentCountryIsHiddenForField)) {
return true;
}
if (declaredField.isAnnotationPresent(HideForCountriesExcept.class) &&
Arrays.asList(declaredField.getAnnotation(HideForCountriesExcept.class).countries())
.stream().noneMatch(currentCountryIsHiddenForField)) {
return true;
}
} catch (NoSuchFieldException e) {
// This exception is fine because it should only happen for UUID fields
}
return false;
}
>>>>>>> |
<<<<<<<
List<ContactExportDto> getExportList(ContactCriteria contactCriteria, int first, int max, Language userLanguage);
=======
List<ContactExportDto> getExportList(ContactCriteria contactCriteria, int first, int max);
List<ContactVisitsExportDto> getContactVisitsExportList(ContactCriteria contactCriteria, int first, int max);
long countMaximumFollowUps(ContactCriteria contactCriteria);
>>>>>>>
List<ContactExportDto> getExportList(ContactCriteria contactCriteria, int first, int max, Language userLanguage);
List<ContactVisitsExportDto> getContactVisitsExportList(ContactCriteria contactCriteria, int first, int max);
long countMaximumFollowUps(ContactCriteria contactCriteria); |
<<<<<<<
public void testGetLatestQuarantineEndDates() {
RDCFEntities rdcfEntities = creator.createRDCFEntities();
UserDto user = creator.createUser(rdcfEntities, UserRole.REST_EXTERNAL_VISITS_USER);
creator.createPerson(); // Person without contact
final PersonDto person1 = creator.createPerson();
final PersonDto person2 = creator.createPerson();
final ContactDto contact11 = creator.createContact(user.toReference(), person1.toReference());
final ContactDto contact12 = creator.createContact(user.toReference(), person1.toReference());
final ContactDto contact2 = creator.createContact(user.toReference(), person2.toReference());
Date now = new Date();
contact11.setQuarantineTo(DateHelper.subtractDays(now, 20));
contact12.setQuarantineTo(DateHelper.subtractDays(now, 8));
contact2.setQuarantineTo(now);
getContactFacade().saveContact(contact11);
getContactFacade().saveContact(contact12);
getContactFacade().saveContact(contact2);
List<PersonQuarantineEndDto> quarantineEndDtos = getPersonFacade().getLatestQuarantineEndDates(null);
assertThat(quarantineEndDtos, hasSize(2));
Optional<PersonQuarantineEndDto> result1 = quarantineEndDtos.stream().filter(p -> p.getPersonUuid().equals(person1.getUuid())).findFirst();
assertTrue(result1.isPresent());
assertTrue(DateHelper.isSameDay(result1.get().getLatestQuarantineEndDate(), DateHelper.subtractDays(now, 8)));
Optional<PersonQuarantineEndDto> result2 = quarantineEndDtos.stream().filter(p -> p.getPersonUuid().equals(person2.getUuid())).findFirst();
assertTrue(result2.isPresent());
assertTrue(DateHelper.isSameDay(result2.get().getLatestQuarantineEndDate(), now));
}
@Test
/*
* If you need to change this test to make it pass, you probably changed the behaviour of the ExternalVisitsResource.
* Please note that other system used alongside with SORMAS are depending on this, so that their developers must be notified of any
* relevant API changes some time before they go into any test and productive system. Please inform the SORMAS core development team at
* https://gitter.im/SORMAS-Project!
*/
=======
>>>>>>>
/*
* If you need to change this test to make it pass, you probably changed the behaviour of the ExternalVisitsResource.
* Please note that other system used alongside with SORMAS are depending on this, so that their developers must be notified of any
* relevant API changes some time before they go into any test and productive system. Please inform the SORMAS core development team at
* https://gitter.im/SORMAS-Project!
*/ |
<<<<<<<
import de.symeda.sormas.ui.caze.messaging.SmsListComponent;
=======
>>>>>>>
import de.symeda.sormas.ui.caze.messaging.SmsListComponent;
<<<<<<<
boolean externalMessagesEnabled = FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.MANUAL_EXTERNAL_MESSAGES);
if (externalMessagesEnabled && UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
SmsListComponent smsList = new SmsListComponent(getCaseRef());
smsList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(smsList, SMS_LOC);
}
if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) && !caze.checkIsUnreferredPortHealthCase()) {
=======
if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.SAMPLES_LAB)
&& UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)
&& !caze.checkIsUnreferredPortHealthCase()) {
>>>>>>>
if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.SAMPLES_LAB)
&& UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)
&& !caze.checkIsUnreferredPortHealthCase()) {
boolean externalMessagesEnabled = FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.MANUAL_EXTERNAL_MESSAGES);
if (externalMessagesEnabled && UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
SmsListComponent smsList = new SmsListComponent(getCaseRef());
smsList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(smsList, SMS_LOC);
}
if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) && !caze.checkIsUnreferredPortHealthCase()) { |
<<<<<<<
=======
import java.math.BigInteger;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.annotation.security.RolesAllowed;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Order;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.validation.constraints.NotNull;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import java.math.BigInteger;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.annotation.security.RolesAllowed;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Order;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.validation.constraints.NotNull;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<<<<<<<
import de.symeda.sormas.backend.util.PseudonymizationService;
=======
import de.symeda.sormas.backend.util.QueryHelper;
>>>>>>>
import de.symeda.sormas.backend.util.QueryHelper;
import de.symeda.sormas.backend.util.PseudonymizationService; |
<<<<<<<
@DatabaseField(foreign = true, foreignAutoRefresh = true)
private SormasToSormasOriginInfo sormasToSormasOriginInfo;
@DatabaseField
private boolean ownershipHandedOver;
=======
@Enumerated(EnumType.STRING)
private EndOfQuarantineReason endOfQuarantineReason;
@Column(length = COLUMN_LENGTH_DEFAULT)
private String endOfQuarantineReasonDetails;
>>>>>>>
@DatabaseField(foreign = true, foreignAutoRefresh = true)
private SormasToSormasOriginInfo sormasToSormasOriginInfo;
@DatabaseField
private boolean ownershipHandedOver;
@Enumerated(EnumType.STRING)
private EndOfQuarantineReason endOfQuarantineReason;
@Column(length = COLUMN_LENGTH_DEFAULT)
private String endOfQuarantineReasonDetails;
<<<<<<<
public SormasToSormasOriginInfo getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}
public void setSormasToSormasOriginInfo(SormasToSormasOriginInfo sormasToSormasOriginInfo) {
this.sormasToSormasOriginInfo = sormasToSormasOriginInfo;
}
public boolean isOwnershipHandedOver() {
return ownershipHandedOver;
}
public void setOwnershipHandedOver(boolean ownershipHandedOver) {
this.ownershipHandedOver = ownershipHandedOver;
}
=======
public EndOfQuarantineReason getEndOfQuarantineReason() {
return endOfQuarantineReason;
}
public void setEndOfQuarantineReason(EndOfQuarantineReason endOfQuarantineReason) {
this.endOfQuarantineReason = endOfQuarantineReason;
}
public String getEndOfQuarantineReasonDetails() {
return endOfQuarantineReasonDetails;
}
public void setEndOfQuarantineReasonDetails(String endOfQuarantineReasonDetails) {
this.endOfQuarantineReasonDetails = endOfQuarantineReasonDetails;
}
>>>>>>>
public SormasToSormasOriginInfo getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}
public void setSormasToSormasOriginInfo(SormasToSormasOriginInfo sormasToSormasOriginInfo) {
this.sormasToSormasOriginInfo = sormasToSormasOriginInfo;
}
public boolean isOwnershipHandedOver() {
return ownershipHandedOver;
}
public void setOwnershipHandedOver(boolean ownershipHandedOver) {
this.ownershipHandedOver = ownershipHandedOver;
}
public EndOfQuarantineReason getEndOfQuarantineReason() {
return endOfQuarantineReason;
}
public void setEndOfQuarantineReason(EndOfQuarantineReason endOfQuarantineReason) {
this.endOfQuarantineReason = endOfQuarantineReason;
}
public String getEndOfQuarantineReasonDetails() {
return endOfQuarantineReasonDetails;
}
public void setEndOfQuarantineReasonDetails(String endOfQuarantineReasonDetails) {
this.endOfQuarantineReasonDetails = endOfQuarantineReasonDetails;
} |
<<<<<<<
public List<CaseExportDto> getExportList(CaseCriteria caseCriteria, CaseExportType exportType, int first, int max, ExportConfigurationDto exportConfiguration) {
Boolean previousCaseManagementDataCriteria = caseCriteria.getMustHaveCaseManagementData();
=======
public List<CaseExportDto> getExportList(CaseCriteria caseCriteria, CaseExportType exportType, int first, int max, ExportConfigurationDto exportConfiguration, Language userLanguage) {
Boolean previousCaseManagementDataCriteria = caseCriteria.isMustHaveCaseManagementData();
>>>>>>>
public List<CaseExportDto> getExportList(CaseCriteria caseCriteria, CaseExportType exportType, int first, int max, ExportConfigurationDto exportConfiguration, Language userLanguage) {
Boolean previousCaseManagementDataCriteria = caseCriteria.getMustHaveCaseManagementData(); |
<<<<<<<
import java.util.HashMap;
=======
import java.util.Collections;
>>>>>>>
import java.util.Collections;
import java.util.HashMap;
<<<<<<<
String newSwaggerDocuPath = System.getProperty("user.dir");
newSwaggerDocuPath = newSwaggerDocuPath + "/target/swagger.json";
String newSwaggerDocu = fileToString(newSwaggerDocuPath);
Map<String, Object> newSwaggerDocuMap = objectMapper.readValue(newSwaggerDocu, new TypeReference<Map<String, Object>>() {
});
=======
Map<String, Object> newSwaggerDocuMap = loadJson("./target/test-classes/swagger.json");
>>>>>>>
Map<String, Object> newSwaggerDocuMap = loadJson("./target/swagger.json");
<<<<<<<
Map<String, Object> releasedDetailMap = new HashMap<String, Object>();
Map<String, Object> newDetailMap = new HashMap<String, Object>();
=======
>>>>>>>
Map<String, Object> releasedDetailMap = new HashMap<String, Object>();
Map<String, Object> newDetailMap = new HashMap<String, Object>();
<<<<<<<
private static Map extractPathsOfController(Map topLevelMap, String controller, Map resultMap) {
for (Object firstLayerKey : topLevelMap.keySet()) {
Object firstLayerValue = topLevelMap.get(firstLayerKey);
if (firstLayerValue instanceof Map) {
Map<String, Object> secondLayerMap = (Map<String, Object>) topLevelMap.get(firstLayerKey);
for (Object secondLayerKey : secondLayerMap.keySet()) {
Object secondLayerValue = secondLayerMap.get(secondLayerKey);
if (secondLayerValue instanceof Map) {
Map<String, Object> thirdLayerMap = (Map<String, Object>) secondLayerMap.get(secondLayerKey);
for (Object thirdLayerKey : thirdLayerMap.keySet()) {
// tags are always represented in the third layer and as ArrayLists
if ("tags".equals(thirdLayerKey) && thirdLayerMap.get(thirdLayerKey) instanceof ArrayList) {
ArrayList tags = (ArrayList) thirdLayerMap.get(thirdLayerKey);
if (tags.contains(controller)) {
resultMap.put(firstLayerKey, topLevelMap.get(firstLayerKey));
}
}
}
}
=======
private static void extractPathsOfController(Map<String, Object> level1, String controller, ArrayList<Object> list) {
level1.entrySet().forEach(e1 -> {
String key1 = e1.getKey();
Object value1 = e1.getValue();
if (isInnerNode(value1)) {
Map<String, Object> level2 = innerNode(value1);
if (hasTag(level2, controller)) {
list.add(key1);
list.add(value1);
>>>>>>>
private static void extractPathsOfController(Map<String, Object> level1, String controller, Map resultMap) {
level1.entrySet().forEach(e1 -> {
String key1 = e1.getKey();
Object value1 = e1.getValue();
if (isInnerNode(value1)) {
Map<String, Object> level2 = innerNode(value1);
if (hasTag(level2, controller)) {
resultMap.put(key1, value1);
<<<<<<<
extractPathsOfController((Map) firstLayerValue, controller, resultMap);
=======
extractPathsOfController(level2, controller, list);
>>>>>>>
extractPathsOfController(level2, controller, list);
<<<<<<<
return resultMap;
=======
>>>>>>> |
<<<<<<<
public EventDataForm(boolean create, UserRight editOrCreateUserRight) {
super(EventDto.class, EventDto.I18N_PREFIX, editOrCreateUserRight, false, new FieldVisibilityCheckers(), new FieldAccessCheckers());
=======
public EventDataForm(boolean create) {
super(EventDto.class, EventDto.I18N_PREFIX);
>>>>>>>
public EventDataForm(boolean create) {
super(EventDto.class, EventDto.I18N_PREFIX, false, new FieldVisibilityCheckers(), new FieldAccessCheckers()); |
<<<<<<<
setCases(FacadeProvider.getCaseFacade().getCasesForDashboard(caseCriteria));
setLastReportedDistrict(FacadeProvider.getCaseFacade().getLastReportedDistrictName(caseCriteria));
=======
setCases(FacadeProvider.getCaseFacade().getCasesForDashboard(caseCriteria, userUuid));
setLastReportedDistrict(FacadeProvider.getCaseFacade().getLastReportedDistrictName(caseCriteria, userUuid, false));
>>>>>>>
setCases(FacadeProvider.getCaseFacade().getCasesForDashboard(caseCriteria));
setLastReportedDistrict(FacadeProvider.getCaseFacade().getLastReportedDistrictName(caseCriteria, false)); |
<<<<<<<
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
visitSummaryDetails.stream().forEach(v -> {
=======
Pseudonymizer pseudonymizer = new Pseudonymizer(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
visitSummaryDetails.forEach(v -> {
SymptomsDto symptoms = SymptomsFacadeEjb.toDto(v.getSymptoms());
>>>>>>>
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
visitSummaryDetails.forEach(v -> {
SymptomsDto symptoms = SymptomsFacadeEjb.toDto(v.getSymptoms()); |
<<<<<<<
contact1.setReportDateTime(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
getContactFacade().saveContact(contact1);
=======
contact1.setReportDateTime(DateHelper.addDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET + 1));
contact1 = getContactFacade().saveContact(contact1);
>>>>>>>
contact1.setReportDateTime(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
contact1 = getContactFacade().saveContact(contact1);
<<<<<<<
contact2.setLastContactDate(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
getContactFacade().saveContact(contact2);
=======
contact2.setLastContactDate(DateHelper.addDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET + 1));
contact2 = getContactFacade().saveContact(contact2);
>>>>>>>
contact2.setLastContactDate(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
contact2 = getContactFacade().saveContact(contact2);
<<<<<<<
contact1.setReportDateTime(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact2.setLastContactDate(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
getContactFacade().saveContact(contact1);
getContactFacade().saveContact(contact2);
=======
contact1.setReportDateTime(DateHelper.addDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET));
contact2.setLastContactDate(DateHelper.addDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2);
>>>>>>>
contact1.setReportDateTime(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact2.setLastContactDate(DateHelper.addDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2);
<<<<<<<
contact1.setReportDateTime(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
contact2.setLastContactDate(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
getContactFacade().saveContact(contact1);
getContactFacade().saveContact(contact2);
=======
contact1.setReportDateTime(DateHelper.subtractDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET + 1));
contact2.setLastContactDate(DateHelper.subtractDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET + 1));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2);
>>>>>>>
contact1.setReportDateTime(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
contact2.setLastContactDate(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET + 1));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2);
<<<<<<<
contact1.setFollowUpUntil(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact2.setFollowUpUntil(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
getContactFacade().saveContact(contact1);
getContactFacade().saveContact(contact2);
=======
contact1.setFollowUpUntil(DateHelper.subtractDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET));
contact2.setFollowUpUntil(DateHelper.subtractDays(referenceDate, ContactLogic.ALLOWED_CONTACT_DATE_OFFSET));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2);
>>>>>>>
contact1.setFollowUpUntil(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact2.setFollowUpUntil(DateHelper.subtractDays(referenceDate, FollowUpLogic.ALLOWED_DATE_OFFSET));
contact1 = getContactFacade().saveContact(contact1);
contact2 = getContactFacade().saveContact(contact2); |
<<<<<<<
import de.symeda.sormas.api.feature.FeatureType;
=======
import de.symeda.sormas.api.facility.FacilityDto;
import de.symeda.sormas.api.facility.FacilityType;
import de.symeda.sormas.api.facility.FacilityTypeGroup;
>>>>>>>
import de.symeda.sormas.api.facility.FacilityDto;
import de.symeda.sormas.api.facility.FacilityType;
import de.symeda.sormas.api.facility.FacilityTypeGroup;
import de.symeda.sormas.api.feature.FeatureType;
<<<<<<<
=======
import de.symeda.sormas.ui.utils.FieldHelper;
>>>>>>>
import de.symeda.sormas.ui.utils.FieldHelper;
<<<<<<<
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseCriteria.PRESENT_CONDITION,
CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY, CaseDataDto.HEALTH_FACILITY,
CaseDataDto.POINT_OF_ENTRY, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO, CaseCriteria.FOLLOW_UP_UNTIL_TO,
=======
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT,
CaseDataDto.COMMUNITY, CaseCriteria.FACILITY_TYPE_GROUP, CaseCriteria.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY, CaseDataDto.POINT_OF_ENTRY)
+ filterLocs(CaseCriteria.PRESENT_CONDITION, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO,
>>>>>>>
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseCriteria.PRESENT_CONDITION,
CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY, CaseCriteria.FACILITY_TYPE_GROUP, CaseCriteria.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY,
CaseDataDto.POINT_OF_ENTRY, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO, CaseCriteria.FOLLOW_UP_UNTIL_TO,
<<<<<<<
CaseCriteria.MUST_BE_PORT_HEALTH_CASE_WITHOUT_FACILITY, CaseCriteria.MUST_HAVE_CASE_MANAGEMENT_DATA,
CaseCriteria.EXCLUDE_SHARED_CASES, CaseCriteria.WITHOUT_RESPONSIBLE_OFFICER, CaseCriteria.WITH_EXTENDED_QUARANTINE)
=======
CaseCriteria.MUST_BE_PORT_HEALTH_CASE_WITHOUT_FACILITY, CaseCriteria.MUST_HAVE_CASE_MANAGEMENT_DATA,
CaseCriteria.EXCLUDE_SHARED_CASES, CaseCriteria.WITHOUT_RESPONSIBLE_OFFICER)
>>>>>>>
CaseCriteria.MUST_BE_PORT_HEALTH_CASE_WITHOUT_FACILITY, CaseCriteria.MUST_HAVE_CASE_MANAGEMENT_DATA,
CaseCriteria.EXCLUDE_SHARED_CASES, CaseCriteria.WITHOUT_RESPONSIBLE_OFFICER, CaseCriteria.WITH_EXTENDED_QUARANTINE) |
<<<<<<<
void saveBulkCase(
List<String> caseUuidList,
CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
boolean surveillanceOfficerChange);
void saveBulkEditWithFacilities(
List<String> caseUuidList,
CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
boolean surveillanceOfficerChange,
Boolean doTransfer);
=======
String getFirstCaseUuidWithOwnershipHandedOver(List<String> caseUuids);
>>>>>>>
String getFirstCaseUuidWithOwnershipHandedOver(List<String> caseUuids);
void saveBulkCase(
List<String> caseUuidList,
CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
boolean surveillanceOfficerChange);
void saveBulkEditWithFacilities(
List<String> caseUuidList,
CaseBulkEditData updatedCaseBulkEditData,
boolean diseaseChange,
boolean classificationChange,
boolean investigationStatusChange,
boolean outcomeChange,
boolean surveillanceOfficerChange,
Boolean doTransfer); |
<<<<<<<
import com.vaadin.v7.data.validator.DateRangeValidator;
import com.vaadin.v7.shared.ui.datefield.Resolution;
=======
import com.vaadin.v7.data.util.converter.Converter.ConversionException;
>>>>>>>
import com.vaadin.v7.data.util.converter.Converter.ConversionException;
import com.vaadin.v7.data.validator.DateRangeValidator;
import com.vaadin.v7.shared.ui.datefield.Resolution;
<<<<<<<
private static final String FOLLOW_UP_STATUS_HEADING_LOC = "followUpStatusHeadingLoc";
private static final String CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC = "cancelOrResumeFollowUpBtnLoc";
private static final String LOST_FOLLOW_UP_BTN_LOC = "lostFollowUpBtnLoc";
public static final String NONE_HEALTH_FACILITY_DETAILS = CaseDataDto.NONE_HEALTH_FACILITY_DETAILS;
=======
private static final String FACILITY_OR_HOME_LOC = "facilityOrHomeLoc";
private static final String TYPE_GROUP_LOC = "typeGroupLoc";
>>>>>>>
private static final String FOLLOW_UP_STATUS_HEADING_LOC = "followUpStatusHeadingLoc";
private static final String CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC = "cancelOrResumeFollowUpBtnLoc";
private static final String LOST_FOLLOW_UP_BTN_LOC = "lostFollowUpBtnLoc";
private static final String FACILITY_OR_HOME_LOC = "facilityOrHomeLoc";
private static final String TYPE_GROUP_LOC = "typeGroupLoc";
<<<<<<<
private void onQuarantineEndChange(Property.ValueChangeEvent valueChangeEvent, CheckBox quarantineExtendedCheckbox) {
Property<Date> quarantineEndField = valueChangeEvent.getProperty();
Date newQuarantineEnd = quarantineEndField.getValue();
CaseDataDto originalCase = getInternalValue();
Date oldQuarantineEnd = originalCase.getQuarantineTo();
if (oldQuarantineEnd != null && newQuarantineEnd != null && newQuarantineEnd.compareTo(oldQuarantineEnd) > 0) {
VaadinUiUtil.showConfirmationPopup(
I18nProperties.getString(Strings.headingExtendQuarantine),
new Label(I18nProperties.getString(Strings.confirmationExtendQuarantine)),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
if (!originalCase.isQuarantineExtended()) {
quarantineExtendedCheckbox.setValue(true);
}
} else {
quarantineEndField.setValue(oldQuarantineEnd);
}
});
} else if (!originalCase.isQuarantineExtended()) {
quarantineExtendedCheckbox.setValue(false);
}
}
@SuppressWarnings("unchecked")
private void updateFollowUpStatusComponents() {
if (!caseFollowUpEnabled) {
return;
}
getContent().removeComponent(CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
getContent().removeComponent(LOST_FOLLOW_UP_BTN_LOC);
Field<FollowUpStatus> statusField = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
boolean followUpVisible = getValue() != null && statusField.isVisible();
if (followUpVisible && UserProvider.getCurrent().hasUserRight(UserRight.CASE_EDIT)) {
FollowUpStatus followUpStatus = statusField.getValue();
if (followUpStatus == FollowUpStatus.FOLLOW_UP) {
Button cancelButton = ButtonHelper.createButton(Captions.contactCancelFollowUp, event -> {
Field<FollowUpStatus> statusField1 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField1.setReadOnly(false);
statusField1.setValue(FollowUpStatus.CANCELED);
statusField1.setReadOnly(true);
updateFollowUpStatusComponents();
});
cancelButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(cancelButton, CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
Button lostButton = ButtonHelper.createButton(Captions.contactLostToFollowUp, event -> {
Field<FollowUpStatus> statusField12 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField12.setReadOnly(false);
statusField12.setValue(FollowUpStatus.LOST);
statusField12.setReadOnly(true);
updateFollowUpStatusComponents();
});
lostButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(lostButton, LOST_FOLLOW_UP_BTN_LOC);
} else if (followUpStatus == FollowUpStatus.CANCELED || followUpStatus == FollowUpStatus.LOST) {
Button resumeButton = ButtonHelper.createButton(Captions.contactResumeFollowUp, event -> {
Field<FollowUpStatus> statusField13 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField13.setReadOnly(false);
statusField13.setValue(FollowUpStatus.FOLLOW_UP);
statusField13.setReadOnly(true);
updateFollowUpStatusComponents();
}, CssStyles.FORCE_CAPTION);
resumeButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(resumeButton, CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
}
}
}
=======
@Override
public void setValue(CaseDataDto newFieldValue) throws ReadOnlyException, ConversionException {
super.setValue(newFieldValue);
// HACK: Binding to the fields will call field listeners that may clear/modify the values of other fields.
// this hopefully resets everything to it's correct value
discard();
}
private void updateFacility(DistrictReferenceDto district, CommunityReferenceDto community, FacilityType facilityType, ComboBox facility) {
if (facilityType != null) {
if (community != null) {
FieldHelper.updateItems(
facility,
FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType, true, false));
} else if (district != null) {
FieldHelper.updateItems(
facility,
FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(district, facilityType, true, false));
} else {
FieldHelper.removeItems(facility);
}
} else {
if (TypeOfPlace.HOME.equals(facilityOrHome.getValue())) {
FacilityReferenceDto noFacilityRef = FacadeProvider.getFacilityFacade().getByUuid(FacilityDto.NONE_FACILITY_UUID).toReference();
facility.addItem(noFacilityRef);
facility.setValue(noFacilityRef);
} else {
FieldHelper.removeItems(facility);
}
}
}
>>>>>>>
private void onQuarantineEndChange(Property.ValueChangeEvent valueChangeEvent, CheckBox quarantineExtendedCheckbox) {
Property<Date> quarantineEndField = valueChangeEvent.getProperty();
Date newQuarantineEnd = quarantineEndField.getValue();
CaseDataDto originalCase = getInternalValue();
Date oldQuarantineEnd = originalCase.getQuarantineTo();
if (oldQuarantineEnd != null && newQuarantineEnd != null && newQuarantineEnd.compareTo(oldQuarantineEnd) > 0) {
VaadinUiUtil.showConfirmationPopup(
I18nProperties.getString(Strings.headingExtendQuarantine),
new Label(I18nProperties.getString(Strings.confirmationExtendQuarantine)),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
if (!originalCase.isQuarantineExtended()) {
quarantineExtendedCheckbox.setValue(true);
}
} else {
quarantineEndField.setValue(oldQuarantineEnd);
}
});
} else if (!originalCase.isQuarantineExtended()) {
quarantineExtendedCheckbox.setValue(false);
}
}
@SuppressWarnings("unchecked")
private void updateFollowUpStatusComponents() {
if (!caseFollowUpEnabled) {
return;
}
getContent().removeComponent(CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
getContent().removeComponent(LOST_FOLLOW_UP_BTN_LOC);
Field<FollowUpStatus> statusField = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
boolean followUpVisible = getValue() != null && statusField.isVisible();
if (followUpVisible && UserProvider.getCurrent().hasUserRight(UserRight.CASE_EDIT)) {
FollowUpStatus followUpStatus = statusField.getValue();
if (followUpStatus == FollowUpStatus.FOLLOW_UP) {
Button cancelButton = ButtonHelper.createButton(Captions.contactCancelFollowUp, event -> {
Field<FollowUpStatus> statusField1 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField1.setReadOnly(false);
statusField1.setValue(FollowUpStatus.CANCELED);
statusField1.setReadOnly(true);
updateFollowUpStatusComponents();
});
cancelButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(cancelButton, CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
Button lostButton = ButtonHelper.createButton(Captions.contactLostToFollowUp, event -> {
Field<FollowUpStatus> statusField12 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField12.setReadOnly(false);
statusField12.setValue(FollowUpStatus.LOST);
statusField12.setReadOnly(true);
updateFollowUpStatusComponents();
});
lostButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(lostButton, LOST_FOLLOW_UP_BTN_LOC);
} else if (followUpStatus == FollowUpStatus.CANCELED || followUpStatus == FollowUpStatus.LOST) {
Button resumeButton = ButtonHelper.createButton(Captions.contactResumeFollowUp, event -> {
Field<FollowUpStatus> statusField13 = (Field<FollowUpStatus>) getField(CaseDataDto.FOLLOW_UP_STATUS);
statusField13.setReadOnly(false);
statusField13.setValue(FollowUpStatus.FOLLOW_UP);
statusField13.setReadOnly(true);
updateFollowUpStatusComponents();
}, CssStyles.FORCE_CAPTION);
resumeButton.setWidth(100, Unit.PERCENTAGE);
getContent().addComponent(resumeButton, CANCEL_OR_RESUME_FOLLOW_UP_BTN_LOC);
}
}
}
@Override
public void setValue(CaseDataDto newFieldValue) throws ReadOnlyException, ConversionException {
super.setValue(newFieldValue);
// HACK: Binding to the fields will call field listeners that may clear/modify the values of other fields.
// this hopefully resets everything to it's correct value
discard();
}
private void updateFacility(DistrictReferenceDto district, CommunityReferenceDto community, FacilityType facilityType, ComboBox facility) {
if (facilityType != null) {
if (community != null) {
FieldHelper.updateItems(
facility,
FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType, true, false));
} else if (district != null) {
FieldHelper.updateItems(
facility,
FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(district, facilityType, true, false));
} else {
FieldHelper.removeItems(facility);
}
} else {
if (TypeOfPlace.HOME.equals(facilityOrHome.getValue())) {
FacilityReferenceDto noFacilityRef = FacadeProvider.getFacilityFacade().getByUuid(FacilityDto.NONE_FACILITY_UUID).toReference();
facility.addItem(noFacilityRef);
facility.setValue(noFacilityRef);
} else {
FieldHelper.removeItems(facility);
}
}
} |
<<<<<<<
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil());
=======
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
>>>>>>>
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil());
<<<<<<<
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil());
=======
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
>>>>>>>
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil()); |
<<<<<<<
=======
import de.symeda.sormas.api.exposure.AnimalContactType;
import de.symeda.sormas.api.exposure.ExposureDto;
import de.symeda.sormas.api.exposure.ExposureType;
>>>>>>>
import de.symeda.sormas.api.exposure.AnimalContactType;
import de.symeda.sormas.api.exposure.ExposureDto;
import de.symeda.sormas.api.exposure.ExposureType;
<<<<<<<
=======
/**
* Test that it doesnt throw de.symeda.sormas.api.utils.OutdatedEntityException
* To fix OutdatedEntityException generate new uuid for the outdated object in
* {@link de.symeda.sormas.backend.sormastosormas.SormasToSormasFacadeEjb#processCaseData(CaseDataDto, PersonDto)}
*/
@Test
public void testRecreateEmbeddedUuidsOfCase() throws JsonProcessingException, SormasToSormasException, SormasToSormasValidationException {
MappableRdcf rdcf = createRDCF();
PersonDto person = createPersonDto(rdcf);
CaseDataDto caze = createRemoteCaseDto(rdcf.remoteRdcf, person);
caze.getHospitalization().getPreviousHospitalizations().add(PreviousHospitalizationDto.build(caze));
caze.getEpiData().getExposures().add(ExposureDto.build(ExposureType.TRAVEL));
byte[] encryptedData = encryptShareData(new SormasToSormasCaseDto(person, caze, createSormasToSormasOriginInfo()));
getSormasToSormasFacade().saveSharedCases(new SormasToSormasEncryptedDataDto(DEFAULT_SERVER_ACCESS_CN, encryptedData));
caze.setUuid(DataHelper.createUuid());
encryptedData = encryptShareData(new SormasToSormasCaseDto(person, caze, createSormasToSormasOriginInfo()));
getSormasToSormasFacade().saveSharedCases(new SormasToSormasEncryptedDataDto(DEFAULT_SERVER_ACCESS_CN, encryptedData));
assertThat(getCaseFacade().getCaseDataByUuid(caze.getUuid()), is(notNullValue()));
}
>>>>>>> |
<<<<<<<
import de.symeda.sormas.api.caze.*;
import de.symeda.sormas.api.contact.*;
=======
import de.symeda.sormas.api.caze.CaseClassification;
import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.caze.InvestigationStatus;
import de.symeda.sormas.api.caze.MapCaseDto;
import de.symeda.sormas.api.contact.ContactClassification;
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.contact.ContactExportDto;
import de.symeda.sormas.api.contact.ContactStatus;
import de.symeda.sormas.api.contact.FollowUpStatus;
import de.symeda.sormas.api.contact.MapContactDto;
>>>>>>>
import de.symeda.sormas.api.caze.CaseClassification;
import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.caze.InvestigationStatus;
import de.symeda.sormas.api.caze.MapCaseDto;
import de.symeda.sormas.api.contact.ContactClassification;
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.contact.ContactExportDto;
import de.symeda.sormas.api.contact.ContactStatus;
import de.symeda.sormas.api.contact.FollowUpStatus;
import de.symeda.sormas.api.contact.MapContactDto;
import de.symeda.sormas.api.caze.*;
import de.symeda.sormas.api.contact.*;
<<<<<<<
import org.apache.commons.lang3.time.DateUtils;
import org.junit.Assert;
import org.junit.Test;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
=======
>>>>>>>
import org.apache.commons.lang3.time.DateUtils;
import org.junit.Assert;
import org.junit.Test;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when; |
<<<<<<<
=======
import de.symeda.sormas.api.event.EventDto;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
>>>>>>>
import de.symeda.sormas.api.event.EventDto;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
<<<<<<<
=======
import de.symeda.sormas.api.externaljournal.ExternalJournalFacade;
import de.symeda.sormas.api.externaljournal.ExternalJournalValidation;
import de.symeda.sormas.api.externaljournal.patientdiary.PatientDiaryRegisterResult;
>>>>>>>
import de.symeda.sormas.api.externaljournal.ExternalJournalFacade;
import de.symeda.sormas.api.externaljournal.ExternalJournalValidation;
import de.symeda.sormas.api.externaljournal.patientdiary.PatientDiaryRegisterResult;
<<<<<<<
=======
import de.symeda.sormas.api.person.PersonHelper;
import de.symeda.sormas.api.person.SymptomJournalStatus;
>>>>>>>
import de.symeda.sormas.api.person.PersonHelper;
import de.symeda.sormas.api.person.SymptomJournalStatus;
<<<<<<<
VaadinUiUtil.showDeleteConfirmationWindow(
String.format(I18nProperties.getString(Strings.confirmationCancelFollowUp), selectedRows.size()),
() -> {
=======
VaadinUiUtil.showConfirmationPopup(
String.format(I18nProperties.getString(Strings.headingContactsCancelFollowUp)),
new Label(String.format(I18nProperties.getString(Strings.confirmationCancelFollowUp), selectedRows.size())),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
>>>>>>>
VaadinUiUtil.showConfirmationPopup(
String.format(I18nProperties.getString(Strings.headingContactsCancelFollowUp)),
new Label(String.format(I18nProperties.getString(Strings.confirmationCancelFollowUp), selectedRows.size())),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
<<<<<<<
VaadinUiUtil.showDeleteConfirmationWindow(
String.format(I18nProperties.getString(Strings.confirmationLostToFollowUp), selectedRows.size()),
() -> {
=======
VaadinUiUtil.showConfirmationPopup(
String.format(I18nProperties.getString(Strings.headingContactsLostToFollowUp)),
new Label(String.format(I18nProperties.getString(Strings.confirmationLostToFollowUp), selectedRows.size())),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
>>>>>>>
VaadinUiUtil.showConfirmationPopup(
String.format(I18nProperties.getString(Strings.headingContactsLostToFollowUp)),
new Label(String.format(I18nProperties.getString(Strings.confirmationLostToFollowUp), selectedRows.size())),
I18nProperties.getString(Strings.yes),
I18nProperties.getString(Strings.no),
640,
confirmed -> {
if (confirmed) {
<<<<<<<
=======
/**
* Opens a window that contains an iFrame with the symptom journal website specified in the properties.
* The steps to build that iFrame are:
* 1. Request an authentication token based on the stored client ID and secret
* 2. Build an HTML page containing a form with the auth token and some personal details as parameters
* 3. The form is automatically submitted and replaced by the iFrame
*/
public void openSymptomJournalWindow(PersonDto person) {
String authToken = externalJournalFacade.getSymptomJournalAuthToken();
BrowserFrame frame = new BrowserFrame(null, new StreamResource(() -> {
String formUrl = FacadeProvider.getConfigFacade().getSymptomJournalConfig().getUrl();
Map<String, String> parameters = new LinkedHashMap<>();
parameters.put("token", authToken);
parameters.put("uuid", person.getUuid());
parameters.put("firstname", person.getFirstName());
parameters.put("lastname", person.getLastName());
parameters.put("email", person.getEmailAddress());
byte[] document = createSymptomJournalForm(formUrl, parameters);
return new ByteArrayInputStream(document);
}, "symptomJournal.html"));
frame.setWidth("100%");
frame.setHeight("100%");
Window window = VaadinUiUtil.createPopupWindow();
window.setContent(frame);
window.setCaption(I18nProperties.getString(Strings.headingPIAAccountCreation));
window.setWidth(80, Unit.PERCENTAGE);
window.setHeight(80, Unit.PERCENTAGE);
UI.getCurrent().addWindow(window);
}
/**
* @return An HTML page containing a form that is automatically submitted in order to display the symptom journal iFrame
*/
private byte[] createSymptomJournalForm(String formUrl, Map<String, String> inputs) {
Document document;
try (InputStream in = getClass().getResourceAsStream("/symptomJournal.html")) {
document = Jsoup.parse(in, StandardCharsets.UTF_8.name(), formUrl);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Element form = document.getElementById("form");
form.attr("action", formUrl);
Element parametersElement = form.getElementById("parameters");
inputs.forEach((k, v) -> parametersElement.appendChild(new Element("input").attr("type", "hidden").attr("name", k).attr("value", v)));
return document.toString().getBytes(StandardCharsets.UTF_8);
}
/**
* Attempts to register the given person as a new patient in CLIMEDO
* Displays the result in a popup
*/
public void registerPatientDiaryPerson(PersonDto person) {
ExternalJournalValidation validationResult = externalJournalFacade.validatePatientDiaryPerson(person);
if (!validationResult.isValid()) {
showPatientDiaryWarningPopup(validationResult.getMessage());
} else {
if (SymptomJournalStatus.ACCEPTED.equals(person.getSymptomJournalStatus())
|| SymptomJournalStatus.REGISTERED.equals(person.getSymptomJournalStatus())) {
openPatientDiaryEnrollPage(person.getUuid());
} else {
PatientDiaryRegisterResult registerResult = externalJournalFacade.registerPatientDiaryPerson(person);
showPatientRegisterResultPopup(registerResult);
}
}
}
private void openPatientDiaryEnrollPage(String personUuid) {
String url = FacadeProvider.getConfigFacade().getPatientDiaryConfig().getUrl();
String authToken = externalJournalFacade.getPatientDiaryAuthToken();
url += "/data?q=" + personUuid + "&token=" + authToken;
UI.getCurrent().getPage().open(url, "_blank");
}
private void showPatientDiaryWarningPopup(String message) {
VerticalLayout warningLayout = new VerticalLayout();
warningLayout.setMargin(true);
Image warningIcon = new Image(null, new ThemeResource("img/warning-icon.png"));
warningIcon.setHeight(35, Unit.PIXELS);
warningIcon.setWidth(35, Unit.PIXELS);
warningLayout.addComponentAsFirst(warningIcon);
Window popupWindow = VaadinUiUtil.showPopupWindow(warningLayout);
Label messageLabel = new Label(I18nProperties.getValidationError(Validations.externalJournalPersonValidationError));
CssStyles.style(messageLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
warningLayout.addComponent(messageLabel);
Label infoLabel = new Label(message);
CssStyles.style(infoLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
warningLayout.addComponent(infoLabel);
CssStyles.style(warningLayout, CssStyles.ALIGN_CENTER);
popupWindow.addCloseListener(e -> popupWindow.close());
popupWindow.setWidth(400, Unit.PIXELS);
}
private void showPatientRegisterResultPopup(PatientDiaryRegisterResult registerResult) {
VerticalLayout registrationResultLayout = new VerticalLayout();
registrationResultLayout.setMargin(true);
Image errorIcon = new Image(null, new ThemeResource("img/error-icon.png"));
errorIcon.setHeight(35, Unit.PIXELS);
errorIcon.setWidth(35, Unit.PIXELS);
Image successIcon = new Image(null, new ThemeResource("img/success-icon.png"));
successIcon.setHeight(35, Unit.PIXELS);
successIcon.setWidth(35, Unit.PIXELS);
CssStyles.style(registrationResultLayout, CssStyles.ALIGN_CENTER);
if (registerResult.isSuccess()) {
registrationResultLayout.removeComponent(errorIcon);
registrationResultLayout.addComponentAsFirst(successIcon);
} else {
registrationResultLayout.removeComponent(successIcon);
registrationResultLayout.addComponentAsFirst(errorIcon);
Label infoLabel = new Label();
CssStyles.style(infoLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
registrationResultLayout.addComponent(infoLabel);
infoLabel.setValue(I18nProperties.getCaption(Captions.patientDiaryRegistrationError));
}
Label messageLabel = new Label();
CssStyles.style(messageLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
registrationResultLayout.addComponent(messageLabel);
messageLabel.setValue(registerResult.getMessage());
Window popupWindow = VaadinUiUtil.showPopupWindow(registrationResultLayout);
popupWindow.addCloseListener(e -> popupWindow.close());
popupWindow.setWidth(400, Unit.PIXELS);
}
>>>>>>>
/**
* Opens a window that contains an iFrame with the symptom journal website specified in the properties.
* The steps to build that iFrame are:
* 1. Request an authentication token based on the stored client ID and secret
* 2. Build an HTML page containing a form with the auth token and some personal details as parameters
* 3. The form is automatically submitted and replaced by the iFrame
*/
public void openSymptomJournalWindow(PersonDto person) {
String authToken = externalJournalFacade.getSymptomJournalAuthToken();
BrowserFrame frame = new BrowserFrame(null, new StreamResource(() -> {
String formUrl = FacadeProvider.getConfigFacade().getSymptomJournalConfig().getUrl();
Map<String, String> parameters = new LinkedHashMap<>();
parameters.put("token", authToken);
parameters.put("uuid", person.getUuid());
parameters.put("firstname", person.getFirstName());
parameters.put("lastname", person.getLastName());
parameters.put("email", person.getEmailAddress());
byte[] document = createSymptomJournalForm(formUrl, parameters);
return new ByteArrayInputStream(document);
}, "symptomJournal.html"));
frame.setWidth("100%");
frame.setHeight("100%");
Window window = VaadinUiUtil.createPopupWindow();
window.setContent(frame);
window.setCaption(I18nProperties.getString(Strings.headingPIAAccountCreation));
window.setWidth(80, Unit.PERCENTAGE);
window.setHeight(80, Unit.PERCENTAGE);
UI.getCurrent().addWindow(window);
}
/**
* @return An HTML page containing a form that is automatically submitted in order to display the symptom journal iFrame
*/
private byte[] createSymptomJournalForm(String formUrl, Map<String, String> inputs) {
Document document;
try (InputStream in = getClass().getResourceAsStream("/symptomJournal.html")) {
document = Jsoup.parse(in, StandardCharsets.UTF_8.name(), formUrl);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Element form = document.getElementById("form");
form.attr("action", formUrl);
Element parametersElement = form.getElementById("parameters");
inputs.forEach((k, v) -> parametersElement.appendChild(new Element("input").attr("type", "hidden").attr("name", k).attr("value", v)));
return document.toString().getBytes(StandardCharsets.UTF_8);
}
/**
* Attempts to register the given person as a new patient in CLIMEDO
* Displays the result in a popup
*/
public void registerPatientDiaryPerson(PersonDto person) {
ExternalJournalValidation validationResult = externalJournalFacade.validatePatientDiaryPerson(person);
if (!validationResult.isValid()) {
showPatientDiaryWarningPopup(validationResult.getMessage());
} else {
if (SymptomJournalStatus.ACCEPTED.equals(person.getSymptomJournalStatus())
|| SymptomJournalStatus.REGISTERED.equals(person.getSymptomJournalStatus())) {
openPatientDiaryEnrollPage(person.getUuid());
} else {
PatientDiaryRegisterResult registerResult = externalJournalFacade.registerPatientDiaryPerson(person);
showPatientRegisterResultPopup(registerResult);
}
}
}
private void openPatientDiaryEnrollPage(String personUuid) {
String url = FacadeProvider.getConfigFacade().getPatientDiaryConfig().getUrl();
String authToken = externalJournalFacade.getPatientDiaryAuthToken();
url += "/data?q=" + personUuid + "&token=" + authToken;
UI.getCurrent().getPage().open(url, "_blank");
}
private void showPatientDiaryWarningPopup(String message) {
VerticalLayout warningLayout = new VerticalLayout();
warningLayout.setMargin(true);
Image warningIcon = new Image(null, new ThemeResource("img/warning-icon.png"));
warningIcon.setHeight(35, Unit.PIXELS);
warningIcon.setWidth(35, Unit.PIXELS);
warningLayout.addComponentAsFirst(warningIcon);
Window popupWindow = VaadinUiUtil.showPopupWindow(warningLayout);
Label messageLabel = new Label(I18nProperties.getValidationError(Validations.externalJournalPersonValidationError));
CssStyles.style(messageLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
warningLayout.addComponent(messageLabel);
Label infoLabel = new Label(message);
CssStyles.style(infoLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
warningLayout.addComponent(infoLabel);
CssStyles.style(warningLayout, CssStyles.ALIGN_CENTER);
popupWindow.addCloseListener(e -> popupWindow.close());
popupWindow.setWidth(400, Unit.PIXELS);
}
private void showPatientRegisterResultPopup(PatientDiaryRegisterResult registerResult) {
VerticalLayout registrationResultLayout = new VerticalLayout();
registrationResultLayout.setMargin(true);
Image errorIcon = new Image(null, new ThemeResource("img/error-icon.png"));
errorIcon.setHeight(35, Unit.PIXELS);
errorIcon.setWidth(35, Unit.PIXELS);
Image successIcon = new Image(null, new ThemeResource("img/success-icon.png"));
successIcon.setHeight(35, Unit.PIXELS);
successIcon.setWidth(35, Unit.PIXELS);
CssStyles.style(registrationResultLayout, CssStyles.ALIGN_CENTER);
if (registerResult.isSuccess()) {
registrationResultLayout.removeComponent(errorIcon);
registrationResultLayout.addComponentAsFirst(successIcon);
} else {
registrationResultLayout.removeComponent(successIcon);
registrationResultLayout.addComponentAsFirst(errorIcon);
Label infoLabel = new Label();
CssStyles.style(infoLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
registrationResultLayout.addComponent(infoLabel);
infoLabel.setValue(I18nProperties.getCaption(Captions.patientDiaryRegistrationError));
}
Label messageLabel = new Label();
CssStyles.style(messageLabel, CssStyles.LABEL_LARGE, CssStyles.LABEL_WHITE_SPACE_NORMAL);
registrationResultLayout.addComponent(messageLabel);
messageLabel.setValue(registerResult.getMessage());
Window popupWindow = VaadinUiUtil.showPopupWindow(registrationResultLayout);
popupWindow.addCloseListener(e -> popupWindow.close());
popupWindow.setWidth(400, Unit.PIXELS);
} |
<<<<<<<
Boolean isEventEditAllowed(String eventUuid);
=======
String getUuidByCaseUuidOrPersonUuid(String value);
>>>>>>>
Boolean isEventEditAllowed(String eventUuid);
String getUuidByCaseUuidOrPersonUuid(String value); |
<<<<<<<
String getSormasToSormasUserPassword();
=======
String getPatientDiaryUrl();
>>>>>>>
String getPatientDiaryUrl();
String getSormasToSormasUserPassword();
<<<<<<<
SormasToSormasConfig getSormasToSormasConfig();
=======
Sormas2SormasConfig getSormas2SormasConfig();
String getAuthenticationProvider();
>>>>>>>
SormasToSormasConfig getSormasToSormasConfig();
String getAuthenticationProvider(); |
<<<<<<<
import de.symeda.sormas.api.sormastosormas.SormasToSormasLabMessageFacade;
import de.symeda.sormas.api.survnet.SurvnetGatewayFacade;
=======
import de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseFacade;
import de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactFacade;
import de.symeda.sormas.api.sormastosormas.event.SormasToSormasEventFacade;
>>>>>>>
import de.symeda.sormas.api.sormastosormas.SormasToSormasLabMessageFacade;
import de.symeda.sormas.api.survnet.SurvnetGatewayFacade;
import de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseFacade;
import de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactFacade;
import de.symeda.sormas.api.sormastosormas.event.SormasToSormasEventFacade;
<<<<<<<
import de.symeda.sormas.backend.sormastosormas.labmessage.SormasToSormasLabMessageFacadeEjb.SormasToSormasLabMessageFacadeEjbLocal;
import de.symeda.sormas.backend.survnet.SurvnetGatewayFacadeEjb;
=======
import de.symeda.sormas.backend.sormastosormas.caze.SormasToSormasCaseFacadeEjb.SormasToSormasCaseFacadeEjbLocal;
import de.symeda.sormas.backend.sormastosormas.contact.SormasToSormasContactFacadeEjb.SormasToSormasContactFacadeEjbLocal;
import de.symeda.sormas.backend.sormastosormas.event.SormasToSormasEventFacadeEjb.SormasToSormasEventFacadeEjbLocal;
>>>>>>>
import de.symeda.sormas.backend.sormastosormas.caze.SormasToSormasCaseFacadeEjb.SormasToSormasCaseFacadeEjbLocal;
import de.symeda.sormas.backend.sormastosormas.contact.SormasToSormasContactFacadeEjb.SormasToSormasContactFacadeEjbLocal;
import de.symeda.sormas.backend.sormastosormas.event.SormasToSormasEventFacadeEjb.SormasToSormasEventFacadeEjbLocal;
import de.symeda.sormas.backend.sormastosormas.labmessage.SormasToSormasLabMessageFacadeEjb.SormasToSormasLabMessageFacadeEjbLocal;
import de.symeda.sormas.backend.survnet.SurvnetGatewayFacadeEjb;
<<<<<<<
public LabMessageFacade getLabMessageFacade() {
return getBean(LabMessageFacadeEjbLocal.class);
}
public SormasToSormasLabMessageFacade getSormasToSormasLabMessageFacade() {
return getBean(SormasToSormasLabMessageFacadeEjbLocal.class);
}
=======
public SormasToSormasCaseFacade getSormasToSormasCaseFacade() {
return getBean(SormasToSormasCaseFacadeEjbLocal.class);
}
public SormasToSormasContactFacade getSormasToSormasContactFacade() {
return getBean(SormasToSormasContactFacadeEjbLocal.class);
}
public SormasToSormasEventFacade getSormasToSormasEventFacade() {
return getBean(SormasToSormasEventFacadeEjbLocal.class);
}
>>>>>>>
public SormasToSormasCaseFacade getSormasToSormasCaseFacade() {
return getBean(SormasToSormasCaseFacadeEjbLocal.class);
}
public SormasToSormasContactFacade getSormasToSormasContactFacade() {
return getBean(SormasToSormasContactFacadeEjbLocal.class);
}
public SormasToSormasEventFacade getSormasToSormasEventFacade() {
return getBean(SormasToSormasEventFacadeEjbLocal.class);
}
public LabMessageFacade getLabMessageFacade() {
return getBean(LabMessageFacadeEjbLocal.class);
}
public SormasToSormasLabMessageFacade getSormasToSormasLabMessageFacade() {
return getBean(SormasToSormasLabMessageFacadeEjbLocal.class);
} |
<<<<<<<
public ExportFacade getExportFacade() {
return getBean(ExportFacadeEjb.ExportFacadeEjbLocal.class);
}
=======
public SystemEventFacade getSystemEventFacade() {
return getBean((SystemEventFacadeEjb.SystemEventFacadeEjbLocal.class));
}
>>>>>>>
public ExportFacade getExportFacade() {
return getBean(ExportFacadeEjb.ExportFacadeEjbLocal.class);
}
public SystemEventFacade getSystemEventFacade() {
return getBean((SystemEventFacadeEjb.SystemEventFacadeEjbLocal.class));
} |
<<<<<<<
public LocationDialog(final FragmentActivity activity, Location location, AppFieldAccessCheckers fieldAccessCheckers) {
=======
public LocationDialog(final FragmentActivity activity, Location location, FieldAccessCheckers fieldAccessCheckers) {
this(activity, location, true, fieldAccessCheckers);
}
public LocationDialog(final FragmentActivity activity, Location location, boolean closeOnPositiveButtonClick, FieldAccessCheckers fieldAccessCheckers) {
>>>>>>>
public LocationDialog(final FragmentActivity activity, Location location, AppFieldAccessCheckers fieldAccessCheckers) {
this(activity, location, true, fieldAccessCheckers);
}
public LocationDialog(final FragmentActivity activity, Location location, boolean closeOnPositiveButtonClick, AppFieldAccessCheckers fieldAccessCheckers) {
<<<<<<<
-1,
fieldAccessCheckers);
=======
-1, closeOnPositiveButtonClick);
>>>>>>>
-1, closeOnPositiveButtonClick); |
<<<<<<<
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.event.EventParticipantDto;
import de.symeda.sormas.api.ExportType;
import de.symeda.sormas.api.person.PersonReferenceDto;
=======
import de.symeda.sormas.api.importexport.ExportConfigurationDto;
>>>>>>>
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.event.EventParticipantDto;
import de.symeda.sormas.api.person.PersonReferenceDto;
import de.symeda.sormas.api.importexport.ExportConfigurationDto; |
<<<<<<<
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
=======
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
>>>>>>>
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
<<<<<<<
@EJB
private ExternalJournalService externalJournalService;
=======
@EJB
private ManualMessageLogService manualMessageLogService;
@EJB
private AdditionalTestFacadeEjbLocal additionalTestFacade;
>>>>>>>
@EJB
private ManualMessageLogService manualMessageLogService;
@EJB
private AdditionalTestFacadeEjbLocal additionalTestFacade;
@EJB
private ExternalJournalService externalJournalService;
<<<<<<<
joins.getPerson().get(Person.OCCUPATION_DETAILS), joins.getEpiData().get(EpiData.CONTACT_WITH_SOURCE_CASE_KNOWN),
caseRoot.get(Case.VACCINATION), caseRoot.get(Case.VACCINATION_DOSES), caseRoot.get(Case.VACCINATION_DATE),
=======
joins.getPerson().get(Person.OCCUPATION_DETAILS), joins.getPerson().get(Person.ARMED_FORCES_RELATION_TYPE), joins.getEpiData().get(EpiData.CONTACT_WITH_SOURCE_CASE_KNOWN),
caseRoot.get(Case.VACCINATION), caseRoot.get(Case.VACCINATION_DOSES), caseRoot.get(Case.VACCINATION_DATE),
>>>>>>>
joins.getPerson().get(Person.OCCUPATION_DETAILS), joins.getPerson().get(Person.ARMED_FORCES_RELATION_TYPE), joins.getEpiData().get(EpiData.CONTACT_WITH_SOURCE_CASE_KNOWN),
caseRoot.get(Case.VACCINATION), caseRoot.get(Case.VACCINATION_DOSES), caseRoot.get(Case.VACCINATION_DATE),
<<<<<<<
if (caze != null) {
handleExternalJournalPerson(dto);
}
caze = fillOrBuildEntity(dto, caze);
=======
caze = fillOrBuildEntity(dto, caze, checkChangeDate);
>>>>>>>
caze = fillOrBuildEntity(dto, caze, checkChangeDate);
if (caze != null) {
handleExternalJournalPerson(dto);
}
caze = fillOrBuildEntity(dto, caze); |
<<<<<<<
import de.symeda.sormas.api.utils.SensitiveData;
=======
import de.symeda.sormas.api.utils.YesNoUnknown;
>>>>>>>
import de.symeda.sormas.api.utils.YesNoUnknown;
import de.symeda.sormas.api.utils.SensitiveData;
<<<<<<<
private Date eventDate;
@SensitiveData
=======
private Date startDate;
private Date endDate;
>>>>>>>
private Date startDate;
private Date endDate;
@SensitiveData
<<<<<<<
@SensitiveData
=======
private EventSourceType srcType;
>>>>>>>
private EventSourceType srcType;
@SensitiveData
<<<<<<<
String regionUuid,
=======
YesNoUnknown nosocomial,
>>>>>>>
YesNoUnknown nosocomial,
String regionUuid,
<<<<<<<
Date reportDateTime,
String reportingUserUid,
String surveillanceOfficerUuid) {
=======
String srcEmail,
String srcMediaWebsite,
String srcMediaName,
String srcMediaDetails,
Date reportDateTime) {
>>>>>>>
String srcEmail,
String srcMediaWebsite,
String srcMediaName,
String srcMediaDetails,
Date reportDateTime,
String reportingUserUid,
String surveillanceOfficerUuid) { |
<<<<<<<
Predicate casePersonsFilter = caseService.createUserFilter(cb, casePersonsQuery, casePersonsRoot);
if (casePersonsFilter != null) {
casePersonsQuery.where(casePersonsFilter);
}
=======
Predicate casePersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, casePersonsRoot.join(Case.PERSON, JoinType.LEFT));
Predicate activeCasesFilter = caseService.createActiveCasesFilter(cb, casePersonsRoot);
Predicate caseUserFilter = caseService.createUserFilter(cb, casePersonsQuery, casePersonsRoot, user);
casePersonsQuery.where(and(cb, casePersonsFilter, activeCasesFilter, caseUserFilter));
>>>>>>>
Predicate casePersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, casePersonsRoot.join(Case.PERSON, JoinType.LEFT));
Predicate activeCasesFilter = caseService.createActiveCasesFilter(cb, casePersonsRoot);
Predicate caseUserFilter = caseService.createUserFilter(cb, casePersonsQuery, casePersonsRoot, user);
casePersonsQuery.where(and(cb, casePersonsFilter, activeCasesFilter, caseUserFilter));
Predicate casePersonsFilter = caseService.createUserFilter(cb, casePersonsQuery, casePersonsRoot);
if (casePersonsFilter != null) {
casePersonsQuery.where(casePersonsFilter);
}
<<<<<<<
Predicate contactPersonsFilter = contactService.createUserFilter(cb, contactPersonsQuery, contactPersonsRoot
);
if (contactPersonsFilter != null) {
contactPersonsQuery.where(contactPersonsFilter);
}
=======
Predicate contactPersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, contactPersonsRoot.join(Contact.PERSON, JoinType.LEFT));
Predicate activeContactsFilter = contactService.createActiveContactsFilter(cb, contactPersonsRoot);
Predicate contactUserFilter = contactService.createUserFilter(cb, contactPersonsQuery, contactPersonsRoot, user);
contactPersonsQuery.where(and(cb, contactPersonsFilter, activeContactsFilter, contactUserFilter));
>>>>>>>
Predicate contactPersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, contactPersonsRoot.join(Contact.PERSON, JoinType.LEFT));
Predicate activeContactsFilter = contactService.createActiveContactsFilter(cb, contactPersonsRoot);
Predicate contactUserFilter = contactService.createUserFilter(cb, contactPersonsQuery, contactPersonsRoot, user);
contactPersonsQuery.where(and(cb, contactPersonsFilter, activeContactsFilter, contactUserFilter));
Predicate contactPersonsFilter = contactService.createUserFilter(cb, contactPersonsQuery, contactPersonsRoot
);
if (contactPersonsFilter != null) {
contactPersonsQuery.where(contactPersonsFilter);
}
<<<<<<<
Predicate eventPersonsFilter = eventParticipantService.createUserFilter(cb, eventPersonsQuery, eventPersonsRoot
);
if (eventPersonsFilter != null) {
eventPersonsQuery.where(eventPersonsFilter);
}
=======
Predicate eventParticipantPersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, eventPersonsRoot.join(EventParticipant.PERSON, JoinType.LEFT));
Predicate activeEventParticipantsFilter = eventParticipantService.createActiveEventParticipantsFilter(cb, eventPersonsRoot);
Predicate eventParticipantUserFilter = eventParticipantService.createUserFilter(cb, eventPersonsQuery, eventPersonsRoot, user);
eventPersonsQuery.where(and(cb, eventParticipantPersonsFilter, activeEventParticipantsFilter, eventParticipantUserFilter));
>>>>>>>
Predicate eventParticipantPersonsFilter = buildSimilarityCriteriaFilter(criteria, cb, eventPersonsRoot.join(EventParticipant.PERSON, JoinType.LEFT));
Predicate activeEventParticipantsFilter = eventParticipantService.createActiveEventParticipantsFilter(cb, eventPersonsRoot);
Predicate eventParticipantUserFilter = eventParticipantService.createUserFilter(cb, eventPersonsQuery, eventPersonsRoot, user);
eventPersonsQuery.where(and(cb, eventParticipantPersonsFilter, activeEventParticipantsFilter, eventParticipantUserFilter));
Predicate eventPersonsFilter = eventParticipantService.createUserFilter(cb, eventPersonsQuery, eventPersonsRoot
);
if (eventPersonsFilter != null) {
eventPersonsQuery.where(eventPersonsFilter);
} |
<<<<<<<
@Order(21)
@ExportProperty(ContactDto.CONTACT_IDENTIFICATION_SOURCE_DETAILS)
=======
@Order(22)
@ExportProperty(ContactDto.CONTACT_IDENTIFICATION_SOURCE)
>>>>>>>
@Order(22)
@ExportProperty(ContactDto.CONTACT_IDENTIFICATION_SOURCE_DETAILS)
<<<<<<<
public void setContactWithSourceCaseKnown(YesNoUnknown contactWithSourceCaseKnown) {
this.contactWithSourceCaseKnown = contactWithSourceCaseKnown;
}
@Order(70)
=======
@Order(83)
>>>>>>>
@Order(83) |
<<<<<<<
String headingNewAccount = "headingNewAccount";
=======
String headingNetworkDiagramTooManyContacts = "headingNetworkDiagramTooManyContacts";
>>>>>>>
String headingNetworkDiagramTooManyContacts = "headingNetworkDiagramTooManyContacts";
String headingNewAccount = "headingNewAccount"; |
<<<<<<<
import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers;
=======
import de.symeda.sormas.api.person.PersonAddressType;
import de.symeda.sormas.api.utils.ValidationException;
>>>>>>>
import de.symeda.sormas.api.person.PersonAddressType;
import de.symeda.sormas.api.utils.ValidationException;
import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers;
<<<<<<<
=======
import de.symeda.sormas.app.epidata.EpiDataBurialDialog;
import de.symeda.sormas.app.util.AppFieldAccessCheckers;
>>>>>>>
import de.symeda.sormas.app.epidata.EpiDataBurialDialog;
import de.symeda.sormas.app.util.AppFieldAccessCheckers; |
<<<<<<<
public static final String CONVULSION = "convulsion";
=======
public static final String HYDROPHOBIA = "hydrophobia";
public static final String OPISTHOTONUS = "opisthotonus";
public static final String ANXIETY_STATES = "anxietyStates";
public static final String DELIRIUM = "delirium";
public static final String UPROARIOUSNESS = "uproariousness";
public static final String PARASTHESIA_AROUND_WOUND = "paresthesiaAroundWound";
public static final String EXCESS_SALIVATION = "excessSalivation";
public static final String INSOMNIA = "insomnia";
public static final String PARALYSIS = "paralysis";
public static final String EXCITATION = "excitation";
public static final String DYSPHAGIA = "dysphagia";
public static final String AEROPHOBIA = "aerophobia";
public static final String HYPERACTIVITY = "hyperactivity";
public static final String PARESIS = "paresis";
public static final String AGITATION = "agitation";
public static final String ASCENDING_FLACCID_PARALYSIS = "ascendingFlaccidParalysis";
public static final String ERRATIC_BEHAVIOUR = "erraticBehaviour";
public static final String COMA = "coma";
>>>>>>>
public static final String HYDROPHOBIA = "hydrophobia";
public static final String OPISTHOTONUS = "opisthotonus";
public static final String ANXIETY_STATES = "anxietyStates";
public static final String DELIRIUM = "delirium";
public static final String UPROARIOUSNESS = "uproariousness";
public static final String PARASTHESIA_AROUND_WOUND = "paresthesiaAroundWound";
public static final String EXCESS_SALIVATION = "excessSalivation";
public static final String INSOMNIA = "insomnia";
public static final String PARALYSIS = "paralysis";
public static final String EXCITATION = "excitation";
public static final String DYSPHAGIA = "dysphagia";
public static final String AEROPHOBIA = "aerophobia";
public static final String HYPERACTIVITY = "hyperactivity";
public static final String PARESIS = "paresis";
public static final String AGITATION = "agitation";
public static final String ASCENDING_FLACCID_PARALYSIS = "ascendingFlaccidParalysis";
public static final String ERRATIC_BEHAVIOUR = "erraticBehaviour";
public static final String COMA = "coma";
public static final String CONVULSION = "convulsion";
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.MEASLES,Disease.PLAGUE,Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.MEASLES,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.MEASLES,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.NEW_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.UNSPECIFIED_VHF,Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.ANTHRAX})
private SymptomState convulsion;
=======
@Diseases({Disease.RABIES})
private SymptomState hydrophobia;
@Diseases({Disease.RABIES})
private SymptomState opisthotonus;
@Diseases({Disease.RABIES})
private SymptomState anxietyStates;
@Diseases({Disease.RABIES})
private SymptomState delirium;
@Diseases({Disease.RABIES})
private SymptomState uproariousness;
@Diseases({Disease.RABIES})
private SymptomState paresthesiaAroundWound;
@Diseases({Disease.RABIES})
private SymptomState excessSalivation;
@Diseases({Disease.RABIES})
private SymptomState insomnia;
@Diseases({Disease.RABIES})
private SymptomState paralysis;
@Diseases({Disease.RABIES})
private SymptomState excitation;
@Diseases({Disease.RABIES})
private SymptomState dysphagia;
@Diseases({Disease.RABIES})
private SymptomState aerophobia;
@Diseases({Disease.RABIES})
private SymptomState hyperactivity;
@Diseases({Disease.RABIES})
private SymptomState paresis;
@Diseases({Disease.RABIES})
private SymptomState agitation;
@Diseases({Disease.RABIES})
private SymptomState ascendingFlaccidParalysis;
@Diseases({Disease.RABIES})
private SymptomState erraticBehaviour;
@Diseases({Disease.RABIES})
private SymptomState coma;
>>>>>>>
@Diseases({Disease.RABIES})
private SymptomState hydrophobia;
@Diseases({Disease.RABIES})
private SymptomState opisthotonus;
@Diseases({Disease.RABIES})
private SymptomState anxietyStates;
@Diseases({Disease.RABIES})
private SymptomState delirium;
@Diseases({Disease.RABIES})
private SymptomState uproariousness;
@Diseases({Disease.RABIES})
private SymptomState paresthesiaAroundWound;
@Diseases({Disease.RABIES})
private SymptomState excessSalivation;
@Diseases({Disease.RABIES})
private SymptomState insomnia;
@Diseases({Disease.RABIES})
private SymptomState paralysis;
@Diseases({Disease.RABIES})
private SymptomState excitation;
@Diseases({Disease.RABIES})
private SymptomState dysphagia;
@Diseases({Disease.RABIES})
private SymptomState aerophobia;
@Diseases({Disease.RABIES})
private SymptomState hyperactivity;
@Diseases({Disease.RABIES})
private SymptomState paresis;
@Diseases({Disease.RABIES})
private SymptomState agitation;
@Diseases({Disease.RABIES})
private SymptomState ascendingFlaccidParalysis;
@Diseases({Disease.RABIES})
private SymptomState erraticBehaviour;
@Diseases({Disease.RABIES})
private SymptomState coma;
@Diseases({Disease.ANTHRAX})
private SymptomState convulsion; |
<<<<<<<
import com.vaadin.server.Sizeable;
=======
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
>>>>>>>
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.vaadin.server.Sizeable;
<<<<<<<
=======
protected boolean areFieldsValid(String... propertyIds){
return Stream.of(propertyIds).allMatch(p -> getField(p).isValid());
}
protected String getPropertyI18nPrefix() {
return propertyI18nPrefix;
}
>>>>>>>
protected boolean areFieldsValid(String... propertyIds){
return Stream.of(propertyIds).allMatch(p -> getField(p).isValid());
}
protected String getPropertyI18nPrefix() {
return propertyI18nPrefix;
} |
<<<<<<<
MANUAL_EXTERNAL_MESSAGES(true, true, null),
OTHER_NOTIFICATIONS(true, true, null);
=======
OTHER_NOTIFICATIONS(true, true, null),
DOCUMENTS(true, false, null);
>>>>>>>
MANUAL_EXTERNAL_MESSAGES(true, true, null),
OTHER_NOTIFICATIONS(true, true, null),
DOCUMENTS(true, false, null); |
<<<<<<<
@EJB
private RegionService regionService;
@EJB
private DistrictService districtService;
@EJB
private EventJurisdictionChecker eventJurisdictionChecker;
=======
@EJB
private ContactService contactService;
>>>>>>>
@EJB
private ContactService contactService;
@EJB
private RegionService regionService;
@EJB
private DistrictService districtService;
@EJB
private EventJurisdictionChecker eventJurisdictionChecker; |
<<<<<<<
protected UserDto useNationalUserLogin() {
UserDto natUser =
creator.createUser("", "", "", "Nat", "Usr", UserRole.NATIONAL_USER);
when(MockProducer.getPrincipal().getName()).thenReturn("NatUsr");
return natUser;
}
public PathogenTestService getPathogenTestService() {
return getBean(PathogenTestService.class);
}
=======
public CampaignDiagramDefinitionFacade getCampaignDiagramDefinitionFacade() {return getBean(CampaignDiagramDefinitionFacadeEjb.CampaignDiagramDefinitionFacadeEjbLocal.class);}
>>>>>>>
public CampaignDiagramDefinitionFacade getCampaignDiagramDefinitionFacade() {return getBean(CampaignDiagramDefinitionFacadeEjb.CampaignDiagramDefinitionFacadeEjbLocal.class);}
protected UserDto useNationalUserLogin() {
UserDto natUser =
creator.createUser("", "", "", "Nat", "Usr", UserRole.NATIONAL_USER);
when(MockProducer.getPrincipal().getName()).thenReturn("NatUsr");
return natUser;
}
public PathogenTestService getPathogenTestService() {
return getBean(PathogenTestService.class);
} |
<<<<<<<
import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers;
=======
>>>>>>>
import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers;
<<<<<<<
=======
import de.symeda.sormas.app.backend.contact.ContactEditAuthorization;
>>>>>>>
import de.symeda.sormas.app.backend.contact.ContactEditAuthorization;
<<<<<<<
=======
import de.symeda.sormas.app.core.FieldHelper;
>>>>>>>
import de.symeda.sormas.app.core.FieldHelper; |
<<<<<<<
@OneToOne(cascade = CascadeType.ALL)
@AuditedIgnore
public SormasToSormasSource getSormasToSormasSource() {
return sormasToSormasSource;
}
public void setSormasToSormasSource(SormasToSormasSource sormasSource) {
this.sormasToSormasSource = sormasSource;
}
@OneToMany(mappedBy = SormasToSormasShareInfo.CAZE, fetch = FetchType.LAZY)
public List<SormasToSormasShareInfo> getSormasToSormasShares() {
return sormasToSormasShares;
}
public void setSormasToSormasShares(List<SormasToSormasShareInfo> sormasToSormasShares) {
this.sormasToSormasShares = sormasToSormasShares;
}
=======
@Enumerated(EnumType.STRING)
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType facilityType) {
this.facilityType = facilityType;
}
>>>>>>>
@Enumerated(EnumType.STRING)
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType facilityType) {
this.facilityType = facilityType;
}
@OneToOne(cascade = CascadeType.ALL)
@AuditedIgnore
public SormasToSormasSource getSormasToSormasSource() {
return sormasToSormasSource;
}
public void setSormasToSormasSource(SormasToSormasSource sormasSource) {
this.sormasToSormasSource = sormasSource;
}
@OneToMany(mappedBy = SormasToSormasShareInfo.CAZE, fetch = FetchType.LAZY)
public List<SormasToSormasShareInfo> getSormasToSormasShares() {
return sormasToSormasShares;
}
public void setSormasToSormasShares(List<SormasToSormasShareInfo> sormasToSormasShares) {
this.sormasToSormasShares = sormasToSormasShares;
} |
<<<<<<<
target.setPseudonymized(source.isPseudonymized());
=======
target.setFacilityType(source.getFacilityType());
>>>>>>>
target.setPseudonymized(source.isPseudonymized());
target.setFacilityType(source.getFacilityType());
<<<<<<<
target.setPseudonymized(source.isPseudonymized());
=======
target.setFacilityType(source.getFacilityType());
>>>>>>>
target.setPseudonymized(source.isPseudonymized());
target.setFacilityType(source.getFacilityType()); |
<<<<<<<
Button referredButton = new Button(I18nProperties.getCaption(Captions.sampleReferredFrom) + " " + referredFrom.getLab().toString());
referredButton.setId("referredFrom");
=======
FacilityReferenceDto referredFromLab = referredFrom.getLab();
String referredButtonCaption = referredFromLab == null
? I18nProperties.getCaption(Captions.sampleReferredFromInternal) + " (" +DateHelper.formatLocalDateTime(referredFrom.getSampleDateTime()) + ")"
: I18nProperties.getCaption(Captions.sampleReferredFrom) + " " + referredFromLab.toString();
Button referredButton = new Button(referredButtonCaption);
>>>>>>>
FacilityReferenceDto referredFromLab = referredFrom.getLab();
String referredButtonCaption = referredFromLab == null
? I18nProperties.getCaption(Captions.sampleReferredFromInternal) + " (" +DateHelper.formatLocalDateTime(referredFrom.getSampleDateTime()) + ")"
: I18nProperties.getCaption(Captions.sampleReferredFrom) + " " + referredFromLab.toString();
Button referredButton = new Button(referredButtonCaption);
referredButton.setId("referredFrom"); |
<<<<<<<
import com.vaadin.server.ThemeResource;
import com.vaadin.ui.Image;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import de.symeda.sormas.api.externaljournal.RegisterResult;
import de.symeda.sormas.api.person.SymptomJournalStatus;
import de.symeda.sormas.ui.utils.CssStyles;
=======
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import de.symeda.sormas.api.contact.ContactCriteria;
import de.symeda.sormas.ui.ViewModelProviders;
import de.symeda.sormas.ui.caze.CasesView;
import de.symeda.sormas.ui.utils.AbstractView;
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
>>>>>>>
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import de.symeda.sormas.api.contact.ContactCriteria;
import de.symeda.sormas.ui.ViewModelProviders;
import de.symeda.sormas.ui.caze.CasesView;
import de.symeda.sormas.ui.utils.AbstractView;
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import com.vaadin.server.ThemeResource;
import com.vaadin.ui.Image;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import de.symeda.sormas.api.externaljournal.RegisterResult;
import de.symeda.sormas.api.person.SymptomJournalStatus;
import de.symeda.sormas.ui.utils.CssStyles; |
<<<<<<<
target.setConvulsion(source.getConvulsion());
=======
target.setHydrophobia(source.getHydrophobia());
target.setOpisthotonus(source.getOpisthotonus());
target.setAnxietyStates(source.getAnxietyStates());
target.setDelirium(source.getDelirium());
target.setUproariousness(source.getUproariousness());
target.setParesthesiaAroundWound(source.getParesthesiaAroundWound());
target.setExcessSalivation(source.getExcessSalivation());
target.setInsomnia(source.getInsomnia());
target.setParalysis(source.getParalysis());
target.setExcitation(source.getExcitation());
target.setDysphagia(source.getDysphagia());
target.setAerophobia(source.getAerophobia());
target.setHyperactivity(source.getHyperactivity());
target.setParesis(source.getParesis());
target.setAgitation(source.getAgitation());
target.setAscendingFlaccidParalysis(source.getAscendingFlaccidParalysis());
target.setErraticBehaviour(source.getErraticBehaviour());
target.setComa(source.getComa());
>>>>>>>
target.setHydrophobia(source.getHydrophobia());
target.setOpisthotonus(source.getOpisthotonus());
target.setAnxietyStates(source.getAnxietyStates());
target.setDelirium(source.getDelirium());
target.setUproariousness(source.getUproariousness());
target.setParesthesiaAroundWound(source.getParesthesiaAroundWound());
target.setExcessSalivation(source.getExcessSalivation());
target.setInsomnia(source.getInsomnia());
target.setParalysis(source.getParalysis());
target.setExcitation(source.getExcitation());
target.setDysphagia(source.getDysphagia());
target.setAerophobia(source.getAerophobia());
target.setHyperactivity(source.getHyperactivity());
target.setParesis(source.getParesis());
target.setAgitation(source.getAgitation());
target.setAscendingFlaccidParalysis(source.getAscendingFlaccidParalysis());
target.setErraticBehaviour(source.getErraticBehaviour());
target.setComa(source.getComa());
target.setConvulsion(source.getConvulsion());
<<<<<<<
target.setConvulsion(source.getConvulsion());
=======
target.setHydrophobia(source.getHydrophobia());
target.setOpisthotonus(source.getOpisthotonus());
target.setAnxietyStates(source.getAnxietyStates());
target.setDelirium(source.getDelirium());
target.setUproariousness(source.getUproariousness());
target.setParesthesiaAroundWound(source.getParesthesiaAroundWound());
target.setExcessSalivation(source.getExcessSalivation());
target.setInsomnia(source.getInsomnia());
target.setParalysis(source.getParalysis());
target.setExcitation(source.getExcitation());
target.setDysphagia(source.getDysphagia());
target.setAerophobia(source.getAerophobia());
target.setHyperactivity(source.getHyperactivity());
target.setParesis(source.getParesis());
target.setAgitation(source.getAgitation());
target.setAscendingFlaccidParalysis(source.getAscendingFlaccidParalysis());
target.setErraticBehaviour(source.getErraticBehaviour());
target.setComa(source.getComa());
>>>>>>>
target.setHydrophobia(source.getHydrophobia());
target.setOpisthotonus(source.getOpisthotonus());
target.setAnxietyStates(source.getAnxietyStates());
target.setDelirium(source.getDelirium());
target.setUproariousness(source.getUproariousness());
target.setParesthesiaAroundWound(source.getParesthesiaAroundWound());
target.setExcessSalivation(source.getExcessSalivation());
target.setInsomnia(source.getInsomnia());
target.setParalysis(source.getParalysis());
target.setExcitation(source.getExcitation());
target.setDysphagia(source.getDysphagia());
target.setAerophobia(source.getAerophobia());
target.setHyperactivity(source.getHyperactivity());
target.setParesis(source.getParesis());
target.setAgitation(source.getAgitation());
target.setAscendingFlaccidParalysis(source.getAscendingFlaccidParalysis());
target.setErraticBehaviour(source.getErraticBehaviour());
target.setComa(source.getComa());
target.setConvulsion(source.getConvulsion()); |
<<<<<<<
import com.fasterxml.jackson.annotation.JsonIgnore;
=======
import org.apache.commons.lang3.StringUtils;
>>>>>>>
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
<<<<<<<
@JsonIgnore
public boolean isEmptyLocation() {
=======
public boolean checkIsEmptyLocation() {
>>>>>>>
public boolean checkIsEmptyLocation() { |
<<<<<<<
private VisitEditForm(Disease disease, ContactDto contact, CaseDataDto caze, PersonDto person, boolean create) {
super(VisitDto.class, VisitDto.I18N_PREFIX);
=======
public VisitEditForm(Disease disease, ContactDto contact, PersonDto person, boolean create, boolean isInJurisdiction) {
super(
VisitDto.class,
VisitDto.I18N_PREFIX,
false,
null,
UiFieldAccessCheckers.withCheckers(create || isInJurisdiction, FieldHelper.createSensitiveDataFieldAccessChecker()));
>>>>>>>
public VisitEditForm(Disease disease, ContactDto contact, CaseDataDto caze, PersonDto person, boolean create, boolean isInJurisdiction) {
super(
VisitDto.class,
VisitDto.I18N_PREFIX,
false,
null,
UiFieldAccessCheckers.withCheckers(create || isInJurisdiction, FieldHelper.createSensitiveDataFieldAccessChecker())); |
<<<<<<<
if (userArea == null && userRegion == null) {
updateFiltersBasedOnArea(areaFilter.getValue());
areaFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_area));
areaFilter.setWidth(200, Unit.PIXELS);
areaFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllAreas));
areaFilter.addItems(FacadeProvider.getAreaFacade().getAllActiveAsReference());
areaFilter.addValueChangeListener(e -> {
final Object value = areaFilter.getValue();
updateFiltersBasedOnArea(value);
dashboardDataProvider.setArea((AreaReferenceDto) value);
dashboardView.refreshDashboard();
});
addComponent(areaFilter);
dashboardDataProvider.setArea((AreaReferenceDto) areaFilter.getValue());
}
=======
areaFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_area));
areaFilter.setWidth(200, Unit.PIXELS);
areaFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllAreas));
areaFilter.addItems(FacadeProvider.getAreaFacade().getAllActiveAsReference());
areaFilter.addValueChangeListener(e -> {
final Object value = areaFilter.getValue();
dashboardDataProvider.setArea((AreaReferenceDto) value);
dashboardView.refreshDashboard();
updateFiltersBasedOnArea(value);
});
addComponent(areaFilter);
dashboardDataProvider.setArea((AreaReferenceDto) areaFilter.getValue());
>>>>>>>
areaFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_area));
areaFilter.setWidth(200, Unit.PIXELS);
areaFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllAreas));
areaFilter.addItems(FacadeProvider.getAreaFacade().getAllActiveAsReference());
areaFilter.addValueChangeListener(e -> {
final Object value = areaFilter.getValue();
dashboardDataProvider.setArea((AreaReferenceDto) value);
dashboardView.refreshDashboard();
updateFiltersBasedOnArea(value);
});
addComponent(areaFilter);
dashboardDataProvider.setArea((AreaReferenceDto) areaFilter.getValue());
<<<<<<<
if (userRegion == null) {
updateFiltersBasedOnRegion(regionFilter.getValue());
regionFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_region));
regionFilter.setWidth(200, Unit.PIXELS);
regionFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllRegions));
regionFilter.addValueChangeListener(e -> {
final Object value = regionFilter.getValue();
updateFiltersBasedOnRegion(value);
dashboardDataProvider.setRegion((RegionReferenceDto) value);
dashboardView.refreshDashboard();
});
addComponent(regionFilter);
dashboardDataProvider.setRegion((RegionReferenceDto) regionFilter.getValue());
}
=======
regionFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_region));
regionFilter.setWidth(200, Unit.PIXELS);
regionFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllRegions));
regionFilter.addValueChangeListener(e -> {
final Object value = regionFilter.getValue();
dashboardDataProvider.setRegion((RegionReferenceDto) value);
dashboardView.refreshDashboard();
updateFiltersBasedOnRegion(value);
});
addComponent(regionFilter);
dashboardDataProvider.setRegion((RegionReferenceDto) regionFilter.getValue());
>>>>>>>
regionFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_region));
regionFilter.setWidth(200, Unit.PIXELS);
regionFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllRegions));
regionFilter.addValueChangeListener(e -> {
final Object value = regionFilter.getValue();
dashboardDataProvider.setRegion((RegionReferenceDto) value);
dashboardView.refreshDashboard();
updateFiltersBasedOnRegion(value);
});
addComponent(regionFilter);
dashboardDataProvider.setRegion((RegionReferenceDto) regionFilter.getValue());
<<<<<<<
if (userRegion != null || userDistrict == null) {
districtFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_district));
districtFilter.setWidth(200, Unit.PIXELS);
districtFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllDistricts));
if (userRegion != null) {
districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(userRegion.getUuid()));
}
districtFilter.addValueChangeListener(e -> {
final Object value = districtFilter.getValue();
updateFiltersBasedOnDistrict(value);
dashboardDataProvider.setDistrict((DistrictReferenceDto) value);
dashboardView.refreshDashboard();
});
addComponent(districtFilter);
=======
districtFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_district));
districtFilter.setWidth(200, Unit.PIXELS);
districtFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllDistricts));
if (userRegion != null) {
districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(userRegion.getUuid()));
}
districtFilter.addValueChangeListener(e -> {
>>>>>>>
districtFilter.setCaption(I18nProperties.getCaption(Captions.Campaign_district));
districtFilter.setWidth(200, Unit.PIXELS);
districtFilter.setInputPrompt(I18nProperties.getString(Strings.promptAllDistricts));
if (userRegion != null) {
districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(userRegion.getUuid()));
}
districtFilter.addValueChangeListener(e -> {
final Object value = districtFilter.getValue();
updateFiltersBasedOnDistrict(value);
<<<<<<<
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION, DISTRICT);
campaignJurisdictionGroupByFilter.setValue(REGION);
=======
districtFilter.removeAllItems();
>>>>>>>
districtFilter.removeAllItems();
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION, DISTRICT);
campaignJurisdictionGroupByFilter.setValue(REGION);
<<<<<<<
regionFilter.setEnabled(true);
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION, DISTRICT);
campaignJurisdictionGroupByFilter.setValue(REGION);
=======
>>>>>>>
regionFilter.setEnabled(true);
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION, DISTRICT);
campaignJurisdictionGroupByFilter.setValue(REGION);
<<<<<<<
campaignJurisdictionGroupByFilter.removeItem(DISTRICT);
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION);
campaignJurisdictionGroupByFilter.setValue(AREA);
}
}
private void updateFiltersBasedOnDistrict(Object value) {
if (value != null) {
campaignJurisdictionGroupByFilter.removeItem(AREA);
campaignJurisdictionGroupByFilter.removeItem(REGION);
campaignJurisdictionGroupByFilter.addItems(DISTRICT, COMMUNITY);
campaignJurisdictionGroupByFilter.setValue(COMMUNITY);
} else {
campaignJurisdictionGroupByFilter.removeItem(AREA);
campaignJurisdictionGroupByFilter.addItems(REGION, DISTRICT, COMMUNITY);
campaignJurisdictionGroupByFilter.setValue(DISTRICT);
=======
districtFilter.removeAllItems();
>>>>>>>
districtFilter.removeAllItems();
campaignJurisdictionGroupByFilter.removeItem(DISTRICT);
campaignJurisdictionGroupByFilter.removeItem(COMMUNITY);
campaignJurisdictionGroupByFilter.addItems(AREA, REGION);
campaignJurisdictionGroupByFilter.setValue(AREA);
}
}
private void updateFiltersBasedOnDistrict(Object value) {
if (value != null) {
campaignJurisdictionGroupByFilter.removeItem(AREA);
campaignJurisdictionGroupByFilter.removeItem(REGION);
campaignJurisdictionGroupByFilter.addItems(DISTRICT, COMMUNITY);
campaignJurisdictionGroupByFilter.setValue(COMMUNITY);
} else {
campaignJurisdictionGroupByFilter.removeItem(AREA);
campaignJurisdictionGroupByFilter.addItems(REGION, DISTRICT, COMMUNITY);
campaignJurisdictionGroupByFilter.setValue(DISTRICT); |
<<<<<<<
public CommitDiscardWrapperComponent<? extends Component> getCaseCombinedEditComponent(final String caseUuid,
final ViewMode viewMode, boolean isInJurisdiction) {
CaseDataDto caze = findCase(caseUuid);
PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid());
CaseDataForm caseEditForm = new CaseDataForm(person, caze.getDisease(), UserRight.CASE_EDIT, viewMode, isInJurisdiction);
caseEditForm.setValue(caze);
HospitalizationForm hospitalizationForm = new HospitalizationForm(caze, UserRight.CASE_EDIT, viewMode);
hospitalizationForm.setValue(caze.getHospitalization());
SymptomsForm symptomsForm = new SymptomsForm(caze, caze.getDisease(), person, SymptomsContext.CASE,
UserRight.CASE_EDIT, viewMode);
symptomsForm.setValue(caze.getSymptoms());
EpiDataForm epiDataForm = new EpiDataForm(caze.getDisease(), UserRight.CASE_EDIT, viewMode);
epiDataForm.setValue(caze.getEpiData());
CommitDiscardWrapperComponent<? extends Component> editView = AbstractEditForm
.buildCommitDiscardWrapper(caseEditForm, hospitalizationForm, symptomsForm, epiDataForm);
editView.addCommitListener(new CommitListener() {
@Override
public void onCommit() {
CaseDataDto cazeDto = caseEditForm.getValue();
cazeDto.setHospitalization(hospitalizationForm.getValue());
cazeDto.setSymptoms(symptomsForm.getValue());
cazeDto.setEpiData(epiDataForm.getValue());
saveCase(cazeDto);
}
});
appendSpecialCommands(caze, editView);
return editView;
}
=======
// public CommitDiscardWrapperComponent<? extends Component> getCaseCombinedEditComponent(final String caseUuid,
// final ViewMode viewMode) {
//
// CaseDataDto caze = findCase(caseUuid);
// PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid());
//
// CaseDataForm caseEditForm = new CaseDataForm(person, caze.getDisease(), viewMode);
// caseEditForm.setValue(caze);
//
// HospitalizationForm hospitalizationForm = new HospitalizationForm(caze, viewMode);
// hospitalizationForm.setValue(caze.getHospitalization());
//
// SymptomsForm symptomsForm = new SymptomsForm(caze, caze.getDisease(), person, SymptomsContext.CASE, viewMode);
// symptomsForm.setValue(caze.getSymptoms());
//
// EpiDataForm epiDataForm = new EpiDataForm(caze.getDisease(), viewMode);
// epiDataForm.setValue(caze.getEpiData());
//
// CommitDiscardWrapperComponent<? extends Component> editView = AbstractEditForm
// .buildCommitDiscardWrapper(caseEditForm, hospitalizationForm, symptomsForm, epiDataForm);
//
// editView.addCommitListener(new CommitListener() {
// @Override
// public void onCommit() {
// CaseDataDto cazeDto = caseEditForm.getValue();
// cazeDto.setHospitalization(hospitalizationForm.getValue());
// cazeDto.setSymptoms(symptomsForm.getValue());
// cazeDto.setEpiData(epiDataForm.getValue());
//
// saveCase(cazeDto);
// }
// });
//
// appendSpecialCommands(caze, editView);
//
// return editView;
// }
>>>>>>>
// public CommitDiscardWrapperComponent<? extends Component> getCaseCombinedEditComponent(final String caseUuid,
// final ViewMode viewMode) {
//
// CaseDataDto caze = findCase(caseUuid);
// PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid());
//
// CaseDataForm caseEditForm = new CaseDataForm(person, caze.getDisease(), viewMode);
// caseEditForm.setValue(caze);
//
// HospitalizationForm hospitalizationForm = new HospitalizationForm(caze, viewMode);
// hospitalizationForm.setValue(caze.getHospitalization());
//
// SymptomsForm symptomsForm = new SymptomsForm(caze, caze.getDisease(), person, SymptomsContext.CASE, viewMode);
// symptomsForm.setValue(caze.getSymptoms());
//
// EpiDataForm epiDataForm = new EpiDataForm(caze.getDisease(), viewMode);
// epiDataForm.setValue(caze.getEpiData());
//
// CommitDiscardWrapperComponent<? extends Component> editView = AbstractEditForm
// .buildCommitDiscardWrapper(caseEditForm, hospitalizationForm, symptomsForm, epiDataForm);
//
// editView.addCommitListener(new CommitListener() {
// @Override
// public void onCommit() {
// CaseDataDto cazeDto = caseEditForm.getValue();
// cazeDto.setHospitalization(hospitalizationForm.getValue());
// cazeDto.setSymptoms(symptomsForm.getValue());
// cazeDto.setEpiData(epiDataForm.getValue());
//
// saveCase(cazeDto);
// }
// });
//
// appendSpecialCommands(caze, editView);
//
// return editView;
// }
<<<<<<<
FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid()), caze.getDisease(),
UserRight.CASE_EDIT, viewMode, isInJurisdiction);
=======
FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid()), caze.getDisease(), viewMode);
>>>>>>>
FacadeProvider.getPersonFacade().getPersonByUuid(caze.getPerson().getUuid()), caze.getDisease(), viewMode, isInJurisdiction); |
<<<<<<<
import de.symeda.sormas.api.event.TypeOfPlace;
=======
import de.symeda.sormas.api.event.EventStatus;
>>>>>>>
import de.symeda.sormas.api.event.EventStatus;
import de.symeda.sormas.api.event.TypeOfPlace; |
<<<<<<<
import de.symeda.sormas.app.core.FieldHelper;
=======
import de.symeda.sormas.app.component.controls.ControlPropertyField;
import de.symeda.sormas.app.component.controls.ValueChangeListener;
import de.symeda.sormas.app.component.dialog.ConfirmationDialog;
>>>>>>>
import de.symeda.sormas.app.component.controls.ControlPropertyField;
import de.symeda.sormas.app.component.controls.ValueChangeListener;
import de.symeda.sormas.app.component.dialog.ConfirmationDialog;
import de.symeda.sormas.app.core.FieldHelper; |
<<<<<<<
import java.util.Collection;
import java.util.function.Consumer;
=======
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
>>>>>>>
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
<<<<<<<
=======
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Consumer;
>>>>>>>
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Consumer; |
<<<<<<<
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
=======
// Load latest events info
// Adding a second query here is not perfect, but selecting the last event with a criteria query
// doesn't seem to be possible and using a native query is not an option because of user filters
List<EventSummaryDetails> eventSummaries =
eventService.getEventSummaryDetailsByCases(cases.stream().map(CaseIndexDetailedDto::getId).collect(Collectors.toList()));
for (CaseIndexDetailedDto caze : cases) {
if (caze.getEventCount() == 0) {
continue;
}
eventSummaries.stream()
.filter(v -> v.getCaseId() == caze.getId())
.sorted(Comparator.comparing(EventSummaryDetails::getEventDate).reversed())
.findFirst()
.ifPresent(eventSummary -> {
caze.setLatestEventId(eventSummary.getEventUuid());
caze.setLatestEventStatus(eventSummary.getEventStatus());
caze.setLatestEventTitle(eventSummary.getEventTitle());
});
}
Pseudonymizer pseudonymizer = new Pseudonymizer(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
>>>>>>>
// Load latest events info
// Adding a second query here is not perfect, but selecting the last event with a criteria query
// doesn't seem to be possible and using a native query is not an option because of user filters
List<EventSummaryDetails> eventSummaries =
eventService.getEventSummaryDetailsByCases(cases.stream().map(CaseIndexDetailedDto::getId).collect(Collectors.toList()));
for (CaseIndexDetailedDto caze : cases) {
if (caze.getEventCount() == 0) {
continue;
}
eventSummaries.stream()
.filter(v -> v.getCaseId() == caze.getId())
.sorted(Comparator.comparing(EventSummaryDetails::getEventDate).reversed())
.findFirst()
.ifPresent(eventSummary -> {
caze.setLatestEventId(eventSummary.getEventUuid());
caze.setLatestEventStatus(eventSummary.getEventStatus());
caze.setLatestEventTitle(eventSummary.getEventTitle());
});
}
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
<<<<<<<
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
=======
// Load latest events info
// Adding a second query here is not perfect, but selecting the last event with a criteria query
// doesn't seem to be possible and using a native query is not an option because of user filters
List<EventSummaryDetails> eventSummaries = null;
if (exportConfiguration == null
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_ID)
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_STATUS)
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_TITLE)) {
eventSummaries = eventService.getEventSummaryDetailsByCases(resultCaseIds);
}
Pseudonymizer pseudonymizer = new Pseudonymizer(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
>>>>>>>
// Load latest events info
// Adding a second query here is not perfect, but selecting the last event with a criteria query
// doesn't seem to be possible and using a native query is not an option because of user filters
List<EventSummaryDetails> eventSummaries = null;
if (exportConfiguration == null
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_ID)
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_STATUS)
|| exportConfiguration.getProperties().contains(CaseExportDto.LATEST_EVENT_TITLE)) {
eventSummaries = eventService.getEventSummaryDetailsByCases(resultCaseIds);
}
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
<<<<<<<
target.setSormasToSormasOriginInfo(SormasToSormasFacadeEjb.toSormasToSormasOriginInfoDto(source.getSormasToSormasOriginInfo()));
target.setOwnershipHandedOver(source.getSormasToSormasShares().stream().anyMatch(SormasToSormasShareInfo::isOwnershipHandedOver));
=======
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
>>>>>>>
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
target.setSormasToSormasOriginInfo(SormasToSormasFacadeEjb.toSormasToSormasOriginInfoDto(source.getSormasToSormasOriginInfo()));
target.setOwnershipHandedOver(source.getSormasToSormasShares().stream().anyMatch(SormasToSormasShareInfo::isOwnershipHandedOver)); |
<<<<<<<
import de.symeda.sormas.api.utils.DataHelper;
=======
import de.symeda.sormas.ui.ControllerProvider;
>>>>>>>
import de.symeda.sormas.ui.ControllerProvider;
import de.symeda.sormas.api.utils.DataHelper; |
<<<<<<<
private static final String SORMAS_TO_SORMAS_USER_PASSWORD = "sormasToSormasUserPassword";
=======
private static final String SORMAS2SORMAS_FILES_PATH = "sormas2sormas.path";
private static final String SORMAS2SORMAS_KEY_ALIAS = "sormas2sormas.keyAlias";
private static final String SORMAS2SORMAS_KEYSTORE_NAME = "sormas2sormas.keystoreName";
private static final String SORMAS2SORMAS_KEYSTORE_PASSWORD = "sormas2sormas.keystorePass";
private static final String SORMAS2SORMAS_TRUSTSTORE_NAME = "sormas2sormas.truststoreName";
private static final String SORMAS2SORMAS_TRUSTSTORE_PASS = "sormas2sormas.truststorePass";
>>>>>>>
private static final String SORMAS2SORMAS_FILES_PATH = "sormas2sormas.path";
private static final String SORMAS2SORMAS_KEY_ALIAS = "sormas2sormas.keyAlias";
private static final String SORMAS2SORMAS_KEYSTORE_NAME = "sormas2sormas.keystoreName";
private static final String SORMAS2SORMAS_KEYSTORE_PASSWORD = "sormas2sormas.keystorePass";
private static final String SORMAS2SORMAS_TRUSTSTORE_NAME = "sormas2sormas.truststoreName";
private static final String SORMAS2SORMAS_TRUSTSTORE_PASS = "sormas2sormas.truststorePass";
private static final String SORMAS_TO_SORMAS_USER_PASSWORD = "sormasToSormasUserPassword";
<<<<<<<
public String getSormasToSormasUserPassword() {
return getProperty(SORMAS_TO_SORMAS_USER_PASSWORD, null);
}
@Override
=======
public Sormas2SormasConfig getSormas2SormasConfig() {
Sormas2SormasConfig config = new Sormas2SormasConfig();
config.setFilePath(getProperty(SORMAS2SORMAS_FILES_PATH, null));
config.setKeyAlias(getProperty(SORMAS2SORMAS_KEY_ALIAS, null));
config.setKeystoreName(getProperty(SORMAS2SORMAS_KEYSTORE_NAME, null));
config.setKeystorePass(getProperty(SORMAS2SORMAS_KEYSTORE_PASSWORD, null));
config.setTruststoreName(getProperty(SORMAS2SORMAS_TRUSTSTORE_NAME, null));
config.setTruststorePass(getProperty(SORMAS2SORMAS_TRUSTSTORE_PASS, null));
return config;
}
@Override
>>>>>>>
public Sormas2SormasConfig getSormas2SormasConfig() {
Sormas2SormasConfig config = new Sormas2SormasConfig();
config.setFilePath(getProperty(SORMAS2SORMAS_FILES_PATH, null));
config.setKeyAlias(getProperty(SORMAS2SORMAS_KEY_ALIAS, null));
config.setKeystoreName(getProperty(SORMAS2SORMAS_KEYSTORE_NAME, null));
config.setKeystorePass(getProperty(SORMAS2SORMAS_KEYSTORE_PASSWORD, null));
config.setTruststoreName(getProperty(SORMAS2SORMAS_TRUSTSTORE_NAME, null));
config.setTruststorePass(getProperty(SORMAS2SORMAS_TRUSTSTORE_PASS, null));
return config;
}
@Override
public String getSormasToSormasUserPassword() {
return getProperty(SORMAS_TO_SORMAS_USER_PASSWORD, null);
}
@Override |
<<<<<<<
String CaseData_followUpComment = "CaseData.followUpComment";
String CaseData_followUpStatus = "CaseData.followUpStatus";
String CaseData_followUpUntil = "CaseData.followUpUntil";
=======
String CaseData_facilityType = "CaseData.facilityType";
>>>>>>>
String CaseData_facilityType = "CaseData.facilityType";
String CaseData_followUpComment = "CaseData.followUpComment";
String CaseData_followUpStatus = "CaseData.followUpStatus";
String CaseData_followUpUntil = "CaseData.followUpUntil";
<<<<<<<
String caseFollowupVisitsView = "caseFollowupVisitsView";
String caseHealthFacilityDetailsShort = "caseHealthFacilityDetailsShort";
=======
>>>>>>>
String caseFollowupVisitsView = "caseFollowupVisitsView";
<<<<<<<
String casePlusDays = "casePlusDays";
=======
String casePlaceOfStay = "casePlaceOfStay";
>>>>>>>
String casePlaceOfStay = "casePlaceOfStay";
String casePlusDays = "casePlusDays"; |
<<<<<<<
Predicate filter = caseService.createUserFilter(cb, cq, caze);
=======
Predicate filter = caseService.createUserFilter(cb, cq, caze, user, false);
>>>>>>>
Predicate filter = caseService.createUserFilter(cb, cq, caze, false);
<<<<<<<
public Map<PresentCondition, Long> getCaseCountPerPersonCondition(CaseCriteria caseCriteria) {
User user = userService.getCurrentUser();
=======
@Override
public Map<PresentCondition, Long> getCaseCountPerPersonCondition(CaseCriteria caseCriteria, String userUuid, boolean includeSharedCases) {
User user = userService.getByUuid(userUuid);
>>>>>>>
@Override
public Map<PresentCondition, Long> getCaseCountPerPersonCondition(CaseCriteria caseCriteria, boolean includeSharedCases) {
User user = userService.getCurrentUser();
<<<<<<<
Predicate filter = caseService.createUserFilter(cb, cq, caze);
=======
Predicate filter = caseService.createUserFilter(cb, cq, caze, user, includeSharedCases);
>>>>>>>
Predicate filter = caseService.createUserFilter(cb, cq, caze, includeSharedCases);
<<<<<<<
public Map<Disease, District> getLastReportedDistrictByDisease(CaseCriteria caseCriteria) {
User user = userService.getCurrentUser();
=======
public Map<Disease, District> getLastReportedDistrictByDisease(CaseCriteria caseCriteria, String userUuid, boolean includeSharedCases) {
User user = userService.getByUuid(userUuid);
>>>>>>>
public Map<Disease, District> getLastReportedDistrictByDisease(CaseCriteria caseCriteria, boolean includeSharedCases) {
User user = userService.getCurrentUser();
<<<<<<<
Predicate filter = caseService.createUserFilter(cb, cq, caze);
=======
Predicate filter = caseService.createUserFilter(cb, cq, caze, user, includeSharedCases);
>>>>>>>
Predicate filter = caseService.createUserFilter(cb, cq, caze, includeSharedCases);
<<<<<<<
public String getLastReportedDistrictName(CaseCriteria caseCriteria) {
User user = userService.getCurrentUser();
=======
@Override
public String getLastReportedDistrictName(CaseCriteria caseCriteria, String userUuid, boolean includeSharedCases) {
User user = userService.getByUuid(userUuid);
>>>>>>>
public String getLastReportedDistrictName(CaseCriteria caseCriteria, boolean includeSharedCases) {
User user = userService.getCurrentUser();
<<<<<<<
Predicate filter = caseService.createUserFilter(cb, cq, caze);
=======
Predicate filter = caseService.createUserFilter(cb, cq, caze, user, includeSharedCases);
>>>>>>>
Predicate filter = caseService.createUserFilter(cb, cq, caze, includeSharedCases); |
<<<<<<<
private static final Set<String> KNOWN_VIEWS = initKnownViews();
private static Set<String> initKnownViews() {
final Set<String> views = new HashSet<>(
Arrays.asList(
TasksView.VIEW_NAME,
CasesView.VIEW_NAME,
ContactsView.VIEW_NAME,
EventsView.VIEW_NAME,
SamplesView.VIEW_NAME,
CampaignsView.VIEW_NAME,
CampaignDataView.VIEW_NAME,
ReportsView.VIEW_NAME,
StatisticsView.VIEW_NAME,
UsersView.VIEW_NAME,
OutbreaksView.VIEW_NAME,
RegionsView.VIEW_NAME,
DistrictsView.VIEW_NAME,
CommunitiesView.VIEW_NAME,
HealthFacilitiesView.VIEW_NAME,
LaboratoriesView.VIEW_NAME,
PointsOfEntryView.VIEW_NAME));
if (permitted(FeatureType.CASE_SURVEILANCE, UserRight.DASHBOARD_SURVEILLANCE_ACCESS)) {
views.add(SurveillanceDashboardView.VIEW_NAME);
}
if (permitted(FeatureType.CONTACT_TRACING, UserRight.DASHBOARD_CONTACT_ACCESS)) {
views.add(ContactsDashboardView.VIEW_NAME);
}
if (permitted(FeatureType.CAMPAIGNS, UserRight.DASHBOARD_CAMPAIGNS_ACCESS)) {
views.add(CampaignDashboardView.VIEW_NAME);
}
return views;
}
=======
private static final Set<String> KNOWN_VIEWS = new HashSet<>(
Arrays.asList(
SurveillanceDashboardView.VIEW_NAME,
ContactsDashboardView.VIEW_NAME,
TasksView.VIEW_NAME,
CasesView.VIEW_NAME,
ContactsView.VIEW_NAME,
EventsView.VIEW_NAME,
SamplesView.VIEW_NAME,
CampaignsView.VIEW_NAME,
CampaignDataView.VIEW_NAME,
ReportsView.VIEW_NAME,
StatisticsView.VIEW_NAME,
UsersView.VIEW_NAME,
OutbreaksView.VIEW_NAME,
RegionsView.VIEW_NAME,
DistrictsView.VIEW_NAME,
CommunitiesView.VIEW_NAME,
FacilitiesView.VIEW_NAME,
PointsOfEntryView.VIEW_NAME));
>>>>>>>
private static final Set<String> KNOWN_VIEWS = initKnownViews();
private static Set<String> initKnownViews() {
final Set<String> views = new HashSet<>(
Arrays.asList(
TasksView.VIEW_NAME,
CasesView.VIEW_NAME,
ContactsView.VIEW_NAME,
EventsView.VIEW_NAME,
SamplesView.VIEW_NAME,
CampaignsView.VIEW_NAME,
CampaignDataView.VIEW_NAME,
ReportsView.VIEW_NAME,
StatisticsView.VIEW_NAME,
UsersView.VIEW_NAME,
OutbreaksView.VIEW_NAME,
RegionsView.VIEW_NAME,
DistrictsView.VIEW_NAME,
CommunitiesView.VIEW_NAME,
FacilitiesView.VIEW_NAME,
PointsOfEntryView.VIEW_NAME));
if (permitted(FeatureType.CASE_SURVEILANCE, UserRight.DASHBOARD_SURVEILLANCE_ACCESS)) {
views.add(SurveillanceDashboardView.VIEW_NAME);
}
if (permitted(FeatureType.CONTACT_TRACING, UserRight.DASHBOARD_CONTACT_ACCESS)) {
views.add(ContactsDashboardView.VIEW_NAME);
}
if (permitted(FeatureType.CAMPAIGNS, UserRight.DASHBOARD_CAMPAIGNS_ACCESS)) {
views.add(CampaignDashboardView.VIEW_NAME);
}
return views;
} |
<<<<<<<
EventService eventService;
@EJB
UserService userService;
=======
private EventService eventService;
>>>>>>>
private EventService eventService;
@EJB
private UserService userService;
<<<<<<<
Join<Object, User> assigneeUser = taskPath.join(Task.ASSIGNEE_USER, JoinType.LEFT);
Predicate assigneeFilter = cb.or(cb.isNull(assigneeUser.get(User.UUID)), userService.createUserFilter(cb, assigneeUser));
// National users can access all tasks in the system that are assigned in their jurisdiction
=======
// National users can access all tasks in the system
>>>>>>>
Join<Object, User> assigneeUser = taskPath.join(Task.ASSIGNEE_USER, JoinType.LEFT);
Predicate assigneeFilter = cb.or(cb.isNull(assigneeUser.get(User.UUID)), userService.createUserFilter(cb, assigneeUser));
// National users can access all tasks in the system that are assigned in their jurisdiction
<<<<<<<
if (currentUser.hasAnyUserRole(
UserRole.NATIONAL_USER,
UserRole.NATIONAL_CLINICIAN,
UserRole.NATIONAL_OBSERVER,
UserRole.REST_USER)) {
return assigneeFilter;
=======
if (currentUser.hasAnyUserRole(UserRole.NATIONAL_USER, UserRole.NATIONAL_CLINICIAN, UserRole.NATIONAL_OBSERVER, UserRole.REST_USER)) {
return null;
>>>>>>>
if (currentUser.hasAnyUserRole(UserRole.NATIONAL_USER, UserRole.NATIONAL_CLINICIAN, UserRole.NATIONAL_OBSERVER, UserRole.REST_USER)) {
return assigneeFilter;
<<<<<<<
filter = and(cb, filter, cb.notEqual(assigneeUser.get(User.UUID), taskCriteria.getExcludeAssigneeUser().getUuid()));
=======
filter = and(
cb,
filter,
cb.notEqual(from.join(Task.ASSIGNEE_USER, JoinType.LEFT).get(User.UUID), taskCriteria.getExcludeAssigneeUser().getUuid()));
>>>>>>>
filter = and(
cb,
filter,
cb.notEqual(assigneeUser.get(User.UUID), taskCriteria.getExcludeAssigneeUser().getUuid()));
<<<<<<<
filter = and(cb, filter,
cb.or(
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE),
cb.equal(caze.get(Case.ARCHIVED), true)),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT),
cb.equal(contactCaze.get(Case.ARCHIVED), true)),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT),
cb.equal(event.get(Event.ARCHIVED), true))));
=======
filter = and(
cb,
filter,
cb.or(
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE), cb.equal(caze.get(Case.ARCHIVED), true)),
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT), cb.equal(contactCaze.get(Case.ARCHIVED), true)),
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT), cb.equal(event.get(Event.ARCHIVED), true))));
>>>>>>>
filter = and(
cb,
filter,
cb.or(
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE), cb.equal(caze.get(Case.ARCHIVED), true)),
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT), cb.equal(contactCaze.get(Case.ARCHIVED), true)),
cb.and(cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT), cb.equal(event.get(Event.ARCHIVED), true))));
<<<<<<<
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.GENERAL),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE),
cb.or(
cb.equal(caze.get(Case.ARCHIVED), false),
cb.isNull(caze.get(Case.ARCHIVED)))
),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT),
cb.or(
cb.equal(contactCaze.get(Case.ARCHIVED), false),
cb.isNull(contactCaze.get(Case.ARCHIVED)))
),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT),
cb.or(
cb.equal(event.get(Event.ARCHIVED), false),
cb.isNull(event.get(Event.ARCHIVED)))));
=======
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.GENERAL),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE),
cb.or(cb.equal(caze.get(Case.ARCHIVED), false), cb.isNull(caze.get(Case.ARCHIVED)))),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT),
cb.or(cb.equal(contactCaze.get(Case.ARCHIVED), false), cb.isNull(contactCaze.get(Case.ARCHIVED)))),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT),
cb.or(cb.equal(event.get(Event.ARCHIVED), false), cb.isNull(event.get(Event.ARCHIVED)))));
>>>>>>>
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.GENERAL),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CASE),
cb.or(
cb.equal(caze.get(Case.ARCHIVED), false),
cb.isNull(caze.get(Case.ARCHIVED)))
),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.CONTACT),
cb.or(
cb.equal(contactCaze.get(Case.ARCHIVED), false),
cb.isNull(contactCaze.get(Case.ARCHIVED)))
),
cb.and(
cb.equal(from.get(Task.TASK_CONTEXT), TaskContext.EVENT),
cb.or(
cb.equal(event.get(Event.ARCHIVED), false),
cb.isNull(event.get(Event.ARCHIVED))))); |
<<<<<<<
=======
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.vaadin.server.Sizeable;
>>>>>>>
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.vaadin.server.Sizeable;
<<<<<<<
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.CustomField;
import com.vaadin.v7.ui.DateField;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.OptionGroup;
=======
import com.vaadin.v7.ui.*;
>>>>>>>
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.CustomField;
import com.vaadin.v7.ui.DateField;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.OptionGroup;
<<<<<<<
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public abstract class AbstractEditForm<DTO extends EntityDto> extends CustomField<DTO> implements CommitHandler {// implements DtoEditForm<DTO> {
private static final long serialVersionUID = 1L;
=======
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
>>>>>>>
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
<<<<<<<
private final Class<DTO> type;
private final String propertyI18nPrefix;
protected final FieldVisibilityCheckers fieldVisibilityCheckers;
=======
private static final long serialVersionUID = 1L;
>>>>>>>
private static final long serialVersionUID = 1L;
protected final FieldVisibilityCheckers fieldVisibilityCheckers;
<<<<<<<
protected AbstractEditForm(Class<DTO> type, String propertyI18nPrefix, UserRight editOrCreateUserRight) {
this(type, propertyI18nPrefix, editOrCreateUserRight, true, null);
=======
public AbstractEditForm(Class<DTO> type, String propertyI18nPrefix, UserRight editOrCreateUserRight) {
super(type, propertyI18nPrefix, editOrCreateUserRight);
postConstruct();
>>>>>>>
protected AbstractEditForm(Class<DTO> type, String propertyI18nPrefix, UserRight editOrCreateUserRight) {
this(type, propertyI18nPrefix, editOrCreateUserRight, true, null);
<<<<<<<
public CustomLayout initContent() {
String htmlLayout = createHtmlLayout();
CustomLayout layout = new CustomLayout();
layout.setTemplateContents(htmlLayout);
layout.setWidth(100, Unit.PERCENTAGE);
layout.setHeightUndefined();
return layout;
}
@Override
public Class<? extends DTO> getType() {
return type;
}
@Override
protected CustomLayout getContent() {
return (CustomLayout) super.getContent();
}
protected abstract String createHtmlLayout();
protected abstract void addFields();
@Override
=======
>>>>>>>
<<<<<<<
public BeanFieldGroup<DTO> getFieldGroup() {
return this.fieldGroup;
}
protected void addFields(String... properties) {
for (String property : properties) {
addField(property);
}
}
@SuppressWarnings("rawtypes")
protected <T extends Field> void addFields(Class<T> fieldType, String... properties) {
for (String property : properties) {
addField(property, fieldType);
}
}
@SuppressWarnings("rawtypes")
protected <T extends Field> T addCustomField(String fieldId, Class<?> dataType, Class<T> fieldType) {
T field = getFieldGroup().getFieldFactory().createField(dataType, fieldType);
formatField(field, fieldId);
addDefaultAdditionalValidators(field);
getContent().addComponent(field, fieldId);
customFields.add(field);
return field;
}
=======
>>>>>>>
<<<<<<<
protected <T extends Field> T addField(String propertyId, Class<T> fieldType) {
T field = getFieldGroup().buildAndBind(propertyId, (Object) propertyId, fieldType);
formatField(field, propertyId);
field.setId(propertyId);
getContent().addComponent(field, propertyId);
addDefaultAdditionalValidators(field);
return field;
}
@SuppressWarnings("rawtypes")
=======
>>>>>>>
<<<<<<<
return field;
}
@SuppressWarnings("rawtypes")
protected <T extends Field> T addDefaultAdditionalValidators(T field) {
addFutureDateValidator(field, 0);
return field;
}
@SuppressWarnings("rawtypes")
protected <T extends Field> T addFutureDateValidator(T field, int amountOfDays) {
if (amountOfDays < 0) {
return field;
}
if (DateField.class.isAssignableFrom(field.getClass())
|| DateTimeField.class.isAssignableFrom(field.getClass())) {
field.addValidator(new FutureDateValidator(field, amountOfDays, field.getCaption()));
}
return field;
}
public Field<?> getField(String fieldOrPropertyId) {
Field<?> field = getFieldGroup().getField(fieldOrPropertyId);
if (field == null) {
// try to get the field from the layout
Component component = getContent().getComponent(fieldOrPropertyId);
if (component instanceof Field<?>) {
field = (Field<?>) component;
}
}
return field;
=======
>>>>>>>
<<<<<<<
=======
*
* @param disease Not null if the @Diseases annotation should be taken into account
* @param viewMode Not null if the @Outbreaks annotation should be taken into account
>>>>>>>
<<<<<<<
=======
protected boolean isFieldHiddenForCurrentCountry(Object propertyId) {
try {
final java.lang.reflect.Field declaredField =
getType().getDeclaredField(propertyId.toString());
final Predicate<String> currentCountryIsHiddenForField =
country -> FacadeProvider.getConfigFacade().getCountryLocale().startsWith(country);
if (declaredField.isAnnotationPresent(HideForCountries.class) &&
Arrays.asList(declaredField.getAnnotation(HideForCountries.class).countries())
.stream().anyMatch(currentCountryIsHiddenForField)) {
return true;
}
} catch (NoSuchFieldException e) {
// This exception is fine because it should only happen for UUID fields
}
return false;
}
>>>>>>> |
<<<<<<<
public EventParticipantDto saveEventParticipant(EventParticipantDto dto) {
return saveEventParticipant(dto, true);
}
public EventParticipantDto saveEventParticipant(EventParticipantDto dto, boolean checkChangeDate) {
=======
public EventParticipantDto saveEventParticipant(@Valid EventParticipantDto dto) {
>>>>>>>
public EventParticipantDto saveEventParticipant(@Valid EventParticipantDto dto) {
return saveEventParticipant(dto, true);
}
public EventParticipantDto saveEventParticipant(EventParticipantDto dto, boolean checkChangeDate) { |
<<<<<<<
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE})
=======
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public QuarantineType getQuarantine() {
return quarantine;
}
@Order(34)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public Date getQuarantineFrom() {
return quarantineFrom;
}
@Order(35)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public Date getQuarantineTo() {
return quarantineTo;
}
@Order(36)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE})
>>>>>>>
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public QuarantineType getQuarantine() {
return quarantine;
}
@Order(34)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public Date getQuarantineFrom() {
return quarantineFrom;
}
@Order(35)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
@ExportProperty(value = QUARANTINE_INFORMATION, combined = true)
@ExportGroup(ExportGroupType.ADDITIONAL)
public Date getQuarantineTo() {
return quarantineTo;
}
@Order(36)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE})
<<<<<<<
@Order(34)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE})
=======
@Order(37)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE})
>>>>>>>
@Order(37)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE})
<<<<<<<
@Order(40)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
=======
@Order(38)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
>>>>>>>
@Order(38)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
<<<<<<<
@Order(41)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
=======
@Order(39)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
>>>>>>>
@Order(39)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
<<<<<<<
@Order(42)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
=======
@Order(40)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
>>>>>>>
@Order(40)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
<<<<<<<
@Order(43)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
=======
@Order(41)
@ExportTarget(exportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT})
>>>>>>>
@Order(41)
@ExportTarget(caseExportTypes = {CaseExportType.CASE_SURVEILLANCE, CaseExportType.CASE_MANAGEMENT}) |
<<<<<<<
import de.symeda.sormas.api.utils.SensitiveData;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
=======
>>>>>>>
import de.symeda.sormas.api.utils.SensitiveData; |
<<<<<<<
boolean isInJurisdiction = sampleJurisdictionChecker.isInJurisdiction(exportDto.getAssociatedCaseJurisdiction(), null);
pseudonymizationService.pseudonymizeDto(SampleExportDto.AssociatedCase.class, exportDto.getAssociatedCase(), isInJurisdiction, null);
pseudonymizationService.pseudonymizeDto(ContactReferenceDto.class, exportDto.getAssociatedContact(), isInJurisdiction, null);
=======
boolean isInJurisdiction = isInJurisdiction(exportDto.getAssociatedCaseJurisdiction(), exportDto.getAssociatedContactJurisdiction());
if (exportDto.getAssociatedCase() != null) {
pseudonymizationService.pseudonymizeDto(SampleExportDto.AssociatedCase.class, exportDto.getAssociatedCase(), isInJurisdiction, null);
}
if (exportDto.getAssociatedContact() != null) {
pseudonymizationService.pseudonymizeDto(ContactReferenceDto.class, exportDto.getAssociatedContact(), isInJurisdiction, null);
}
>>>>>>>
boolean isInJurisdiction = sampleJurisdictionChecker.isInJurisdiction(exportDto.getAssociatedCaseJurisdiction(), null);
if (exportDto.getAssociatedCase() != null) {
pseudonymizationService.pseudonymizeDto(SampleExportDto.AssociatedCase.class, exportDto.getAssociatedCase(), isInJurisdiction, null);
}
if (exportDto.getAssociatedContact() != null) {
pseudonymizationService.pseudonymizeDto(ContactReferenceDto.class, exportDto.getAssociatedContact(), isInJurisdiction, null);
} |
<<<<<<<
public void setReportingUserRole(UserRole reportingUserRole) {
=======
public CaseCriteria reportingUserRole(UserRole reportingUserRole) {
>>>>>>>
public void setReportingUserRole(UserRole reportingUserRole) {
<<<<<<<
public void setDisease(Disease disease) {
=======
public CaseCriteria disease(Disease disease) {
>>>>>>>
public void setDisease(Disease disease) {
<<<<<<<
=======
public CaseCriteria newCaseDateFrom(Date newCaseDateFrom) {
this.newCaseDateFrom = newCaseDateFrom;
return this;
}
>>>>>>>
public CaseCriteria newCaseDateFrom(Date newCaseDateFrom) {
setNewCaseDateFrom(newCaseDateFrom);
return this;
}
<<<<<<<
public void setMustHaveNoGeoCoordinates(Boolean mustHaveNoGeoCoordinates) {
this.mustHaveNoGeoCoordinates = mustHaveNoGeoCoordinates;
}
public Boolean getMustHaveNoGeoCoordinates() {
=======
public Boolean isMustHaveNoGeoCoordinates() {
>>>>>>>
public void setMustHaveNoGeoCoordinates(Boolean mustHaveNoGeoCoordinates) {
this.mustHaveNoGeoCoordinates = mustHaveNoGeoCoordinates;
}
public Boolean getMustHaveNoGeoCoordinates() {
<<<<<<<
public void setMustBePortHealthCaseWithoutFacility(Boolean mustBePortHealthCaseWithoutFacility) {
=======
public CaseCriteria mustBePortHealthCaseWithoutFacility(Boolean mustBePortHealthCaseWithoutFacility) {
>>>>>>>
public void setMustBePortHealthCaseWithoutFacility(Boolean mustBePortHealthCaseWithoutFacility) {
<<<<<<<
public Boolean getMustBePortHealthCaseWithoutFacility() {
=======
public Boolean isMustBePortHealthCaseWithoutFacility() {
>>>>>>>
public Boolean getMustBePortHealthCaseWithoutFacility() {
<<<<<<<
public void setMustHaveCaseManagementData(Boolean mustHaveCaseManagementData) {
=======
public CaseCriteria mustHaveCaseManagementData(Boolean mustHaveCaseManagementData) {
>>>>>>>
public void setMustHaveCaseManagementData(Boolean mustHaveCaseManagementData) {
<<<<<<<
public Boolean getMustHaveCaseManagementData() {
=======
public Boolean isMustHaveCaseManagementData() {
>>>>>>>
public Boolean getMustHaveCaseManagementData() {
<<<<<<<
=======
public CaseCriteria withoutResponsibleOfficer(Boolean withoutResponsibleOfficer) {
this.withoutResponsibleOfficer = withoutResponsibleOfficer;
return this;
}
public Boolean isWithoutResponsibleOfficer() {
return this.withoutResponsibleOfficer;
}
public CaseCriteria caseClassification(CaseClassification caseClassification) {
this.caseClassification = caseClassification;
return this;
}
>>>>>>>
public CaseCriteria withoutResponsibleOfficer(Boolean withoutResponsibleOfficer) {
this.withoutResponsibleOfficer = withoutResponsibleOfficer;
return this;
}
public Boolean isWithoutResponsibleOfficer() {
return this.withoutResponsibleOfficer;
}
<<<<<<<
public void setPointOfEntry(PointOfEntryReferenceDto pointOfEntry) {
=======
public CaseCriteria pointOfEntry(PointOfEntryReferenceDto pointOfEntry) {
>>>>>>>
public void setPointOfEntry(PointOfEntryReferenceDto pointOfEntry) {
<<<<<<<
=======
public void setNewCaseDateType(NewCaseDateType newCaseDateType) {
this.newCaseDateType = newCaseDateType;
}
>>>>>>>
<<<<<<<
=======
public CaseCriteria quarantineTo(Date quarantineTo) {
this.quarantineTo = quarantineTo;
return this;
}
>>>>>>>
<<<<<<<
=======
public CaseCriteria excludeSharedCases(Boolean excludeSharedCases) {
this.excludeSharedCases = excludeSharedCases;
return this;
}
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
@SensitiveData
=======
private FacilityType placeOfBirthFacilityType;
@Diseases({
Disease.CONGENITAL_RUBELLA })
>>>>>>>
private FacilityType placeOfBirthFacilityType;
@Diseases({
Disease.CONGENITAL_RUBELLA })
@SensitiveData
<<<<<<<
@SensitiveData
=======
private FacilityType occupationFacilityType;
>>>>>>>
@SensitiveData
private FacilityType occupationFacilityType;
@SensitiveData |
<<<<<<<
import de.symeda.sormas.api.EntityDto;
import de.symeda.sormas.api.FacadeProvider;
=======
import de.symeda.sormas.api.FacadeProvider;
>>>>>>>
import de.symeda.sormas.api.EntityDto;
import de.symeda.sormas.api.FacadeProvider;
<<<<<<<
=======
CaseCriteria caseCriteria = criteria.getCaseCriteria();
>>>>>>>
CaseCriteria caseCriteria = criteria.getCaseCriteria();
<<<<<<<
Predicate nameSimilarityFilter = cb.gt(
cb.function("word_similarity", double.class, cb.parameter(String.class, "name"), nameSimilarityExpr),
0.6D);
Predicate diseaseFilter = criteria.getDisease() != null
? cb.equal(root.get(Case.DISEASE), criteria.getDisease())
: null;
Predicate regionFilter = criteria.getRegion() != null
? cb.equal(region.get(Region.UUID), criteria.getRegion().getUuid())
: null;
Predicate reportDateFilter = criteria.getReportDate() != null ? cb.between(root.get(Case.REPORT_DATE),
DateHelper.subtractDays(criteria.getReportDate(), 30), DateHelper.addDays(criteria.getReportDate(), 30))
: null;
=======
Predicate nameSimilarityFilter = cb.gt(cb.function("similarity", double.class, cb.parameter(String.class, "name"), nameSimilarityExpr), FacadeProvider.getConfigFacade().getNameSimilarityThreshold());
Predicate diseaseFilter = caseCriteria.getDisease() != null ? cb.equal(root.get(Case.DISEASE), caseCriteria.getDisease()) : null;
Predicate regionFilter = caseCriteria.getRegion() != null ? cb.equal(region.get(Region.UUID), caseCriteria.getRegion().getUuid()) : null;
Predicate reportDateFilter = criteria.getReportDate() != null ? cb.between(root.get(Case.REPORT_DATE), DateHelper.subtractDays(criteria.getReportDate(), 30), DateHelper.addDays(criteria.getReportDate(), 30)) : null;
>>>>>>>
Predicate nameSimilarityFilter = cb.gt(cb.function("similarity", double.class, cb.parameter(String.class, "name"), nameSimilarityExpr), FacadeProvider.getConfigFacade().getNameSimilarityThreshold());
Predicate diseaseFilter = caseCriteria.getDisease() != null ? cb.equal(root.get(Case.DISEASE), caseCriteria.getDisease()) : null;
Predicate regionFilter = caseCriteria.getRegion() != null ? cb.equal(region.get(Region.UUID), caseCriteria.getRegion().getUuid()) : null;
Predicate reportDateFilter = criteria.getReportDate() != null ? cb.between(root.get(Case.REPORT_DATE), DateHelper.subtractDays(criteria.getReportDate(), 30), DateHelper.addDays(criteria.getReportDate(), 30)) : null;
<<<<<<<
Predicate nameSimilarityFilter = cb
.gt(cb.function("word_similarity", double.class, nameSimilarityExpr, nameSimilarityExpr2), 0.6D);
=======
Predicate nameSimilarityFilter = cb.gt(cb.function("similarity", double.class, nameSimilarityExpr, nameSimilarityExpr2), FacadeProvider.getConfigFacade().getNameSimilarityThreshold());
>>>>>>>
Predicate nameSimilarityFilter = cb.gt(cb.function("similarity", double.class, nameSimilarityExpr, nameSimilarityExpr2), FacadeProvider.getConfigFacade().getNameSimilarityThreshold());
<<<<<<<
Predicate reportDateFilter = cb.lessThanOrEqualTo(cb.abs(cb.diff(
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"),
root.get(Case.REPORT_DATE)),
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"),
root2.get(Case.REPORT_DATE)))),
new Long(2592000) // 30 days in seconds
);
=======
Predicate reportDateFilter = cb.lessThanOrEqualTo(
cb.abs(
cb.diff(
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"), root.get(Case.REPORT_DATE)),
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"), root2.get(Case.REPORT_DATE)))),
new Long(30 * 24 * 60 * 60) // 30 days
);
>>>>>>>
Predicate reportDateFilter = cb.lessThanOrEqualTo(
cb.abs(
cb.diff(
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"), root.get(Case.REPORT_DATE)),
cb.function("date_part", Long.class, cb.parameter(String.class, "date_type"), root2.get(Case.REPORT_DATE)))),
new Long(30 * 24 * 60 * 60) // 30 days
);
<<<<<<<
List<Object[]> foundUuids = (List<Object[]>) em.createQuery(cq).setParameter("date_type", "epoch")
.getResultList();
=======
List<Object[]> foundUuids = (List<Object[]>) em.createQuery(cq).setParameter("date_type", "epoch").getResultList();
>>>>>>>
List<Object[]> foundUuids = (List<Object[]>) em.createQuery(cq).setParameter("date_type", "epoch").getResultList();
<<<<<<<
CaseIndexDto firstCase = em.createQuery(indexCq).getSingleResult();
dtoPair[0] = firstCase;
indexCq.where(cb.equal(indexRoot.get(Case.UUID), uuidPair[1]));
CaseIndexDto secondCase = em.createQuery(indexCq).getSingleResult();
dtoPair[1] = secondCase;
resultList.add(dtoPair);
}
=======
parentList = em.createQuery(indexCq).getResultList();
parentList.sort(Comparator.comparing(indexDto -> parentUuids.indexOf(((CaseIndexDto) indexDto).getUuid())));
indexCq.where(indexRoot.get(Case.UUID).in(childrenUuids));
childrenList = em.createQuery(indexCq).getResultList();
childrenList.sort(Comparator.comparing(indexDto -> childrenUuids.indexOf(((CaseIndexDto) indexDto).getUuid())));
for (int i = 0; i < parentList.size(); i++) {
resultList.add(new CaseIndexDto[] {parentList.get(i), childrenList.get(i)});
}
}
>>>>>>>
parentList = em.createQuery(indexCq).getResultList();
parentList.sort(Comparator.comparing(indexDto -> parentUuids.indexOf(((CaseIndexDto) indexDto).getUuid())));
indexCq.where(indexRoot.get(Case.UUID).in(childrenUuids));
childrenList = em.createQuery(indexCq).getResultList();
childrenList.sort(Comparator.comparing(indexDto -> childrenUuids.indexOf(((CaseIndexDto) indexDto).getUuid())));
for (int i = 0; i < parentList.size(); i++) {
resultList.add(new CaseIndexDto[] {parentList.get(i), childrenList.get(i)});
}
}
<<<<<<<
private void setIndexDtoSortingOrder(CriteriaBuilder cb, CriteriaQuery<CaseIndexDto> cq, Root<Case> root,
List<SortProperty> sortProperties) {
=======
private void setIndexDtoSortingOrder(CriteriaBuilder cb, CriteriaQuery<CaseIndexDto> cq, Root<Case> root, List<SortProperty> sortProperties) {
>>>>>>>
private void setIndexDtoSortingOrder(CriteriaBuilder cb, CriteriaQuery<CaseIndexDto> cq, Root<Case> root, List<SortProperty> sortProperties) { |
<<<<<<<
import de.symeda.sormas.api.caze.CaseCriteria;
import de.symeda.sormas.ui.caze.CasesView;
=======
import de.symeda.sormas.api.contact.*;
>>>>>>>
import de.symeda.sormas.api.contact.*;
<<<<<<<
=======
private ComboBox categoryFilter;
private CheckBox onlyQuarantineHelpNeeded;
private ComboBox quarantineTypeFilter;
private PopupDateField quarantineToFilter;
private CheckBox quarantineOrderedVerballyFilter;
private CheckBox quarantineOrderedOfficialDocumentFilter;
private CheckBox quarantineNotOrderedFilter;
>>>>>>>
<<<<<<<
=======
});
firstFilterRowLayout.addComponent(searchField);
addShowMoreOrLessFiltersButtons(firstFilterRowLayout);
resetButton = new Button(I18nProperties.getCaption(Captions.actionResetFilters));
resetButton.setVisible(false);
resetButton.addClickListener(event -> {
ViewModelProviders.of(ContactsView.class).remove(ContactCriteria.class);
navigateTo(null);
});
firstFilterRowLayout.addComponent(resetButton);
}
filterLayout.addComponent(firstFilterRowLayout);
secondFilterRowLayout = new HorizontalLayout();
secondFilterRowLayout.setMargin(false);
secondFilterRowLayout.setSpacing(true);
secondFilterRowLayout.setSizeUndefined();
{
UserDto user = UserProvider.getCurrent().getUser();
regionFilter = new ComboBox();
if (user.getRegion() == null) {
regionFilter.setWidth(240, Unit.PIXELS);
regionFilter.setInputPrompt(I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.REGION_UUID));
regionFilter.addItems(FacadeProvider.getRegionFacade().getAllActiveAsReference());
regionFilter.addValueChangeListener(e -> {
RegionReferenceDto region = (RegionReferenceDto) e.getProperty().getValue();
if (region != null) {
officerFilter.addItems(FacadeProvider.getUserFacade().getUsersByRegionAndRoles(region, UserRole.CONTACT_OFFICER));
} else {
officerFilter.removeAllItems();
}
criteria.region(region);
navigateTo(criteria);
});
secondFilterRowLayout.addComponent(regionFilter);
}
districtFilter = new ComboBox();
districtFilter.setWidth(240, Unit.PIXELS);
districtFilter.setInputPrompt(I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.DISTRICT_UUID));
districtFilter.setDescription(I18nProperties.getDescription(Descriptions.descDistrictFilter));
districtFilter.addValueChangeListener(e -> {
DistrictReferenceDto district = (DistrictReferenceDto) e.getProperty().getValue();
criteria.district(district);
navigateTo(criteria);
});
if (user.getRegion() != null && user.getDistrict() == null) {
districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(user.getRegion().getUuid()));
districtFilter.setEnabled(true);
} else {
regionFilter.addValueChangeListener(e -> {
RegionReferenceDto region = (RegionReferenceDto)e.getProperty().getValue();
districtFilter.removeAllItems();
if (region != null) {
districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(region.getUuid()));
districtFilter.setEnabled(true);
} else {
districtFilter.setEnabled(false);
}
});
districtFilter.setEnabled(false);
}
secondFilterRowLayout.addComponent(districtFilter);
Label infoLabel = new Label(VaadinIcons.INFO_CIRCLE.getHtml(), ContentMode.HTML);
infoLabel.setSizeUndefined();
infoLabel.setDescription(I18nProperties.getString(Strings.infoContactsViewRegionDistrictFilter), ContentMode.HTML);
CssStyles.style(infoLabel, CssStyles.LABEL_XLARGE, CssStyles.LABEL_SECONDARY);
secondFilterRowLayout.addComponent(infoLabel);
officerFilter = new ComboBox();
officerFilter.setWidth(140, Unit.PIXELS);
officerFilter.setInputPrompt(I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.CONTACT_OFFICER_UUID));
officerFilter.addValueChangeListener(e -> {
UserReferenceDto officer = (UserReferenceDto) e.getProperty().getValue();
criteria.contactOfficer(officer);
navigateTo(criteria);
});
if (user.getRegion() != null) {
officerFilter.addItems(FacadeProvider.getUserFacade().getUsersByRegionAndRoles(user.getRegion(), UserRole.CONTACT_OFFICER));
}
secondFilterRowLayout.addComponent(officerFilter);
reportedByFilter = new ComboBox();
reportedByFilter.setWidth(140, Unit.PIXELS);
reportedByFilter.setInputPrompt(I18nProperties.getString(Strings.reportedBy));
reportedByFilter.addItems((Object[]) UserRole.values());
reportedByFilter.addValueChangeListener(e -> {
criteria.reportingUserRole((UserRole) e.getProperty().getValue());
navigateTo(criteria);
});
secondFilterRowLayout.addComponent(reportedByFilter);
followUpUntilToFilter = new PopupDateField();
followUpUntilToFilter.setWidth(200, Unit.PIXELS);
followUpUntilToFilter.setInputPrompt(
I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.FOLLOW_UP_UNTIL));
followUpUntilToFilter.addValueChangeListener(e -> {
criteria.followUpUntilTo((Date) e.getProperty().getValue());
criteria.followUpUntilToPrecise(e.getProperty().getValue() != null);
navigateTo(criteria);
});
secondFilterRowLayout.addComponent(followUpUntilToFilter);
}
filterLayout.addComponent(secondFilterRowLayout);
secondFilterRowLayout.setVisible(false);
thirdFilterRowLayout = new HorizontalLayout();
thirdFilterRowLayout.setMargin(false);
thirdFilterRowLayout.setSpacing(true);
thirdFilterRowLayout.setSizeUndefined();
{
quarantineTypeFilter = new ComboBox();
quarantineTypeFilter.setWidth(140, Unit.PIXELS);
quarantineTypeFilter.setInputPrompt(I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE));
quarantineTypeFilter.addItems((Object[]) QuarantineType.values());
quarantineTypeFilter.addValueChangeListener(e -> {
criteria.quarantineType(((QuarantineType) e.getProperty().getValue()));
navigateTo(criteria);
});
thirdFilterRowLayout.addComponent(quarantineTypeFilter);
quarantineToFilter = new PopupDateField();
quarantineToFilter.setWidth(200, Unit.PIXELS);
quarantineToFilter.setInputPrompt(
I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_TO));
quarantineToFilter.addValueChangeListener(e -> {
criteria.quarantineTo((Date) e.getProperty().getValue());
navigateTo(criteria);
});
thirdFilterRowLayout.addComponent(quarantineToFilter);
if (isGermanServer()) {
quarantineOrderedVerballyFilter = new CheckBox();
quarantineOrderedVerballyFilter.setCaption(I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_ORDERED_VERBALLY));
CssStyles.style(quarantineOrderedVerballyFilter, CssStyles.CHECKBOX_FILTER_INLINE);
quarantineOrderedVerballyFilter.addValueChangeListener(e -> {
criteria.quarantineOrderedVerbally((Boolean) e.getProperty().getValue());
navigateTo(criteria);
});
thirdFilterRowLayout.addComponent(quarantineOrderedVerballyFilter);
quarantineOrderedOfficialDocumentFilter = new CheckBox();
quarantineOrderedOfficialDocumentFilter.setCaption(I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT));
CssStyles.style(quarantineOrderedOfficialDocumentFilter, CssStyles.CHECKBOX_FILTER_INLINE);
quarantineOrderedOfficialDocumentFilter.addValueChangeListener(e -> {
criteria.quarantineOrderedOfficialDocument((Boolean) e.getProperty().getValue());
navigateTo(criteria);
});
thirdFilterRowLayout.addComponent(quarantineOrderedOfficialDocumentFilter);
quarantineNotOrderedFilter = new CheckBox();
quarantineNotOrderedFilter.setCaption(I18nProperties.getCaption(Captions.contactQuarantineNotOrdered));
CssStyles.style(quarantineNotOrderedFilter, CssStyles.CHECKBOX_FILTER_INLINE);
quarantineNotOrderedFilter.addValueChangeListener(e -> {
criteria.quarantineNotOrdered((Boolean) e.getProperty().getValue());
navigateTo(criteria);
});
thirdFilterRowLayout.addComponent(quarantineNotOrderedFilter);
>>>>>>>
<<<<<<<
filterForm.setValue(criteria);
applyingCriteria = false;
=======
classificationFilter.setValue(criteria.getContactClassification());
diseaseFilter.setValue(criteria.getDisease());
regionFilter.setValue(criteria.getRegion());
districtFilter.setValue(criteria.getDistrict());
officerFilter.setValue(criteria.getContactOfficer());
followUpStatusFilter.setValue(criteria.getFollowUpStatus());
reportedByFilter.setValue(criteria.getReportingUserRole());
followUpUntilToFilter.setValue(criteria.getFollowUpUntilTo());
onlyHighPriorityContacts.setValue(criteria.getOnlyHighPriorityContacts());
onlyQuarantineHelpNeeded.setValue(criteria.getOnlyQuarantineHelpNeeded());
quarantineTypeFilter.setValue(criteria.getQuarantineType());
if (isGermanServer()) {
quarantineOrderedVerballyFilter.setValue(criteria.getQuarantineOrderedVerbally());
quarantineOrderedOfficialDocumentFilter.setValue(criteria.getQuarantineOrderedOfficialDocument());
quarantineNotOrderedFilter.setValue(criteria.getQuarantineNotOrdered());
}
quarantineToFilter.setValue(criteria.getQuarantineTo());
searchField.setValue(criteria.getNameUuidCaseLike());
if (categoryFilter != null) {
categoryFilter.setValue(criteria.getContactCategory());
}
caseClassificationFilter.setValue(criteria.getCaseClassification());
ContactDateType contactDateType = criteria.getReportDateFrom() != null ? ContactDateType.REPORT_DATE
: criteria.getLastContactDateFrom() != null ? ContactDateType.LAST_CONTACT_DATE : null;
weekAndDateFilter.getDateTypeSelector().setValue(contactDateType);
Date dateFrom = contactDateType == ContactDateType.REPORT_DATE ? criteria.getReportDateFrom()
: contactDateType == ContactDateType.LAST_CONTACT_DATE ? criteria.getLastContactDateFrom() : null;
Date dateTo = contactDateType == ContactDateType.REPORT_DATE ? criteria.getReportDateTo()
: contactDateType == ContactDateType.LAST_CONTACT_DATE ? criteria.getLastContactDateTo() : null;
// Reconstruct date/epi week choice
if ((dateFrom != null && dateTo != null && (DateHelper.getEpiWeekStart(DateHelper.getEpiWeek(dateFrom)).equals(dateFrom) && DateHelper.getEpiWeekEnd(DateHelper.getEpiWeek(dateTo)).equals(dateTo)))
|| (dateFrom != null && DateHelper.getEpiWeekStart(DateHelper.getEpiWeek(dateFrom)).equals(dateFrom))
|| (dateTo != null && DateHelper.getEpiWeekEnd(DateHelper.getEpiWeek(dateTo)).equals(dateTo))) {
weekAndDateFilter.getDateFilterOptionFilter().setValue(DateFilterOption.EPI_WEEK);
weekAndDateFilter.getWeekFromFilter().setValue(DateHelper.getEpiWeek(dateFrom));
weekAndDateFilter.getWeekToFilter().setValue(DateHelper.getEpiWeek(dateTo));
} else {
weekAndDateFilter.getDateFilterOptionFilter().setValue(DateFilterOption.DATE);
weekAndDateFilter.getDateFromFilter().setValue(dateFrom);
weekAndDateFilter.getDateToFilter().setValue(dateTo);
}
boolean hasExpandedFilter = FieldHelper.streamFields(secondFilterRowLayout)
.anyMatch(f -> !f.isEmpty());
hasExpandedFilter |= FieldHelper.streamFields(thirdFilterRowLayout)
.anyMatch(f -> !f.isEmpty());
hasExpandedFilter |= FieldHelper.streamFields(dateFilterRowLayout)
.filter(f -> f != weekAndDateFilter.getDateFilterOptionFilter())
.anyMatch(f -> !f.isEmpty());
if (hasExpandedFilter) {
setFiltersExpanded(true);
}
applyingCriteria = false;
>>>>>>>
filterForm.setValue(criteria);
applyingCriteria = false; |
<<<<<<<
PersonEditForm pef = new PersonEditForm(event.getDisease(), event.getDiseaseDetails(), null, inJurisdiction);
=======
PersonEditForm pef = new PersonEditForm(event.getDisease(), event.getDiseaseDetails(), null, true);
pef.setWidth(100, Unit.PERCENTAGE);
>>>>>>>
PersonEditForm pef = new PersonEditForm(event.getDisease(), event.getDiseaseDetails(), null, inJurisdiction);
pef.setWidth(100, Unit.PERCENTAGE); |
<<<<<<<
public void setNewCaseDateType(NewCaseDateType newCaseDateType) {
this.newCaseDateType = newCaseDateType;
=======
public CaseCriteria dateFilterOption(DateFilterOption dateFilterOption) {
this.dateFilterOption = dateFilterOption;
return this;
}
public DateFilterOption getDateFilterOption() {
return dateFilterOption;
}
public CaseCriteria person(PersonReferenceDto person) {
this.person = person;
return this;
>>>>>>>
public CaseCriteria dateFilterOption(DateFilterOption dateFilterOption) {
this.dateFilterOption = dateFilterOption;
return this;
}
public DateFilterOption getDateFilterOption() {
return dateFilterOption;
}
public void setNewCaseDateType(NewCaseDateType newCaseDateType) {
this.newCaseDateType = newCaseDateType; |
<<<<<<<
public String getSormasToSormasUserPassword() {
return getProperty(SORMAS_TO_SORMAS_USER_PASSWORD, null);
}
@Override
=======
public String getPatientDiaryUrl() {
return getProperty(INTERFACE_PATIENT_DIARY_URL, null);
}
@Override
>>>>>>>
public String getPatientDiaryUrl() {
return getProperty(INTERFACE_PATIENT_DIARY_URL, null);
}
@Override
public String getSormasToSormasUserPassword() {
return getProperty(SORMAS_TO_SORMAS_USER_PASSWORD, null);
}
@Override |
<<<<<<<
String contactReportingUserUuid, String contactRegionUuid, String contactDistrictUuid,
String contactCaseReportingUserUuid, String contactCaseRegionUuid, String contactCaseDistrictUuid, String contactCaseCommunityUuid, String contactCaseHealthFacilityUuid, String contactCasePointOfEntryUuid,
String eventReportingUserUuid, String eventOfficerUuid, String eventRegionUuid, String eventDistrictUuid, String eventCommunityUuid) {
=======
String contactReportingUserUuid, String contactRegionUuid, String contactDistrictUuid, String contactCommunityUuid,
String contactCaseReportingUserUuid, String contactCaseRegionUuid, String contactCaseDistrictUuid, String contactCaseCommunityUuid, String contactCaseHealthFacilityUuid, String contactCasePointOfEntryUuid) {
>>>>>>>
String contactReportingUserUuid, String contactRegionUuid, String contactDistrictUuid, String contactCommunityUuid,
String contactCaseReportingUserUuid, String contactCaseRegionUuid, String contactCaseDistrictUuid, String contactCaseCommunityUuid, String contactCaseHealthFacilityUuid, String contactCasePointOfEntryUuid,
String eventReportingUserUuid, String eventOfficerUuid, String eventRegionUuid, String eventDistrictUuid, String eventCommunityUuid) {
<<<<<<<
contactJurisdiction =
new ContactJurisdictionDto(contactReportingUserUuid, contactRegionUuid, contactDistrictUuid, contactCaseJurisdiction);
=======
this.contactJurisdiction = new ContactJurisdictionDto(
contactReportingUserUuid,
contactRegionUuid,
contactDistrictUuid,
contactCommunityUuid,
contactCaseJurisdiction);
>>>>>>>
contactJurisdiction = new ContactJurisdictionDto(
contactReportingUserUuid,
contactRegionUuid,
contactDistrictUuid,
contactCommunityUuid,
contactCaseJurisdiction); |
<<<<<<<
public static final String FOLLOW_UP_STATUS = "followUpStatus";
public static final String FOLLOW_UP_COMMENT = "followUpComment";
public static final String FOLLOW_UP_UNTIL = "followUpUntil";
public static final String OVERWRITE_FOLLOW_UP_UNTIL = "overwriteFollowUpUntil";
public static final String VISITS = "visits";
=======
public static final String FACILITY_TYPE = "facilityType";
>>>>>>>
public static final String FOLLOW_UP_STATUS = "followUpStatus";
public static final String FOLLOW_UP_COMMENT = "followUpComment";
public static final String FOLLOW_UP_UNTIL = "followUpUntil";
public static final String OVERWRITE_FOLLOW_UP_UNTIL = "overwriteFollowUpUntil";
public static final String VISITS = "visits";
public static final String FACILITY_TYPE = "facilityType";
<<<<<<<
@Enumerated(EnumType.STRING)
public FollowUpStatus getFollowUpStatus() {
return followUpStatus;
}
public void setFollowUpStatus(FollowUpStatus followUpStatus) {
this.followUpStatus = followUpStatus;
}
@Column(length = COLUMN_LENGTH_BIG)
public String getFollowUpComment() {
return followUpComment;
}
public void setFollowUpComment(String followUpComment) {
this.followUpComment = followUpComment;
}
@Temporal(TemporalType.TIMESTAMP)
public Date getFollowUpUntil() {
return followUpUntil;
}
public void setFollowUpUntil(Date followUpUntil) {
this.followUpUntil = followUpUntil;
}
@Column
public boolean isOverwriteFollowUpUntil() {
return overwriteFollowUpUntil;
}
public void setOverwriteFollowUpUntil(boolean overwriteFollowUpUntil) {
this.overwriteFollowUpUntil = overwriteFollowUpUntil;
}
=======
@Enumerated(EnumType.STRING)
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType facilityType) {
this.facilityType = facilityType;
}
>>>>>>>
@Enumerated(EnumType.STRING)
public FollowUpStatus getFollowUpStatus() {
return followUpStatus;
}
public void setFollowUpStatus(FollowUpStatus followUpStatus) {
this.followUpStatus = followUpStatus;
}
@Column(length = COLUMN_LENGTH_BIG)
public String getFollowUpComment() {
return followUpComment;
}
public void setFollowUpComment(String followUpComment) {
this.followUpComment = followUpComment;
}
@Temporal(TemporalType.TIMESTAMP)
public Date getFollowUpUntil() {
return followUpUntil;
}
public void setFollowUpUntil(Date followUpUntil) {
this.followUpUntil = followUpUntil;
}
@Column
public boolean isOverwriteFollowUpUntil() {
return overwriteFollowUpUntil;
}
public void setOverwriteFollowUpUntil(boolean overwriteFollowUpUntil) {
this.overwriteFollowUpUntil = overwriteFollowUpUntil;
}
@Enumerated(EnumType.STRING)
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType facilityType) {
this.facilityType = facilityType;
} |
<<<<<<<
import de.symeda.sormas.api.utils.DateHelper;
import de.symeda.sormas.ui.utils.ButtonHelper;
=======
>>>>>>>
import de.symeda.sormas.ui.utils.ButtonHelper; |
<<<<<<<
=======
private ConfigFacadeEjbLocal configFacade;
@EJB
private PseudonymizationService pseudonymizationService;
@EJB
>>>>>>>
private ConfigFacadeEjbLocal configFacade;
@EJB
<<<<<<<
restorePseudonymizedDto(source, person, existingPerson);
=======
// if (person != null && existingPerson != null) {
// boolean isInJurisdiction = isPersonInJurisdiction(person);
// pseudonymizationService.restorePseudonymizedValues(PersonDto.class, source, existingPerson, isInJurisdiction);
// pseudonymizationService.restorePseudonymizedValues(LocationDto.class, source.getAddress(), existingPerson.getAddress(), isInJurisdiction);
// }
>>>>>>>
restorePseudonymizedDto(source, person, existingPerson);
<<<<<<<
pseudonymizeDto(person, dto, pseudonymizer);
return dto;
}
private void pseudonymizeDto(Person person, PersonDto dto, Pseudonymizer pseudonymizer) {
if (dto != null) {
boolean isInJurisdiction = isPersonInJurisdiction(person);
pseudonymizer.pseudonymizeDto(PersonDto.class, dto, isInJurisdiction, p -> {
pseudonymizer.pseudonymizeDto(LocationDto.class, p.getAddress(), isInJurisdiction, null);
});
}
}
=======
// if (dto != null) {
// boolean isInJurisdiction = isPersonInJurisdiction(person);
//
// pseudonymizationService.pseudonymizeDto(PersonDto.class, dto, isInJurisdiction, p -> {
// pseudonymizationService.pseudonymizeDto(LocationDto.class, p.getAddress(), isInJurisdiction, null);
// });
// }
>>>>>>>
pseudonymizeDto(person, dto, pseudonymizer);
return dto;
}
private void pseudonymizeDto(Person person, PersonDto dto, Pseudonymizer pseudonymizer) {
if (dto != null) {
boolean isInJurisdiction = isPersonInJurisdiction(person);
pseudonymizer.pseudonymizeDto(PersonDto.class, dto, isInJurisdiction, p -> {
pseudonymizer.pseudonymizeDto(LocationDto.class, p.getAddress(), isInJurisdiction, null);
});
}
} |
<<<<<<<
import io.nuls.transaction.model.bo.Chain;
=======
import io.nuls.transaction.message.BroadcastTxMessage;
import io.nuls.transaction.message.TransactionMessage;
>>>>>>>
import io.nuls.transaction.message.BroadcastTxMessage;
import io.nuls.transaction.message.TransactionMessage;
import io.nuls.transaction.model.bo.Chain;
<<<<<<<
BlockHeaderDigest blockHeaderDigest = TxUtil.getInstance((String)params.get("secondaryDataHex"), BlockHeaderDigest.class);
result = confirmedTransactionService.saveTxList(chain, txHashList, blockHeaderDigest);
=======
BlockHeaderDigest blockHeaderDigest = TxUtil.getInstance((String) secondaryDataHexObj, BlockHeaderDigest.class);
result = confirmedTransactionService.saveTxList(chainManager.getChain(chainId), txHashList, blockHeaderDigest);
>>>>>>>
BlockHeaderDigest blockHeaderDigest = TxUtil.getInstance((String)params.get("secondaryDataHex"), BlockHeaderDigest.class);
result = confirmedTransactionService.saveTxList(chain, txHashList, blockHeaderDigest);
<<<<<<<
public Response batchVerify(Map params){
Map<String, Boolean> map = new HashMap<>(TxConstant.INIT_CAPACITY);
=======
public Response batchVerify(Map params) {
Map<String, Boolean> map = new HashMap<>();
>>>>>>>
public Response batchVerify(Map params){
Map<String, Boolean> map = new HashMap<>(TxConstant.INIT_CAPACITY);
<<<<<<<
/**
* Delete transactions that have been packaged into blocks from the database, block rollback, etc.
*
* @param params
* @return
*/
/* @CmdAnnotation(cmd = TxCmd.TX_DELETE, version = 1.0, description = "Delete transaction")
public Response delete(Map params) {
return success("success");
}*/
/**
* Returns the relationship list of the transaction and its corresponding commit processor and rollback processor
*
* @param params
* @return
*/
/* @CmdAnnotation(cmd = TxCmd.TX_GETTXPROCESSORS, version = 1.0, description = "")
public Response getTxProcessors(List params) {
return success("success");
}
*/
=======
/**
* 接收广播的新交易hash
* receive new transaction hash
*
* @param params
* @return
*/
@CmdAnnotation(cmd = TxCmd.NW_NEW_HASH, version = 1.0, description = "receive new transaction hash")
@Parameter(parameterName = KEY_CHAINI_D, parameterType = "int")
public Response newHash(Map params) {
Map<String, Boolean> map = new HashMap<>();
boolean result = false;
try {
Integer chainId = Integer.parseInt(map.get(KEY_CHAINI_D).toString());
BroadcastTxMessage message = new BroadcastTxMessage();
byte[] decode = HexUtil.decode(map.get(KEY_MESSAGE_BODY).toString());
message.parse(new NulsByteBuffer(decode));
if (message == null) {
return failed(TxErrorCode.PARAMETER_ERROR);
}
} catch (NulsException e) {
return failed(e.getErrorCode());
} catch (Exception e) {
return failed(TxErrorCode.SYS_UNKOWN_EXCEPTION);
}
map.put("value", result);
return success(map);
}
/**
* 接收其他节点的新交易
* receive new transactions from other nodes
*
* @param params
* @return
*/
@CmdAnnotation(cmd = TxCmd.NW_RECEIVE_TX, version = 1.0, description = "receive new transactions from other nodes")
@Parameter(parameterName = KEY_CHAINI_D, parameterType = "int")
public Response receiveTx(Map params) {
Map<String, Boolean> map = new HashMap<>();
boolean result = false;
try {
Integer chainId = Integer.parseInt(map.get(KEY_CHAINI_D).toString());
TransactionMessage message = new TransactionMessage();
byte[] decode = HexUtil.decode(map.get(KEY_MESSAGE_BODY).toString());
message.parse(new NulsByteBuffer(decode));
if (message == null) {
return failed(TxErrorCode.PARAMETER_ERROR);
}
Transaction transaction = message.getTx();
//将交易放入待验证本地交易队列中
result = transactionService.newTx(chainManager.getChain(chainId), transaction);
} catch (NulsException e) {
return failed(e.getErrorCode());
} catch (Exception e) {
return failed(TxErrorCode.SYS_UNKOWN_EXCEPTION);
}
map.put("value", result);
return success(map);
}
>>>>>>>
/**
* 接收广播的新交易hash
* receive new transaction hash
*
* @param params
* @return
*/
@CmdAnnotation(cmd = TxCmd.NW_NEW_HASH, version = 1.0, description = "receive new transaction hash")
@Parameter(parameterName = KEY_CHAINI_D, parameterType = "int")
public Response newHash(Map params) {
Map<String, Boolean> map = new HashMap<>();
boolean result = false;
try {
Integer chainId = Integer.parseInt(map.get(KEY_CHAINI_D).toString());
BroadcastTxMessage message = new BroadcastTxMessage();
byte[] decode = HexUtil.decode(map.get(KEY_MESSAGE_BODY).toString());
message.parse(new NulsByteBuffer(decode));
if (message == null) {
return failed(TxErrorCode.PARAMETER_ERROR);
}
} catch (NulsException e) {
return failed(e.getErrorCode());
} catch (Exception e) {
return failed(TxErrorCode.SYS_UNKOWN_EXCEPTION);
}
map.put("value", result);
return success(map);
}
/**
* 接收其他节点的新交易
* receive new transactions from other nodes
*
* @param params
* @return
*/
@CmdAnnotation(cmd = TxCmd.NW_RECEIVE_TX, version = 1.0, description = "receive new transactions from other nodes")
@Parameter(parameterName = KEY_CHAINI_D, parameterType = "int")
public Response receiveTx(Map params) {
Map<String, Boolean> map = new HashMap<>();
boolean result = false;
try {
Integer chainId = Integer.parseInt(map.get(KEY_CHAINI_D).toString());
TransactionMessage message = new TransactionMessage();
byte[] decode = HexUtil.decode(map.get(KEY_MESSAGE_BODY).toString());
message.parse(new NulsByteBuffer(decode));
if (message == null) {
return failed(TxErrorCode.PARAMETER_ERROR);
}
Transaction transaction = message.getTx();
//将交易放入待验证本地交易队列中
result = transactionService.newTx(chainManager.getChain(chainId), transaction);
} catch (NulsException e) {
return failed(e.getErrorCode());
} catch (Exception e) {
return failed(TxErrorCode.SYS_UNKOWN_EXCEPTION);
}
map.put("value", result);
return success(map);
} |
<<<<<<<
@SuppressWarnings({
"rawtypes",
"hiding" })
protected <T extends Field> T addField(CustomLayout layout, String propertyId, Class<T> fieldType) {
T field = createField(propertyId, fieldType);
=======
@SuppressWarnings("rawtypes")
protected <F extends Field> F addField(CustomLayout layout, String propertyId, Class<F> fieldType) {
F field = getFieldGroup().buildAndBind(propertyId, (Object) propertyId, fieldType);
>>>>>>>
@SuppressWarnings("rawtypes")
protected <F extends Field> F addField(CustomLayout layout, String propertyId, Class<F> fieldType) {
F field = createField(propertyId, fieldType);
<<<<<<<
protected <T extends Field> T createField(String propertyId, Class<T> fieldType) {
return getFieldGroup().buildAndBind(propertyId, (Object) propertyId, fieldType);
}
protected <T extends Field<?>> T addCustomField(FieldConfiguration fieldConfiguration, Class<?> dataType, Class<T> fieldType) {
T field = addCustomField(fieldConfiguration.getPropertyId(), dataType, fieldType);
=======
protected <F extends Field<?>> F addCustomField(FieldConfiguration fieldConfiguration, Class<?> dataType, Class<F> fieldType) {
F field = addCustomField(fieldConfiguration.getPropertyId(), dataType, fieldType);
>>>>>>>
protected <T extends Field> T createField(String propertyId, Class<T> fieldType) {
return getFieldGroup().buildAndBind(propertyId, (Object) propertyId, fieldType);
}
protected <F extends Field<?>> F addCustomField(FieldConfiguration fieldConfiguration, Class<?> dataType, Class<F> fieldType) {
F field = addCustomField(fieldConfiguration.getPropertyId(), dataType, fieldType);
<<<<<<<
protected <T extends Field> T addDateField(String propertyId, Class<T> fieldType, int allowedDaysInFuture) {
T field = createField(propertyId, fieldType);
=======
protected <F extends Field> F addDateField(String propertyId, Class<F> fieldType, int allowedDaysInFuture) {
F field = getFieldGroup().buildAndBind(propertyId, (Object) propertyId, fieldType);
>>>>>>>
protected <F extends Field> F addDateField(String propertyId, Class<F> fieldType, int allowedDaysInFuture) {
F field = createField(propertyId, fieldType); |
<<<<<<<
target.setSormasToSormasOriginInfo(
sormasToSormasOriginInfoDtoHelper.fillOrCreateFromDto(target.getSormasToSormasOriginInfo(), source.getSormasToSormasOriginInfo()));
target.setOwnershipHandedOver(source.isOwnershipHandedOver());
=======
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
>>>>>>>
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
target.setSormasToSormasOriginInfo(
sormasToSormasOriginInfoDtoHelper.fillOrCreateFromDto(target.getSormasToSormasOriginInfo(), source.getSormasToSormasOriginInfo()));
target.setOwnershipHandedOver(source.isOwnershipHandedOver());
<<<<<<<
if (source.getSormasToSormasOriginInfo() != null) {
target.setSormasToSormasOriginInfo(sormasToSormasOriginInfoDtoHelper.adoToDto(source.getSormasToSormasOriginInfo()));
}
=======
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
>>>>>>>
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
if (source.getSormasToSormasOriginInfo() != null) {
target.setSormasToSormasOriginInfo(sormasToSormasOriginInfoDtoHelper.adoToDto(source.getSormasToSormasOriginInfo()));
} |
<<<<<<<
import de.symeda.sormas.api.contact.FollowUpStatus;
=======
import org.apache.commons.lang3.StringUtils;
>>>>>>>
import de.symeda.sormas.api.contact.FollowUpStatus;
import org.apache.commons.lang3.StringUtils; |
<<<<<<<
import de.symeda.sormas.ui.utils.NullableOptionGroup;
=======
import de.symeda.sormas.ui.utils.VaadinUiUtil;
>>>>>>>
import de.symeda.sormas.ui.utils.VaadinUiUtil;
import de.symeda.sormas.ui.utils.NullableOptionGroup; |
<<<<<<<
import com.vaadin.v7.data.util.converter.Converter;
=======
import com.vaadin.v7.ui.AbstractSelect;
>>>>>>>
import com.vaadin.v7.ui.AbstractSelect;
import com.vaadin.v7.data.util.converter.Converter;
<<<<<<<
import de.symeda.sormas.api.facility.FacilityDto;
import de.symeda.sormas.api.facility.FacilityType;
import de.symeda.sormas.api.facility.FacilityTypeGroup;
=======
import de.symeda.sormas.api.contact.ContactDto;
>>>>>>>
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.facility.FacilityDto;
import de.symeda.sormas.api.facility.FacilityType;
import de.symeda.sormas.api.facility.FacilityTypeGroup;
<<<<<<<
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT,
CaseDataDto.COMMUNITY, CaseCriteria.FACILITY_TYPE_GROUP, CaseCriteria.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY, CaseDataDto.POINT_OF_ENTRY)
+ filterLocs(CaseCriteria.PRESENT_CONDITION, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO)
=======
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseCriteria.PRESENT_CONDITION,
CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY, CaseDataDto.HEALTH_FACILITY,
CaseDataDto.POINT_OF_ENTRY, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO,
CaseCriteria.BIRTHDATE_YYYY,
CaseCriteria.BIRTHDATE_MM,
CaseCriteria.BIRTHDATE_DD)
>>>>>>>
private static final String MORE_FILTERS_HTML_LAYOUT = filterLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT,
CaseDataDto.COMMUNITY, CaseCriteria.FACILITY_TYPE_GROUP, CaseCriteria.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY, CaseDataDto.POINT_OF_ENTRY)
+ filterLocs(CaseCriteria.PRESENT_CONDITION, CaseDataDto.SURVEILLANCE_OFFICER, CaseCriteria.REPORTING_USER_ROLE,
CaseCriteria.REPORTING_USER_LIKE, CaseDataDto.QUARANTINE_TO,
CaseCriteria.BIRTHDATE_YYYY,
CaseCriteria.BIRTHDATE_MM,
CaseCriteria.BIRTHDATE_DD) |
<<<<<<<
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.nullValue;
import static org.mockito.Mockito.when;
=======
>>>>>>>
<<<<<<<
assertNotPseudonymized(getContactFacade().getContactByUuid(contact.getUuid()), true);
=======
assertNotPseudonymized(getContactFacade().getContactByUuid(contact.getUuid()));
>>>>>>>
assertNotPseudonymized(getContactFacade().getContactByUuid(contact.getUuid()), true);
<<<<<<<
public void testPseudonymizeGetByUuids() {
=======
public void testPseudonymizeGetByUuids() {
>>>>>>>
public void testPseudonymizeGetByUuids() {
<<<<<<<
assertNotPseudonymized(contacts.stream().filter(c -> c.getUuid().equals(contact1.getUuid())).findFirst().get(), false);
=======
assertNotPseudonymized(contacts.stream().filter(c -> c.getUuid().equals(contact1.getUuid())).findFirst().get());
>>>>>>>
assertNotPseudonymized(contacts.stream().filter(c -> c.getUuid().equals(contact1.getUuid())).findFirst().get(), false);
<<<<<<<
public void testPseudonymizeIndexData() {
=======
public void testPseudonymizeIndexData() {
>>>>>>>
public void testPseudonymizeIndexData() {
<<<<<<<
public void testPseudonymizeIndexDetailedData() {
CaseDataDto caze = createCase(user1, rdcf1);
ContactDto contact1 = createContact(user2, caze, rdcf2);
// contact of case on other jurisdiction --> should be pseudonymized
ContactDto contact2 = creator.createContact(user1.toReference(), null, createPerson().toReference(), caze, new Date(), new Date(), Disease.CORONAVIRUS, rdcf2);
List<ContactIndexDetailedDto> indexList = getContactFacade().getIndexDetailedList(new ContactCriteria(), null, null, Collections.emptyList());
ContactIndexDetailedDto index1 = indexList.stream().filter(c -> c.getUuid().equals(contact1.getUuid())).findFirst().get();
assertThat(index1.getFirstName(), is("James"));
assertThat(index1.getLastName(), is("Smith"));
assertThat(index1.getCaze().getFirstName(), is(isEmptyString()));
assertThat(index1.getCaze().getLastName(), is(isEmptyString()));
assertThat(index1.getReportingUser().getUuid(), is(user2.getUuid()));
ContactIndexDetailedDto index2 = indexList.stream().filter(c -> c.getUuid().equals(contact2.getUuid())).findFirst().get();
assertThat(index2.getFirstName(), isEmptyString());
assertThat(index2.getLastName(), isEmptyString());
assertThat(index2.getCaze().getFirstName(), isEmptyString());
assertThat(index2.getCaze().getLastName(), isEmptyString());
assertThat(index2.getReportingUser(), is(nullValue()));
}
@Test
public void testPseudonymizeExportData() {
=======
public void testPseudonymizeExportData() {
>>>>>>>
public void testPseudonymizeIndexDetailedData() {
CaseDataDto caze = createCase(user1, rdcf1);
ContactDto contact1 = createContact(user2, caze, rdcf2);
// contact of case on other jurisdiction --> should be pseudonymized
ContactDto contact2 = creator.createContact(user1.toReference(), null, createPerson().toReference(), caze, new Date(), new Date(), Disease.CORONAVIRUS, rdcf2);
List<ContactIndexDetailedDto> indexList = getContactFacade().getIndexDetailedList(new ContactCriteria(), null, null, Collections.emptyList());
ContactIndexDetailedDto index1 = indexList.stream().filter(c -> c.getUuid().equals(contact1.getUuid())).findFirst().get();
assertThat(index1.getFirstName(), is("James"));
assertThat(index1.getLastName(), is("Smith"));
assertThat(index1.getCaze().getFirstName(), is(isEmptyString()));
assertThat(index1.getCaze().getLastName(), is(isEmptyString()));
assertThat(index1.getReportingUser().getUuid(), is(user2.getUuid()));
ContactIndexDetailedDto index2 = indexList.stream().filter(c -> c.getUuid().equals(contact2.getUuid())).findFirst().get();
assertThat(index2.getFirstName(), isEmptyString());
assertThat(index2.getLastName(), isEmptyString());
assertThat(index2.getCaze().getFirstName(), isEmptyString());
assertThat(index2.getCaze().getLastName(), isEmptyString());
assertThat(index2.getReportingUser(), is(nullValue()));
}
@Test
public void testPseudonymizeExportData() {
<<<<<<<
public void testPseudonymizeGetMatchingContacts() {
=======
public void testPseudonymizeGetMatchingContacts() {
>>>>>>>
public void testPseudonymizeGetMatchingContacts() {
<<<<<<<
public void testPseudonymizeGetFollowupList() {
=======
public void testPseudonymizeGetFollowupList() {
>>>>>>>
public void testPseudonymizeGetFollowupList() {
<<<<<<<
@Test
public void testUpdateContactOutsideJurisdiction() {
CaseDataDto caze = createCase(user1, rdcf1);
ContactDto contact = createContact(user1, caze, rdcf1);
// contact of case on other jurisdiction --> should be pseudonymized
creator.createContact(user1.toReference(), null, createPerson().toReference(), getCaseFacade().getCaseDataByUuid(contact.getCaze().getUuid()), new Date(), new Date(), Disease.CORONAVIRUS, rdcf2);
contact.setReportingUser(null);
contact.setContactOfficer(null);
contact.setResultingCaseUser(null);
contact.setReportLat(null);
contact.setReportLon(null);
contact.setReportLatLonAccuracy(null);
getContactFacade().saveContact(contact);
Contact updatedContact = getContactService().getByUuid(contact.getUuid());
assertThat(updatedContact.getReportingUser().getUuid(), is(user1.getUuid()));
assertThat(updatedContact.getContactOfficer().getUuid(), is(user1.getUuid()));
assertThat(updatedContact.getResultingCaseUser(), is(nullValue()));
assertThat(updatedContact.getReportLat(), is(43.4354));
assertThat(updatedContact.getReportLon(), is(23.4354));
assertThat(updatedContact.getReportLatLonAccuracy(), is(10F));
}
@Test
public void testUpdateContactInJurisdictionWithPseudonymizedDto() {
CaseDataDto caze = createCase(user2, rdcf2);
ContactDto contact = createContact(user2, caze, rdcf2);
contact.setPseudonymized(true);
contact.setReportingUser(null);
contact.setContactOfficer(null);
contact.setResultingCaseUser(null);
contact.setReportLat(null);
contact.setReportLon(null);
contact.setReportLatLonAccuracy(null);
getContactFacade().saveContact(contact);
Contact updatedContact = getContactService().getByUuid(contact.getUuid());
assertThat(updatedContact.getReportingUser().getUuid(), is(user2.getUuid()));
assertThat(updatedContact.getContactOfficer().getUuid(), is(user2.getUuid()));
assertThat(updatedContact.getResultingCaseUser(), is(nullValue()));
assertThat(updatedContact.getReportLat(), is(43.4354));
assertThat(updatedContact.getReportLon(), is(23.4354));
assertThat(updatedContact.getReportLatLonAccuracy(), is(10F));
}
private void assertNotPseudonymized(ContactDto contact, boolean caseInJurisdiction) {
=======
private void assertNotPseudonymized(ContactDto contact) {
>>>>>>>
@Test
public void testUpdateContactOutsideJurisdiction() {
CaseDataDto caze = createCase(user1, rdcf1);
ContactDto contact = createContact(user1, caze, rdcf1);
// contact of case on other jurisdiction --> should be pseudonymized
creator.createContact(user1.toReference(), null, createPerson().toReference(), getCaseFacade().getCaseDataByUuid(contact.getCaze().getUuid()), new Date(), new Date(), Disease.CORONAVIRUS, rdcf2);
contact.setReportingUser(null);
contact.setContactOfficer(null);
contact.setResultingCaseUser(null);
contact.setReportLat(null);
contact.setReportLon(null);
contact.setReportLatLonAccuracy(null);
getContactFacade().saveContact(contact);
Contact updatedContact = getContactService().getByUuid(contact.getUuid());
assertThat(updatedContact.getReportingUser().getUuid(), is(user1.getUuid()));
assertThat(updatedContact.getContactOfficer().getUuid(), is(user1.getUuid()));
assertThat(updatedContact.getResultingCaseUser(), is(nullValue()));
assertThat(updatedContact.getReportLat(), is(43.4354));
assertThat(updatedContact.getReportLon(), is(23.4354));
assertThat(updatedContact.getReportLatLonAccuracy(), is(10F));
}
@Test
public void testUpdateContactInJurisdictionWithPseudonymizedDto() {
CaseDataDto caze = createCase(user2, rdcf2);
ContactDto contact = createContact(user2, caze, rdcf2);
contact.setPseudonymized(true);
contact.setReportingUser(null);
contact.setContactOfficer(null);
contact.setResultingCaseUser(null);
contact.setReportLat(null);
contact.setReportLon(null);
contact.setReportLatLonAccuracy(null);
getContactFacade().saveContact(contact);
Contact updatedContact = getContactService().getByUuid(contact.getUuid());
assertThat(updatedContact.getReportingUser().getUuid(), is(user2.getUuid()));
assertThat(updatedContact.getContactOfficer().getUuid(), is(user2.getUuid()));
assertThat(updatedContact.getResultingCaseUser(), is(nullValue()));
assertThat(updatedContact.getReportLat(), is(43.4354));
assertThat(updatedContact.getReportLon(), is(23.4354));
assertThat(updatedContact.getReportLatLonAccuracy(), is(10F));
}
private void assertNotPseudonymized(ContactDto contact, boolean caseInJurisdiction) {
<<<<<<<
return creator.createContact(reportingUser.toReference(), reportingUser.toReference(), createPerson().toReference(), caze,
new Date(), new Date(), Disease.CORONAVIRUS, rdcf, c -> {
c.setResultingCaseUser(reportingUser.toReference());
c.setReportLat(43.4354);
c.setReportLon(23.4354);
c.setReportLatLonAccuracy(10F);
});
=======
return creator
.createContact(reportingUser.toReference(), null, createPerson().toReference(), caze, new Date(), new Date(), Disease.CORONAVIRUS, rdcf);
>>>>>>>
return creator
.createContact(reportingUser.toReference(), reportingUser.toReference(), createPerson().toReference(), caze, new Date(), new Date(), Disease.CORONAVIRUS, rdcf, c -> {
c.setResultingCaseUser(reportingUser.toReference());
c.setReportLat(43.4354);
c.setReportLon(23.4354);
c.setReportLatLonAccuracy(10F);
}); |
<<<<<<<
import com.google.common.base.Preconditions;
=======
import com.google.common.base.Strings;
import net.gegy1000.earth.server.EarthDecorationEventHandler;
>>>>>>>
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
<<<<<<<
import net.gegy1000.earth.server.world.pipeline.source.WorldClimateDataset;
import net.gegy1000.terrarium.server.capability.VoidStorage;
import net.minecraft.world.WorldType;
=======
import net.gegy1000.terrarium.server.capability.BlankStorage;
import net.gegy1000.terrarium.server.world.pipeline.source.Geocoder;
import net.minecraftforge.common.MinecraftForge;
>>>>>>>
import net.gegy1000.earth.server.world.pipeline.source.WorldClimateDataset;
import net.gegy1000.terrarium.server.capability.VoidStorage;
import net.gegy1000.terrarium.server.world.pipeline.source.Geocoder;
import net.minecraft.world.WorldType;
<<<<<<<
@Nonnull
public static WorldClimateDataset getClimateDataset() {
Preconditions.checkNotNull(climateDataset, "Climate dataset not yet loaded!");
return climateDataset;
}
=======
public static Geocoder getPreferredGeocoder() {
if (TerrariumEarthConfig.osmGeocoder || Strings.isNullOrEmpty(EarthRemoteData.info.getGeocoderKey())) {
return new NominatimGeocoder();
} else {
return new GoogleGeocoder();
}
}
>>>>>>>
@Nonnull
public static WorldClimateDataset getClimateDataset() {
Preconditions.checkNotNull(climateDataset, "Climate dataset not yet loaded!");
return climateDataset;
}
public static Geocoder getPreferredGeocoder() {
if (TerrariumEarthConfig.osmGeocoder || Strings.isNullOrEmpty(EarthRemoteData.info.getGeocoderKey())) {
return new NominatimGeocoder();
} else {
return new GoogleGeocoder();
}
} |
<<<<<<<
this.teleport(player, earthData, location.getCoordinate(sender, earthData));
=======
this.teleport(entity, location.getCoordinate(sender, earthData));
>>>>>>>
this.teleport(entity, earthData, location.getCoordinate(sender, earthData));
<<<<<<<
private void teleport(EntityPlayerMP player, EarthCapability earthData, Coordinate coordinate) {
=======
private void teleport(Entity entity, Coordinate coordinate) {
>>>>>>>
private void teleport(Entity entity, EarthCapability earthData, Coordinate coordinate) { |
<<<<<<<
import org.gridgain.examples.*;
=======
import org.gridgain.examples.*;
import org.gridgain.examples.compute.*;
>>>>>>>
import org.gridgain.examples.*;
import org.gridgain.examples.compute.*;
<<<<<<<
* Example that demonstrates how to exchange messages between nodes.
* <p>
* To run this example you must have at least one remote node started.
=======
* Example that demonstrates how to exchange messages between nodes. Use such
* functionality for cases when you need to communicate to other nodes outside
* of grid task.
>>>>>>>
* Example that demonstrates how to exchange messages between nodes. Use such
* functionality for cases when you need to communicate to other nodes outside
* of grid task.
* <p>
* To run this example you must have at least one remote node started. |
<<<<<<<
return getAllAsync(keys, null, false, subjId, deserializePortable, filter).get();
=======
return getAllAsync(keys, null, false, subjId, false, filter).get();
>>>>>>>
return getAllAsync(keys, null, false, subjId, deserializePortable, false, filter).get(); |
<<<<<<<
invalidate, syncCommit, syncRollback, swapOrOffheapEnabled, storeEnabled, txSize, grpLockKey, partLock);
=======
invalidate, syncCommit, syncRollback, swapEnabled, storeEnabled, txSize, grpLockKey, partLock, subjId);
>>>>>>>
invalidate, syncCommit, syncRollback, swapOrOffheapEnabled, storeEnabled, txSize, grpLockKey, partLock, subjId); |
<<<<<<<
import org.gridgain.grid.kernal.processors.ggfs.*;
import org.gridgain.grid.kernal.processors.hadoop.*;
=======
>>>>>>>
import org.gridgain.grid.kernal.processors.ggfs.*;
import org.gridgain.grid.kernal.processors.hadoop.*;
<<<<<<<
GridGgfsProcessorAdapter ggfsProc = GGFS.create(ctx, F.isEmpty(cfg.getGgfsConfiguration()));
GridHadoopProcessorAdapter hadoopProc =
GridComponentType.HADOOP.create(ctx, cfg.getHadoopConfiguration() == null);
ctx.add(ggfsProc);
=======
>>>>>>> |
<<<<<<<
final boolean replicate = ctx.isReplicationEnabled();
final long topVer = ctx.affinity().affinityTopologyVersion();
=======
final boolean replicate = ctx.isDrEnabled();
>>>>>>>
final boolean replicate = ctx.isDrEnabled();
final long topVer = ctx.affinity().affinityTopologyVersion(); |
<<<<<<<
* @param throwable the throwable to introspect for a cause, may be null.
* @param mtdNames the method names, null treated as default set.
* @return the cause of the <code>Throwable</code>, <code>null</code> if none found or null throwable input.
=======
* @param throwable the throwable to introspect for a cause, may be null
* @param mtdNames the method names, null treated as default set
* @return the cause of the <code>Throwable</code>, <code>null</code> if none found or null throwable input
>>>>>>>
* @param throwable the throwable to introspect for a cause, may be null.
* @param mtdNames the method names, null treated as default set.
* @return the cause of the <code>Throwable</code>, <code>null</code> if none found or null throwable input.
<<<<<<<
=======
}
>>>>>>>
<<<<<<<
if (cause != null)
=======
if (cause != null)
>>>>>>>
if (cause != null)
if (cause != null)
<<<<<<<
* @param throwable the throwable to inspect, may be null
* @return the list of throwables, never null
=======
* @param throwable The throwable to inspect, may be null.
* @return The list of throwables, never null.
>>>>>>>
* @param throwable the throwable to inspect, may be null
* @return the list of throwables, never null
<<<<<<<
if (isNestedThrowable(t))
=======
if (isNestedThrowable(t))
>>>>>>>
if (isNestedThrowable(t)) |
<<<<<<<
import static org.gridgain.grid.ggfs.hadoop.GridGgfsHadoopParameters.*;
=======
import static org.gridgain.grid.kernal.processors.hadoop.GridHadoopUtils.*;
>>>>>>>
import static org.gridgain.grid.ggfs.hadoop.GridGgfsHadoopParameters.*;
import static org.gridgain.grid.kernal.processors.hadoop.GridHadoopUtils.*;
<<<<<<<
jobConf = new JobConf(jobInfo.configuration());
jobConf.setBooleanIfUnset(PARAM_GGFS_PREFER_LOCAL_WRITES, true);
jobCtx = new JobContextImpl(jobConf, hadoopJobID);
=======
GridHadoopClassLoader clsLdr = (GridHadoopClassLoader)getClass().getClassLoader();
// Before create JobConf instance we should set new context class loader.
Thread.currentThread().setContextClassLoader(clsLdr);
jobConf = new JobConf();
>>>>>>>
GridHadoopClassLoader clsLdr = (GridHadoopClassLoader)getClass().getClassLoader();
// Before create JobConf instance we should set new context class loader.
Thread.currentThread().setContextClassLoader(clsLdr);
jobConf = new JobConf();
// For map-reduce jobs prefer local writes.
jobConf.setBooleanIfUnset(PARAM_GGFS_PREFER_LOCAL_WRITES, true); |
<<<<<<<
suite.addTest(new TestSuite(GridCachePartitionedSetSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSetFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetFailoverSelfTest.class));
=======
suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class));
>>>>>>>
suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSetSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedSetFailoverSelfTest.class));
suite.addTest(new TestSuite(GridCachePartitionedAtomicSetFailoverSelfTest.class)); |
<<<<<<<
=======
/** Default max queue capacity of GGFS thread pool. */
public static final int DFLT_GGFS_THREADPOOL_QUEUE_CAP = 16;
/** Default size of REST thread pool. */
public static final int DFLT_REST_CORE_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default max size of REST thread pool. */
public static final int DFLT_REST_MAX_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default keep alive time for REST thread pool. */
public static final long DFLT_REST_KEEP_ALIVE_TIME = 0;
/** Default max queue capacity of REST thread pool. */
public static final int DFLT_REST_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE;
>>>>>>>
/** Default max queue capacity of GGFS thread pool. */
public static final int DFLT_GGFS_THREADPOOL_QUEUE_CAP = 16;
/** Default size of REST thread pool. */
public static final int DFLT_REST_CORE_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default max size of REST thread pool. */
public static final int DFLT_REST_MAX_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default keep alive time for REST thread pool. */
public static final long DFLT_REST_KEEP_ALIVE_TIME = 0;
/** Default max queue capacity of REST thread pool. */
public static final int DFLT_REST_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE;
<<<<<<<
/** Hadoop configuration. */
private GridHadoopConfiguration hadoopCfg;
=======
/** Security credentials. */
private GridSecurityCredentialsProvider securityCred;
>>>>>>>
/** Security credentials. */
private GridSecurityCredentialsProvider securityCred;
/** Hadoop configuration. */
private GridHadoopConfiguration hadoopCfg;
<<<<<<<
/**
* Gets hadoop configuration.
*
* @return Hadoop configuration.
*/
public GridHadoopConfiguration getHadoopConfiguration() {
return hadoopCfg;
}
/**
* Sets hadoop configuration.
*
* @param hadoopCfg Hadoop configuration.
*/
public void setHadoopConfiguration(GridHadoopConfiguration hadoopCfg) {
this.hadoopCfg = hadoopCfg;
}
=======
/**
* Gets security credentials.
*
* @return Security credentials.
*/
public GridSecurityCredentialsProvider getSecurityCredentialsProvider() {
return securityCred;
}
/**
* Sets security credentials.
*
* @param securityCred Security credentials.
*/
public void setSecurityCredentialsProvider(GridSecurityCredentialsProvider securityCred) {
this.securityCred = securityCred;
}
>>>>>>>
/**
* Gets hadoop configuration.
*
* @return Hadoop configuration.
*/
public GridHadoopConfiguration getHadoopConfiguration() {
return hadoopCfg;
}
/**
* Sets hadoop configuration.
*
* @param hadoopCfg Hadoop configuration.
*/
public void setHadoopConfiguration(GridHadoopConfiguration hadoopCfg) {
this.hadoopCfg = hadoopCfg;
}
/**
* Gets security credentials.
*
* @return Security credentials.
*/
public GridSecurityCredentialsProvider getSecurityCredentialsProvider() {
return securityCred;
}
/**
* Sets security credentials.
*
* @param securityCred Security credentials.
*/
public void setSecurityCredentialsProvider(GridSecurityCredentialsProvider securityCred) {
this.securityCred = securityCred;
} |
<<<<<<<
/**
* @return Client connection configuration.
*/
public GridClientConnectionConfiguration getClientConnectionConfiguration() {
return clientCfg;
}
/**
* @param clientCfg Client connection configuration.
*/
public void setClientConnectionConfiguration(GridClientConnectionConfiguration clientCfg) {
this.clientCfg = clientCfg;
}
/**
* @return Portable configuration.
*/
public GridPortableConfiguration getPortableConfiguration() {
return portableCfg;
}
/**
* @param portableCfg Portable configuration.
*/
public void setPortableConfiguration(GridPortableConfiguration portableCfg) {
this.portableCfg = portableCfg;
}
=======
/**
* Gets configurations for services to be deployed on the grid.
*
* @return Configurations for services to be deployed on the grid.
*/
public GridServiceConfiguration[] getServiceConfiguration() {
return svcCfgs;
}
/**
* Sets configurations for services to be deployed on the grid.
*
* @param svcCfgs Configurations for services to be deployed on the grid.
*/
public void setServiceConfiguration(GridServiceConfiguration... svcCfgs) {
this.svcCfgs = svcCfgs;
}
>>>>>>>
/**
* @return Client connection configuration.
*/
public GridClientConnectionConfiguration getClientConnectionConfiguration() {
return clientCfg;
}
/**
* @param clientCfg Client connection configuration.
*/
public void setClientConnectionConfiguration(GridClientConnectionConfiguration clientCfg) {
this.clientCfg = clientCfg;
}
/**
* @return Portable configuration.
*/
public GridPortableConfiguration getPortableConfiguration() {
return portableCfg;
}
/**
* @param portableCfg Portable configuration.
*/
public void setPortableConfiguration(GridPortableConfiguration portableCfg) {
this.portableCfg = portableCfg;
}
/**
* Gets configurations for services to be deployed on the grid.
*
* @return Configurations for services to be deployed on the grid.
*/
public GridServiceConfiguration[] getServiceConfiguration() {
return svcCfgs;
}
/**
* Sets configurations for services to be deployed on the grid.
*
* @param svcCfgs Configurations for services to be deployed on the grid.
*/
public void setServiceConfiguration(GridServiceConfiguration... svcCfgs) {
this.svcCfgs = svcCfgs;
} |
<<<<<<<
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, deserializePortable, filter);
=======
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, forcePrimary, filter);
>>>>>>>
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, deserializePortable,
forcePrimary, filter);
<<<<<<<
boolean deserializePortable, @Nullable GridPredicate<GridCacheEntry<K, V>>[] filter) {
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, deserializePortable, filter);
=======
@Nullable GridPredicate<GridCacheEntry<K, V>>[] filter) {
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, false, filter);
>>>>>>>
boolean deserializePortable, @Nullable GridPredicate<GridCacheEntry<K, V>>[] filter) {
return getAllAsync(keys, null, /*don't check local tx. */false, subjId, deserializePortable, false, filter); |
<<<<<<<
startProcessor(ctx, new GridServiceProcessor(ctx), attrs);
=======
startProcessor(ctx, (GridProcessor)(cfg.isPeerClassLoadingEnabled() ?
GridComponentType.HADOOP.create(ctx, true): // No-op when peer class loading is enabled.
GridComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration() != null)), attrs);
>>>>>>>
startProcessor(ctx, (GridProcessor)(cfg.isPeerClassLoadingEnabled() ?
GridComponentType.HADOOP.create(ctx, true): // No-op when peer class loading is enabled.
GridComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration() != null)), attrs);
startProcessor(ctx, new GridServiceProcessor(ctx), attrs); |
<<<<<<<
for (GridNode node : spiCtx.remoteNodes()) {
// Always run consistency check for security SPIs.
if (GridAuthenticationSpi.class.isAssignableFrom(getClass()) ||
GridSecureSessionSpi.class.isAssignableFrom(getClass()) ||
!Boolean.getBoolean(GridSystemProperties.GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) {
checkConfigurationConsistency(spiCtx, node, true);
checkConfigurationConsistency0(spiCtx, node, true);
}
=======
final Collection<GridNode> remotes = F.concat(false, spiCtx.remoteNodes(), spiCtx.remoteDaemonNodes());
for (GridNode node : remotes) {
checkConfigurationConsistency(spiCtx, node, true);
checkConfigurationConsistency0(spiCtx, node, true);
>>>>>>>
final Collection<GridNode> remotes = F.concat(false, spiCtx.remoteNodes(), spiCtx.remoteDaemonNodes());
for (GridNode node : remotes) {
// Always run consistency check for security SPIs.
if (GridAuthenticationSpi.class.isAssignableFrom(getClass()) ||
GridSecureSessionSpi.class.isAssignableFrom(getClass()) ||
!Boolean.getBoolean(GridSystemProperties.GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) {
checkConfigurationConsistency(spiCtx, node, true);
checkConfigurationConsistency0(spiCtx, node, true);
} |
<<<<<<<
/** {@inheritDoc} */
@Override public GridUuid nextAffinityKey() {
if (busyLock.enterBusy()) {
try {
return data.nextAffinityKey(null);
}
finally {
busyLock.leaveBusy();
}
}
else
throw new IllegalStateException("Failed to get next affinity key because Grid is stopping.");
}
=======
/** {@inheritDoc} */
@Override public boolean isProxy(URI path) {
GridGgfsMode mode = F.isEmpty(cfg.getPathModes()) ? cfg.getDefaultMode() :
modeRslvr.resolveMode(new GridGgfsPath(path));
return mode == PROXY;
}
>>>>>>>
/** {@inheritDoc} */
@Override public GridUuid nextAffinityKey() {
if (busyLock.enterBusy()) {
try {
return data.nextAffinityKey(null);
}
finally {
busyLock.leaveBusy();
}
}
else
throw new IllegalStateException("Failed to get next affinity key because Grid is stopping.");
}
/** {@inheritDoc} */
@Override public boolean isProxy(URI path) {
GridGgfsMode mode = F.isEmpty(cfg.getPathModes()) ? cfg.getDefaultMode() :
modeRslvr.resolveMode(new GridGgfsPath(path));
return mode == PROXY;
} |
<<<<<<<
/** TCP protocol class name. */
private static final String TCP_PROTO_CLS =
"org.gridgain.grid.kernal.processors.rest.protocols.tcp.GridTcpRestProtocol";
/** HTTP protocol class name. */
private static final String HTTP_PROTO_CLS =
"org.gridgain.grid.kernal.processors.rest.protocols.http.jetty.GridJettyRestProtocol";
/** */
private static final byte[] EMPTY_ID = new byte[0];
=======
>>>>>>>
/** TCP protocol class name. */
private static final String TCP_PROTO_CLS =
"org.gridgain.grid.kernal.processors.rest.protocols.tcp.GridTcpRestProtocol";
/** HTTP protocol class name. */
private static final String HTTP_PROTO_CLS =
"org.gridgain.grid.kernal.processors.rest.protocols.http.jetty.GridJettyRestProtocol";
/** */
private static final byte[] EMPTY_ID = new byte[0];
<<<<<<<
=======
/** {@inheritDoc} */
@Override public void start() throws GridException {
if (isRestEnabled()) {
// Register handlers.
addHandler(new GridCacheCommandHandler(ctx));
addHandler(new GridTaskCommandHandler(ctx));
addHandler(new GridTopologyCommandHandler(ctx));
addHandler(new GridVersionCommandHandler(ctx));
addHandler(new GridLogCommandHandler(ctx));
// Start protocol.
startProtocol(new GridJettyRestProtocol(ctx));
startProtocol(new GridTcpRestProtocol(ctx));
}
}
/** {@inheritDoc} */
@Override public void onKernalStart() throws GridException {
if (isRestEnabled()) {
startLatch.countDown();
if (log.isDebugEnabled())
log.debug("REST processor started.");
}
}
/** {@inheritDoc} */
@SuppressWarnings("BusyWait")
@Override public void onKernalStop(boolean cancel) {
if (isRestEnabled()) {
busyLock.writeLock();
boolean interrupted = Thread.interrupted();
while (workersCnt.sum() != 0) {
try {
Thread.sleep(200);
}
catch (InterruptedException ignored) {
interrupted = true;
}
}
if (interrupted)
Thread.currentThread().interrupt();
for (GridRestProtocol proto : protos)
proto.stop();
// Safety.
startLatch.countDown();
if (log.isDebugEnabled())
log.debug("REST processor stopped.");
}
}
>>>>>>>
/** {@inheritDoc} */
@Override public void start() throws GridException {
if (isRestEnabled()) {
// Register handlers.
addHandler(new GridCacheCommandHandler(ctx));
addHandler(new GridTaskCommandHandler(ctx));
addHandler(new GridTopologyCommandHandler(ctx));
addHandler(new GridVersionCommandHandler(ctx));
addHandler(new GridLogCommandHandler(ctx));
// Start protocol.
startProtocol(new GridJettyRestProtocol(ctx));
startProtocol(new GridTcpRestProtocol(ctx));
}
}
/** {@inheritDoc} */
@Override public void onKernalStart() throws GridException {
if (isRestEnabled()) {
startLatch.countDown();
if (log.isDebugEnabled())
log.debug("REST processor started.");
}
}
/** {@inheritDoc} */
@SuppressWarnings("BusyWait")
@Override public void onKernalStop(boolean cancel) {
if (isRestEnabled()) {
busyLock.writeLock();
boolean interrupted = Thread.interrupted();
while (workersCnt.sum() != 0) {
try {
Thread.sleep(200);
}
catch (InterruptedException ignored) {
interrupted = true;
}
}
if (interrupted)
Thread.currentThread().interrupt();
for (GridRestProtocol proto : protos)
proto.stop();
// Safety.
startLatch.countDown();
if (log.isDebugEnabled())
log.debug("REST processor stopped.");
}
} |
<<<<<<<
drSndMetrics = (GridDrSenderCacheMetricsAdapter)m.drSendMetrics();
drRcvMetrics = (GridDrReceiverCacheMetricsAdapter)m.drReceiveMetrics();
=======
drSndMetrics = ((GridCacheMetricsAdapter)m).drSndMetrics;
drRcvMetrics = ((GridCacheMetricsAdapter)m).drRcvMetrics;
>>>>>>>
drSndMetrics = ((GridCacheMetricsAdapter)m).drSndMetrics;
drRcvMetrics = ((GridCacheMetricsAdapter)m).drRcvMetrics;
<<<<<<<
=======
* Callback for backup queue size changed.
*
* @param newSize New size of sender cache backup queue.
*/
public void onSenderCacheBackupQueueSizeChanged(int newSize) {
drSndMetrics.onBackupQueueSizeChanged(newSize);
if (delegate != null)
delegate.onSenderCacheBackupQueueSizeChanged(newSize);
}
/**
* Callback for replication pause state changed.
*
* @param pauseReason Pause reason or {@code null} if replication is not paused.
*/
public void onPauseStateChanged(@Nullable GridDrPauseReason pauseReason) {
drSndMetrics.onPauseStateChanged(pauseReason);
if (delegate != null)
delegate.onPauseStateChanged(pauseReason);
}
/**
>>>>>>>
* Callback for replication pause state changed.
*
* @param pauseReason Pause reason or {@code null} if replication is not paused.
*/
public void onPauseStateChanged(@Nullable GridDrPauseReason pauseReason) {
drSndMetrics.onPauseStateChanged(pauseReason);
if (delegate != null)
delegate.onPauseStateChanged(pauseReason);
}
/** |
<<<<<<<
out.writeObject(reducersAddrs);
=======
out.writeLong(ver);
>>>>>>>
out.writeLong(ver);
out.writeObject(reducersAddrs);
<<<<<<<
reducersAddrs = (Map<Integer, GridHadoopProcessDescriptor>)in.readObject();
=======
ver = in.readLong();
>>>>>>>
ver = in.readLong();
reducersAddrs = (Map<Integer, GridHadoopProcessDescriptor>)in.readObject(); |
<<<<<<<
resetMetrics();
hasBackups = ctx.config().getBackups() > 0;
=======
>>>>>>>
resetMetrics(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.