diff --git a/backend/core/src/main/java/org/opencdmp/service/descriptiontemplate/DescriptionTemplateServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/descriptiontemplate/DescriptionTemplateServiceImpl.java index 9aced79de..ea6378e01 100644 --- a/backend/core/src/main/java/org/opencdmp/service/descriptiontemplate/DescriptionTemplateServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/descriptiontemplate/DescriptionTemplateServiceImpl.java @@ -271,14 +271,6 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic if (user.getIsActive().equals(IsActive.Inactive)) throw new MyValidationException(this.errors.getDescriptionTemplateInactiveUser().getCode(), this.errors.getDescriptionTemplateInactiveUser().getMessage()); event.setUserId(user.getId()); - UserContactInfoQuery query = this.queryFactory.query(UserContactInfoQuery.class).disableTracking().userIds(user.getId()); - query.setOrder(new Ordering().addAscending(UserContactInfo._ordinal)); - - if (query.count() == 0) throw new MyValidationException(this.errors.getDescriptionTemplateMissingUserContactInfo().getCode(), this.errors.getDescriptionTemplateMissingUserContactInfo().getMessage()); - List contactPairs = new ArrayList<>(); - contactPairs.add(new ContactPair(ContactInfoType.Email, query.first().getValue())); - NotificationContactData contactData = new NotificationContactData(contactPairs, null, null); - event.setContactHint(this.jsonHandlingService.toJsonSafe(contactData)); event.setNotificationType(this.notificationProperties.getDescriptionTemplateInvitationType()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>(); diff --git a/backend/core/src/main/java/org/opencdmp/service/dmp/DmpServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/dmp/DmpServiceImpl.java index 0a5d11a45..f7858f93a 100644 --- a/backend/core/src/main/java/org/opencdmp/service/dmp/DmpServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/dmp/DmpServiceImpl.java @@ -69,7 +69,6 @@ import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEvent; import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEventHandler; import org.opencdmp.model.DmpUser; import org.opencdmp.model.DmpValidationResult; -import org.opencdmp.model.UserContactInfo; import org.opencdmp.model.builder.DmpUserBuilder; import org.opencdmp.model.builder.description.DescriptionBuilder; import org.opencdmp.model.builder.dmp.DmpBuilder; @@ -313,15 +312,6 @@ public class DmpServiceImpl implements DmpService { private void createDmpNotificationEvent(DmpEntity dmp, UserEntity user) throws InvalidApplicationException { NotifyIntegrationEvent event = new NotifyIntegrationEvent(); event.setUserId(user.getId()); - UserContactInfoQuery query = this.queryFactory.query(UserContactInfoQuery.class).disableTracking().userIds(user.getId()); - query.setOrder(new Ordering().addAscending(UserContactInfo._ordinal)); - - if (query.count() == 0) throw new MyValidationException(this.errors.getDmpMissingUserContactInfo().getCode(), this.errors.getDmpMissingUserContactInfo().getMessage()); - - List contactPairs = new ArrayList<>(); - contactPairs.add(new ContactPair(ContactInfoType.Email, query.first().getValue())); - NotificationContactData contactData = new NotificationContactData(contactPairs, null, null); - event.setContactHint(this.jsonHandlingService.toJsonSafe(contactData)); this.applyNotificationType(dmp.getStatus(), event); NotificationFieldData data = new NotificationFieldData(); @@ -1493,10 +1483,6 @@ public class DmpServiceImpl implements DmpService { NotifyIntegrationEvent event = new NotifyIntegrationEvent(); event.setUserId(recipient.getId()); - List contactPairs = new ArrayList<>(); - contactPairs.add(new ContactPair(ContactInfoType.Email, email)); - NotificationContactData contactData = new NotificationContactData(contactPairs, null, null); - event.setContactHint(this.jsonHandlingService.toJsonSafe(contactData)); event.setNotificationType(this.notificationProperties.getDmpInvitationExistingUserType()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>(); diff --git a/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java index cdf75cf87..822c4816e 100644 --- a/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java @@ -525,11 +525,7 @@ public class UserServiceImpl implements UserService { NotifyIntegrationEvent event = new NotifyIntegrationEvent(); event.setUserId(user.getId()); - List contactPairs = new ArrayList<>(); - contactPairs.add(new ContactPair(ContactInfoType.Email, email)); - NotificationContactData contactData = new NotificationContactData(contactPairs, null, null); - event.setContactHint(this.jsonHandlingService.toJsonSafe(contactData)); - event.setContactTypeHint(NotificationContactType.EMAIL); + event.setNotificationType(this.notificationProperties.getMergeAccountConfirmationType()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>();