Jean-Francois Leveque

Refactoring

......@@ -91,6 +91,12 @@ public class PublisherServiceDefault implements PublisherService {
publisherAction.setPublisherVersion(publisherVersion);
publisherAction.setPublisher(publisher);
this.savePublisher(publisher);
this.index(publisher);
publisherActionRepository.save(publisherAction);
return publisherAction;
}
protected void index(Publisher publisher) {
IndexedPublisher indexedPublisher = new IndexedPublisher(publisher);
try {
publisherSearchRepository.save(indexedPublisher);
......@@ -98,8 +104,6 @@ public class PublisherServiceDefault implements PublisherService {
logger.error("IndexingException {}", e);
// TODO Ajouter l'information de manière plus accessible que dans les logs
}
publisherActionRepository.save(publisherAction);
return publisherAction;
}
protected void savePublisherVersion(PublisherVersion publisherVersion) {
......