Sending annotation users event on dmp persist
This commit is contained in:
parent
7347fbbd5a
commit
3fc805ab85
|
@ -23,6 +23,7 @@ import eu.eudat.data.*;
|
||||||
import eu.eudat.errorcode.ErrorThesaurusProperties;
|
import eu.eudat.errorcode.ErrorThesaurusProperties;
|
||||||
import eu.eudat.event.DmpTouchedEvent;
|
import eu.eudat.event.DmpTouchedEvent;
|
||||||
import eu.eudat.event.EventBroker;
|
import eu.eudat.event.EventBroker;
|
||||||
|
import eu.eudat.integrationevent.outbox.annotationentitytouch.AnnotationEntityTouchedIntegrationEventHandler;
|
||||||
import eu.eudat.integrationevent.outbox.dmptouched.DmpTouchedIntegrationEventHandler;
|
import eu.eudat.integrationevent.outbox.dmptouched.DmpTouchedIntegrationEventHandler;
|
||||||
import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEvent;
|
import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEvent;
|
||||||
import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEventHandler;
|
import eu.eudat.integrationevent.outbox.notification.NotifyIntegrationEventHandler;
|
||||||
|
@ -123,6 +124,8 @@ public class DmpServiceImpl implements DmpService {
|
||||||
|
|
||||||
private final DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler;
|
private final DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler;
|
||||||
|
|
||||||
|
private final AnnotationEntityTouchedIntegrationEventHandler annotationEntityTouchedIntegrationEventHandler;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public DmpServiceImpl(
|
public DmpServiceImpl(
|
||||||
EntityManager entityManager,
|
EntityManager entityManager,
|
||||||
|
@ -143,7 +146,9 @@ public class DmpServiceImpl implements DmpService {
|
||||||
ActionConfirmationService actionConfirmationService,
|
ActionConfirmationService actionConfirmationService,
|
||||||
FileTransformerService fileTransformerService,
|
FileTransformerService fileTransformerService,
|
||||||
ValidatorFactory validatorFactory,
|
ValidatorFactory validatorFactory,
|
||||||
ElasticService elasticService, DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler) {
|
ElasticService elasticService,
|
||||||
|
DmpTouchedIntegrationEventHandler dmpTouchedIntegrationEventHandler,
|
||||||
|
AnnotationEntityTouchedIntegrationEventHandler annotationEntityTouchedIntegrationEventHandler) {
|
||||||
this.entityManager = entityManager;
|
this.entityManager = entityManager;
|
||||||
this.authorizationService = authorizationService;
|
this.authorizationService = authorizationService;
|
||||||
this.deleterFactory = deleterFactory;
|
this.deleterFactory = deleterFactory;
|
||||||
|
@ -164,6 +169,7 @@ public class DmpServiceImpl implements DmpService {
|
||||||
this.validatorFactory = validatorFactory;
|
this.validatorFactory = validatorFactory;
|
||||||
this.elasticService = elasticService;
|
this.elasticService = elasticService;
|
||||||
this.dmpTouchedIntegrationEventHandler = dmpTouchedIntegrationEventHandler;
|
this.dmpTouchedIntegrationEventHandler = dmpTouchedIntegrationEventHandler;
|
||||||
|
this.annotationEntityTouchedIntegrationEventHandler = annotationEntityTouchedIntegrationEventHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dmp persist(DmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, IOException {
|
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.dmpTouchedIntegrationEventHandler.handle(DmpTouchedIntegrationEventHandler.buildEventFromPersistModel(model));
|
||||||
|
|
||||||
|
this.annotationEntityTouchedIntegrationEventHandler.handle(AnnotationEntityTouchedIntegrationEventHandler.buildEventFromPersistModel(model));
|
||||||
|
|
||||||
this.sendNotification(data);
|
this.sendNotification(data);
|
||||||
|
|
||||||
this.elasticService.persistDmp(data);
|
this.elasticService.persistDmp(data);
|
||||||
|
|
Loading…
Reference in New Issue