diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java index 2e01b11a2..ecde838e0 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java @@ -23,6 +23,7 @@ import eu.eudat.data.*; import eu.eudat.errorcode.ErrorThesaurusProperties; import eu.eudat.event.DmpTouchedEvent; import eu.eudat.event.EventBroker; +import eu.eudat.integrationevent.outbox.annotationentitytouch.AnnotationEntityTouchedIntegrationEventHandler; import eu.eudat.integrationevent.outbox.dmptouched.DmpTouchedIntegrationEventHandler; import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEvent; import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEventHandler; @@ -123,6 +124,8 @@ public class DmpServiceImpl implements DmpService { private final DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler; + private final AnnotationEntityTouchedIntegrationEventHandler annotationEntityTouchedIntegrationEventHandler; + @Autowired public DmpServiceImpl( EntityManager entityManager, @@ -143,7 +146,9 @@ public class DmpServiceImpl implements DmpService { ActionConfirmationService actionConfirmationService, FileTransformerService fileTransformerService, ValidatorFactory validatorFactory, - ElasticService elasticService, DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler) { + ElasticService elasticService, + DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler, + AnnotationEntityTouchedIntegrationEventHandler annotationEntityTouchedIntegrationEventHandler) { this.entityManager = entityManager; this.authorizationService = authorizationService; this.deleterFactory = deleterFactory; @@ -164,6 +169,7 @@ public class DmpServiceImpl implements DmpService { this.validatorFactory = validatorFactory; this.elasticService = elasticService; this.dmpTouchedIntegrationEventHandler = dmpTouchedIntegrationEventHandler; + this.annotationEntityTouchedIntegrationEventHandler = annotationEntityTouchedIntegrationEventHandler; } public Dmp persist(DmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, IOException { @@ -184,6 +190,8 @@ public class DmpServiceImpl implements DmpService { this.dmpTouchedIntegrationEventHandler.handle(DmpTouchedIntegrationEventHandler.buildEventFromPersistModel(model)); + this.annotationEntityTouchedIntegrationEventHandler.handle(AnnotationEntityTouchedIntegrationEventHandler.buildEventFromPersistModel(model)); + this.sendNotification(data); this.elasticService.persistDmp(data);