From 78772e23717f5f9e5075d6bd0a58a151797cbd65 Mon Sep 17 00:00:00 2001 From: amentis Date: Tue, 2 Jul 2024 17:30:18 +0300 Subject: [PATCH] rename annotation status integration event --- .../notification/NotificationProperties.java | 10 ++-- .../integrationevent/AppRabbitConfigurer.java | 2 +- .../inbox/InboxProperties.java | 10 ++-- .../inbox/InboxRepositoryImpl.java | 6 +-- ...nStatusEntityChangedIntegrationEvent.java} | 48 ++++++++++++------- ...EntityChangedIntegrationEventHandler.java} | 4 +- ...tyChangedIntegrationEventHandlerImpl.java} | 23 ++++----- .../resources/config/notification-devel.yml | 2 +- .../web/src/main/resources/config/queue.yml | 2 +- 9 files changed, 61 insertions(+), 46 deletions(-) rename backend/core/src/main/java/org/opencdmp/integrationevent/inbox/{annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEvent.java => annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java} (53%) rename backend/core/src/main/java/org/opencdmp/integrationevent/inbox/{annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandler.java => annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandler.java} (53%) rename backend/core/src/main/java/org/opencdmp/integrationevent/inbox/{annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandlerImpl.java => annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java} (81%) diff --git a/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java b/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java index 207d4d80d..ba05e75af 100644 --- a/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java +++ b/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java @@ -15,7 +15,7 @@ public class NotificationProperties { private UUID descriptionModifiedType; private UUID descriptionFinalisedType; private UUID descriptionAnnotationCreated; - private UUID descriptionAnnotationStatusResolved; + private UUID descriptionAnnotationStatusChanged; private UUID mergeAccountConfirmationType; private UUID removeCredentialConfirmationType; private UUID dmpDepositType; @@ -155,12 +155,12 @@ public class NotificationProperties { this.descriptionAnnotationCreated = descriptionAnnotationCreated; } - public UUID getDescriptionAnnotationStatusResolved() { - return descriptionAnnotationStatusResolved; + public UUID getDescriptionAnnotationStatusChanged() { + return descriptionAnnotationStatusChanged; } - public void setDescriptionAnnotationStatusResolved(UUID descriptionAnnotationStatusResolved) { - this.descriptionAnnotationStatusResolved = descriptionAnnotationStatusResolved; + public void setDescriptionAnnotationStatusChanged(UUID descriptionAnnotationStatusChanged) { + this.descriptionAnnotationStatusChanged = descriptionAnnotationStatusChanged; } public UUID getTenantSpecificInvitationExternalUserType() { diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/AppRabbitConfigurer.java b/backend/core/src/main/java/org/opencdmp/integrationevent/AppRabbitConfigurer.java index 131ed0448..89ebb7afe 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/AppRabbitConfigurer.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/AppRabbitConfigurer.java @@ -33,7 +33,7 @@ public class AppRabbitConfigurer extends RabbitConfigurer { public InboxBindings inboxBindingsCreator() { List bindingItems = new ArrayList<>(); if (this.inboxProperties.getAnnotationCreatedTopic() != null) bindingItems.addAll(this.inboxProperties.getAnnotationCreatedTopic()); - if (this.inboxProperties.getAnnotationStatusResolvedTopic() != null) bindingItems.addAll(this.inboxProperties.getAnnotationStatusResolvedTopic()); + if (this.inboxProperties.getAnnotationStatusChangedTopic() != null) bindingItems.addAll(this.inboxProperties.getAnnotationStatusChangedTopic()); return new InboxBindings(bindingItems); } diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxProperties.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxProperties.java index 854413c6f..99b95e5ae 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxProperties.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxProperties.java @@ -16,13 +16,13 @@ public class InboxProperties { private final List annotationCreatedTopic; - private final List annotationStatusResolvedTopic; + private final List annotationStatusChangedTopic; public InboxProperties( - String exchange, List annotationCreatedTopic, List annotationStatusResolvedTopic) { + String exchange, List annotationCreatedTopic, List annotationStatusChangedTopic) { this.exchange = exchange; this.annotationCreatedTopic = annotationCreatedTopic; - this.annotationStatusResolvedTopic = annotationStatusResolvedTopic; + this.annotationStatusChangedTopic = annotationStatusChangedTopic; } public String getExchange() { @@ -33,7 +33,7 @@ public class InboxProperties { return annotationCreatedTopic; } - public List getAnnotationStatusResolvedTopic() { - return annotationStatusResolvedTopic; + public List getAnnotationStatusChangedTopic() { + return annotationStatusChangedTopic; } } diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxRepositoryImpl.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxRepositoryImpl.java index cbe2168c2..92e360632 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxRepositoryImpl.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/InboxRepositoryImpl.java @@ -16,7 +16,7 @@ import org.opencdmp.commons.fake.FakeRequestScope; import org.opencdmp.data.QueueInboxEntity; import org.opencdmp.data.TenantEntityManager; import org.opencdmp.integrationevent.inbox.annotationentitycreated.AnnotationEntityCreatedIntegrationEventHandler; -import org.opencdmp.integrationevent.inbox.annotationstatusentityresolved.AnnotationStatusEntityResolvedIntegrationEventHandler; +import org.opencdmp.integrationevent.inbox.annotationstatusentitychanged.AnnotationStatusEntityChangedIntegrationEventHandler; import org.opencdmp.query.QueueInboxQuery; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; @@ -394,8 +394,8 @@ public class InboxRepositoryImpl implements InboxRepository { logger.debug("Processing message with routing key '{}'", queueInboxMessage.getRoute()); if (this.routingKeyMatched(queueInboxMessage.getRoute(), this.inboxProperties.getAnnotationCreatedTopic())) handler = this.applicationContext.getBean(AnnotationEntityCreatedIntegrationEventHandler.class); - else if (this.routingKeyMatched(queueInboxMessage.getRoute(), this.inboxProperties.getAnnotationStatusResolvedTopic())) - handler = this.applicationContext.getBean(AnnotationStatusEntityResolvedIntegrationEventHandler.class); + else if (this.routingKeyMatched(queueInboxMessage.getRoute(), this.inboxProperties.getAnnotationStatusChangedTopic())) + handler = this.applicationContext.getBean(AnnotationStatusEntityChangedIntegrationEventHandler.class); else { logger.error("No handler found for message routing key '{}'. Discarding.", queueInboxMessage.getRoute()); handler = null; diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEvent.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java similarity index 53% rename from backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEvent.java rename to backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java index 04fc65dda..7e5e4bf9b 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEvent.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java @@ -1,4 +1,4 @@ -package org.opencdmp.integrationevent.inbox.annotationstatusentityresolved; +package org.opencdmp.integrationevent.inbox.annotationstatusentitychanged; import gr.cite.tools.validation.ValidatorFactory; import gr.cite.tools.validation.specification.Specification; @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.List; import java.util.UUID; -public class AnnotationStatusEntityResolvedIntegrationEvent extends TrackedEvent { +public class AnnotationStatusEntityChangedIntegrationEvent extends TrackedEvent { private UUID id; public static final String _id = "id"; @@ -39,6 +39,9 @@ public class AnnotationStatusEntityResolvedIntegrationEvent extends TrackedEvent private String anchor; public static final String _anchor = "anchor"; + private String statusLabel; + public static final String _statusLabel = "statusLabel"; + public UUID getId() { return id; } @@ -95,51 +98,62 @@ public class AnnotationStatusEntityResolvedIntegrationEvent extends TrackedEvent this.anchor = anchor; } - @Component(AnnotationStatusEntityResolvedIntegrationEventValidator.ValidatorName) - @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) - public static class AnnotationStatusEntityResolvedIntegrationEventValidator extends BaseValidator { + public String getStatusLabel() { + return statusLabel; + } - public static final String ValidatorName = "AnnotationStatusEntityResolvedIntegrationEventValidator"; + public void setStatusLabel(String statusLabel) { + this.statusLabel = statusLabel; + } + + @Component(AnnotationStatusEntityChangedIntegrationEventValidator.ValidatorName) + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) + public static class AnnotationStatusEntityChangedIntegrationEventValidator extends BaseValidator { + + public static final String ValidatorName = "AnnotationStatusEntityChangedIntegrationEventValidator"; private final MessageSource messageSource; private final ValidatorFactory validatorFactory; - protected AnnotationStatusEntityResolvedIntegrationEventValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource, ValidatorFactory validatorFactory) { + protected AnnotationStatusEntityChangedIntegrationEventValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource, ValidatorFactory validatorFactory) { super(conventionService, errors); this.messageSource = messageSource; this.validatorFactory = validatorFactory; } @Override - protected Class modelClass() { - return AnnotationStatusEntityResolvedIntegrationEvent.class; + protected Class modelClass() { + return AnnotationStatusEntityChangedIntegrationEvent.class; } @Override - protected List specifications(AnnotationStatusEntityResolvedIntegrationEvent item) { + protected List specifications(AnnotationStatusEntityChangedIntegrationEvent item) { return Arrays.asList( this.spec() .must(() -> this.isValidGuid(item.getId())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._id).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._id}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._id).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._id}, LocaleContextHolder.getLocale())), this.spec() .must(() -> this.isValidGuid(item.getAnnotationId())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._annotationId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._annotationId}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._annotationId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._annotationId}, LocaleContextHolder.getLocale())), this.spec() .must(() -> this.isValidGuid(item.getStatusId())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._statusId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._statusId}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._statusId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._statusId}, LocaleContextHolder.getLocale())), this.spec() .must(() -> this.isValidGuid(item.getSubjectId())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._subjectId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._subjectId}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._subjectId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._subjectId}, LocaleContextHolder.getLocale())), this.spec() .must(() -> this.isValidGuid(item.getEntityId())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._entityId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._entityId}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._entityId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._entityId}, LocaleContextHolder.getLocale())), this.spec() .must(() -> !this.isEmpty(item.getEntityType())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._entityType).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._entityType}, LocaleContextHolder.getLocale())), + .failOn(AnnotationStatusEntityChangedIntegrationEvent._entityType).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._entityType}, LocaleContextHolder.getLocale())), this.spec() .must(() -> !this.isEmpty(item.getAnchor())) - .failOn(AnnotationStatusEntityResolvedIntegrationEvent._anchor).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityResolvedIntegrationEvent._anchor}, LocaleContextHolder.getLocale())) + .failOn(AnnotationStatusEntityChangedIntegrationEvent._anchor).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._anchor}, LocaleContextHolder.getLocale())), + this.spec() + .must(() -> !this.isEmpty(item.getStatusLabel())) + .failOn(AnnotationStatusEntityChangedIntegrationEvent._statusLabel).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._statusLabel}, LocaleContextHolder.getLocale())) ); } } diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandler.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandler.java similarity index 53% rename from backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandler.java rename to backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandler.java index 7feba775b..37c137726 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandler.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandler.java @@ -1,6 +1,6 @@ -package org.opencdmp.integrationevent.inbox.annotationstatusentityresolved; +package org.opencdmp.integrationevent.inbox.annotationstatusentitychanged; import org.opencdmp.integrationevent.inbox.IntegrationEventHandler; -public interface AnnotationStatusEntityResolvedIntegrationEventHandler extends IntegrationEventHandler { +public interface AnnotationStatusEntityChangedIntegrationEventHandler extends IntegrationEventHandler { } diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandlerImpl.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java similarity index 81% rename from backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandlerImpl.java rename to backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java index 4084139c1..7969f9afd 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentityresolved/AnnotationStatusEntityResolvedIntegrationEventHandlerImpl.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java @@ -1,4 +1,4 @@ -package org.opencdmp.integrationevent.inbox.annotationstatusentityresolved; +package org.opencdmp.integrationevent.inbox.annotationstatusentitychanged; import gr.cite.commons.web.oidc.principal.CurrentPrincipalResolver; import gr.cite.commons.web.oidc.principal.extractor.ClaimExtractorProperties; @@ -45,9 +45,9 @@ import java.util.*; @Component @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) -public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implements AnnotationStatusEntityResolvedIntegrationEventHandler { +public class AnnotationStatusEntityChangedIntegrationEventHandlerImpl implements AnnotationStatusEntityChangedIntegrationEventHandler { - private static final LoggerService logger = new LoggerService(LoggerFactory.getLogger(AnnotationStatusEntityResolvedIntegrationEventHandlerImpl.class)); + private static final LoggerService logger = new LoggerService(LoggerFactory.getLogger(AnnotationStatusEntityChangedIntegrationEventHandlerImpl.class)); private final QueryFactory queryFactory; private final JsonHandlingService jsonHandlingService; @@ -63,7 +63,7 @@ public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implement private final ValidatorFactory validatorFactory; private final AuditService auditService; - public AnnotationStatusEntityResolvedIntegrationEventHandlerImpl(QueryFactory queryFactory, JsonHandlingService jsonHandlingService, NotificationProperties notificationProperties, TenantScope tenantScope, NotifyIntegrationEventHandler notifyIntegrationEventHandler, CurrentPrincipalResolver currentPrincipalResolver, ClaimExtractorProperties claimExtractorProperties, MessageSource messageSource, UserScope userScope, ErrorThesaurusProperties errors, TenantEntityManager tenantEntityManager, ValidatorFactory validatorFactory, AuditService auditService) { + public AnnotationStatusEntityChangedIntegrationEventHandlerImpl(QueryFactory queryFactory, JsonHandlingService jsonHandlingService, NotificationProperties notificationProperties, TenantScope tenantScope, NotifyIntegrationEventHandler notifyIntegrationEventHandler, CurrentPrincipalResolver currentPrincipalResolver, ClaimExtractorProperties claimExtractorProperties, MessageSource messageSource, UserScope userScope, ErrorThesaurusProperties errors, TenantEntityManager tenantEntityManager, ValidatorFactory validatorFactory, AuditService auditService) { this.queryFactory = queryFactory; this.jsonHandlingService = jsonHandlingService; this.notificationProperties = notificationProperties; @@ -81,12 +81,12 @@ public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implement @Override public EventProcessingStatus handle(IntegrationEventProperties properties, String message) throws InvalidApplicationException { - AnnotationStatusEntityResolvedIntegrationEvent event = this.jsonHandlingService.fromJsonSafe(AnnotationStatusEntityResolvedIntegrationEvent.class, message); + AnnotationStatusEntityChangedIntegrationEvent event = this.jsonHandlingService.fromJsonSafe(AnnotationStatusEntityChangedIntegrationEvent.class, message); if (event == null) return EventProcessingStatus.Error; - logger.debug("Handling {}", AnnotationStatusEntityResolvedIntegrationEvent.class.getSimpleName()); - this.validatorFactory.validator(AnnotationStatusEntityResolvedIntegrationEvent.AnnotationStatusEntityResolvedIntegrationEventValidator.class).validateForce(event); + logger.debug("Handling {}", AnnotationStatusEntityChangedIntegrationEvent.class.getSimpleName()); + this.validatorFactory.validator(AnnotationStatusEntityChangedIntegrationEvent.AnnotationStatusEntityChangedIntegrationEventValidator.class).validateForce(event); EventProcessingStatus status = EventProcessingStatus.Success; try { @@ -123,7 +123,7 @@ public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implement return status; } - private void sendNotification(AnnotationStatusEntityResolvedIntegrationEvent event) throws InvalidApplicationException { + private void sendNotification(AnnotationStatusEntityChangedIntegrationEvent event) throws InvalidApplicationException { DescriptionEntity descriptionEntity = this.queryFactory.query(DescriptionQuery.class).disableTracking().ids(event.getEntityId()).first(); @@ -150,16 +150,16 @@ public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implement UserEntity user = this.queryFactory.query(UserQuery.class).disableTracking().ids(dmpUserId).first(); if (user == null || user.getIsActive().equals(IsActive.Inactive)) throw new MyValidationException(this.errors.getDmpInactiveUser().getCode(), this.errors.getDmpInactiveUser().getMessage()); - this.createAnnotationStatusResolvedNotificationEvent(user, descriptionEntity, sender.getName(), event.getAnchor()); + this.createAnnotationStatusChangedNotificationEvent(user, descriptionEntity, sender.getName(), event.getAnchor(), event.getStatusLabel()); } } - private void createAnnotationStatusResolvedNotificationEvent(UserEntity user, DescriptionEntity description, String reasonName, String anchor) throws InvalidApplicationException, InvalidApplicationException { + private void createAnnotationStatusChangedNotificationEvent(UserEntity user, DescriptionEntity description, String reasonName, String anchor, String statusLabel) throws InvalidApplicationException, InvalidApplicationException { NotifyIntegrationEvent notifyIntegrationEvent = new NotifyIntegrationEvent(); notifyIntegrationEvent.setUserId(user.getId()); - notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationStatusResolved()); + notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationStatusChanged()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>(); @@ -167,6 +167,7 @@ public class AnnotationStatusEntityResolvedIntegrationEventHandlerImpl implement fieldInfoList.add(new FieldInfo("{reasonName}", DataType.String, reasonName)); fieldInfoList.add(new FieldInfo("{name}", DataType.String, description.getLabel())); fieldInfoList.add(new FieldInfo("{id}", DataType.String, description.getId().toString())); + fieldInfoList.add(new FieldInfo("{status}", DataType.String, statusLabel)); String anchorUrl = "f/"+anchor+"/annotation"; fieldInfoList.add(new FieldInfo("{anchor}", DataType.String, anchorUrl)); if(this.tenantScope.getTenantCode() != null && !this.tenantScope.getTenantCode().equals(this.tenantScope.getDefaultTenantCode())){ diff --git a/backend/web/src/main/resources/config/notification-devel.yml b/backend/web/src/main/resources/config/notification-devel.yml index c30684174..1c8bab032 100644 --- a/backend/web/src/main/resources/config/notification-devel.yml +++ b/backend/web/src/main/resources/config/notification-devel.yml @@ -7,7 +7,7 @@ notification: descriptionModifiedType: 4FDBFA80-7A71-4A69-B854-67CBB70648F1 descriptionFinalisedType: 33790bad-94d4-488a-8ee2-7f6295ca18ea descriptionAnnotationCreated: db1e99d2-a240-4e75-9bb2-ef25b234c1f0 - descriptionAnnotationStatusResolved: 3189e3a6-91e6-40c6-8ff8-275a68445aec + descriptionAnnotationStatusChanged: 3189e3a6-91e6-40c6-8ff8-275a68445aec mergeAccountConfirmationType: BFE68845-CB05-4C5A-A03D-29161A7C9660 removeCredentialConfirmationType: C9BC3F16-057E-4BBA-8A5F-36BD835E5604 dmpDepositType: 55736F7A-83AB-4190-AF43-9D031A6F9612 diff --git a/backend/web/src/main/resources/config/queue.yml b/backend/web/src/main/resources/config/queue.yml index e52682f33..bc1135fab 100644 --- a/backend/web/src/main/resources/config/queue.yml +++ b/backend/web/src/main/resources/config/queue.yml @@ -59,7 +59,7 @@ queue: options: exchange: null annotation-created-topic: annotation.created - annotation-status-resolved-topic: annotationStatus.resolved + annotation-status-changed-topic: annotationStatus.changed rabbitmq: enable: true interval-seconds: 3