Jean-Francois Leveque

Refactoring création publisher avec version initiale.

......@@ -11,7 +11,7 @@ import java.util.List;
*/
public interface PublisherService {
void addPublisherWithVersion(Publisher publisher, PublisherVersion publisherVersion);
void addNewPublisher(PublisherVersion publisherVersion);
void addVersionToPublisher(Publisher publisher, PublisherVersion publisherVersion);
......
......@@ -34,7 +34,8 @@ public class PublisherServiceSpring implements PublisherService {
@Inject
SharedService sharedService;
public void addPublisherWithVersion(Publisher publisher, PublisherVersion publisherVersion) {
public void addNewPublisher(PublisherVersion publisherVersion) {
Publisher publisher = new Publisher();
Set<PublisherVersion> publisherVersions = new HashSet<>();
publisherVersions.add(publisherVersion);
publisher.setVersions(publisherVersions);
......@@ -44,7 +45,6 @@ public class PublisherServiceSpring implements PublisherService {
this.savePublisherVersion(publisherVersion);
this.savePublisher(publisher);
}
public void addVersionToPublisher(Publisher publisher, PublisherVersion publisherVersion) {
logger.trace("debut addVersionToPublisher, publisherVersion = {}", publisherVersion);
Set<PublisherVersion> publisherVersionSet = publisher.getVersions();
......