Jean-Francois Leveque

Passage correctif SonarQube

...@@ -40,7 +40,7 @@ public class ListPublisherActionsView implements Serializable { ...@@ -40,7 +40,7 @@ public class ListPublisherActionsView implements Serializable {
40 /** 40 /**
41 * Uses PublisherService to get actions 41 * Uses PublisherService to get actions
42 * 42 *
43 - * @param publisherService 43 + * @param publisherService injected PublisherService
44 */ 44 */
45 @Inject 45 @Inject
46 public ListPublisherActionsView(PublisherService publisherService) { 46 public ListPublisherActionsView(PublisherService publisherService) {
......
...@@ -38,6 +38,20 @@ public class ListPublisherVersionsView implements Serializable { ...@@ -38,6 +38,20 @@ public class ListPublisherVersionsView implements Serializable {
38 private boolean viewAll; 38 private boolean viewAll;
39 private transient List<PublisherVersion> publisherVersions; 39 private transient List<PublisherVersion> publisherVersions;
40 40
41 + /**
42 + * Uses PublisherService to access data
43 + *
44 + * @param publisherService injected PublisherService
45 + */
46 + @Inject
47 + public ListPublisherVersionsView(PublisherService publisherService) {
48 + this.publisherService = publisherService;
49 + }
50 +
51 + ListPublisherVersionsView() {
52 + //no args constructor to make it proxyable
53 + }
54 +
41 @PostConstruct 55 @PostConstruct
42 @RequestAction 56 @RequestAction
43 public void init() { 57 public void init() {
...@@ -68,20 +82,6 @@ public class ListPublisherVersionsView implements Serializable { ...@@ -68,20 +82,6 @@ public class ListPublisherVersionsView implements Serializable {
68 } 82 }
69 83
70 /** 84 /**
71 - * Uses PublisherService to access data
72 - *
73 - * @param publisherService
74 - */
75 - @Inject
76 - public ListPublisherVersionsView(PublisherService publisherService) {
77 - this.publisherService = publisherService;
78 - }
79 -
80 - ListPublisherVersionsView() {
81 - //no args constructor to make it proxyable
82 - }
83 -
84 - /**
85 * Returns last validation action for Publisher 85 * Returns last validation action for Publisher
86 * 86 *
87 * @param publisher Publisher we want last Validate PublisherAction 87 * @param publisher Publisher we want last Validate PublisherAction
......
...@@ -4,12 +4,13 @@ import org.legrog.entities.PublisherVersion; ...@@ -4,12 +4,13 @@ import org.legrog.entities.PublisherVersion;
4 import org.legrog.entities.SearchingException; 4 import org.legrog.entities.SearchingException;
5 5
6 import javax.inject.Inject; 6 import javax.inject.Inject;
7 +import java.io.Serializable;
7 import java.util.List; 8 import java.util.List;
8 9
9 /** 10 /**
10 * View behind publisherSearch.xhtml 11 * View behind publisherSearch.xhtml
11 */ 12 */
12 -public class PublisherSearchView { 13 +public class PublisherSearchView implements Serializable {
13 14
14 transient PublisherService publisherService; 15 transient PublisherService publisherService;
15 16
...@@ -27,6 +28,12 @@ public class PublisherSearchView { ...@@ -27,6 +28,12 @@ public class PublisherSearchView {
27 //no args constructor to make it proxyable 28 //no args constructor to make it proxyable
28 } 29 }
29 30
31 + /**
32 + *
33 + * @param string String which you expect to find in indexed publishers
34 + * @return List<PublisherVersion>
35 + * @throws SearchingException when getting an error from PublisherSearchRepository
36 + */
30 public List<PublisherVersion> search(String string) throws SearchingException{ 37 public List<PublisherVersion> search(String string) throws SearchingException{
31 return publisherService.search(string); 38 return publisherService.search(string);
32 } 39 }
......