Jean-Francois Leveque

Refactoring création publisher avec version initiale et correction typo.

...@@ -47,7 +47,7 @@ public class PublisherVersionView implements Serializable { ...@@ -47,7 +47,7 @@ public class PublisherVersionView implements Serializable {
47 private String publisherURL; 47 private String publisherURL;
48 private boolean publisherActive; 48 private boolean publisherActive;
49 private String publisherHistory; 49 private String publisherHistory;
50 - private User publisherVerisionAuthor; 50 + private User publisherVersionAuthor;
51 private Timestamp publisherVersionDatetime; 51 private Timestamp publisherVersionDatetime;
52 private Publisher publisher; 52 private Publisher publisher;
53 53
...@@ -126,20 +126,19 @@ public class PublisherVersionView implements Serializable { ...@@ -126,20 +126,19 @@ public class PublisherVersionView implements Serializable {
126 PublisherVersion publisherVersion; 126 PublisherVersion publisherVersion;
127 127
128 publisherVersion = publisherService.getPublisherVersion(publisherVersionId); 128 publisherVersion = publisherService.getPublisherVersion(publisherVersionId);
129 - publisherVerisionAuthor = publisherVersion.getPublisherVersionAuthor(); 129 + publisherVersionAuthor = publisherVersion.getPublisherVersionAuthor();
130 publisherVersionDatetime = publisherVersion.getPublisherVersionDatetime(); 130 publisherVersionDatetime = publisherVersion.getPublisherVersionDatetime();
131 } 131 }
132 132
133 public void add() { 133 public void add() {
134 - Publisher publisher = new Publisher();
135 PublisherVersion publisherVersion = new PublisherVersion(); 134 PublisherVersion publisherVersion = new PublisherVersion();
136 setValues(publisherVersion); 135 setValues(publisherVersion);
137 136
138 - publisherService.addPublisherWithVersion(publisher, publisherVersion); 137 + publisherService.addNewPublisher(publisherVersion);
139 138
140 newPublisher = false; 139 newPublisher = false;
141 publisherVersionId = publisherVersion.getPublisherVersionId(); 140 publisherVersionId = publisherVersion.getPublisherVersionId();
142 - this.publisher = publisher; 141 + publisher = publisherVersion.getPublisher();
143 142
144 getImmutableValues(); 143 getImmutableValues();
145 144
...@@ -306,12 +305,12 @@ public class PublisherVersionView implements Serializable { ...@@ -306,12 +305,12 @@ public class PublisherVersionView implements Serializable {
306 this.publisherHistory = publisherHistory; 305 this.publisherHistory = publisherHistory;
307 } 306 }
308 307
309 - public User getPublisherVerisionAuthor() { 308 + public User getPublisherVersionAuthor() {
310 - return publisherVerisionAuthor; 309 + return publisherVersionAuthor;
311 } 310 }
312 311
313 - public void setPublisherVerisionAuthor(User publisherVerisionAuthor) { 312 + public void setPublisherVersionAuthor(User publisherVersionAuthor) {
314 - this.publisherVerisionAuthor = publisherVerisionAuthor; 313 + this.publisherVersionAuthor = publisherVersionAuthor;
315 } 314 }
316 315
317 public Timestamp getPublisherVersionDatetime() { 316 public Timestamp getPublisherVersionDatetime() {
......