Jean-Francois Leveque

Passage correctif SonarQube

......@@ -40,7 +40,7 @@ public class ListPublisherActionsView implements Serializable {
/**
* Uses PublisherService to get actions
*
* @param publisherService
* @param publisherService injected PublisherService
*/
@Inject
public ListPublisherActionsView(PublisherService publisherService) {
......
......@@ -38,6 +38,20 @@ public class ListPublisherVersionsView implements Serializable {
private boolean viewAll;
private transient List<PublisherVersion> publisherVersions;
/**
* Uses PublisherService to access data
*
* @param publisherService injected PublisherService
*/
@Inject
public ListPublisherVersionsView(PublisherService publisherService) {
this.publisherService = publisherService;
}
ListPublisherVersionsView() {
//no args constructor to make it proxyable
}
@PostConstruct
@RequestAction
public void init() {
......@@ -68,20 +82,6 @@ public class ListPublisherVersionsView implements Serializable {
}
/**
* Uses PublisherService to access data
*
* @param publisherService
*/
@Inject
public ListPublisherVersionsView(PublisherService publisherService) {
this.publisherService = publisherService;
}
ListPublisherVersionsView() {
//no args constructor to make it proxyable
}
/**
* Returns last validation action for Publisher
*
* @param publisher Publisher we want last Validate PublisherAction
......
......@@ -4,12 +4,13 @@ import org.legrog.entities.PublisherVersion;
import org.legrog.entities.SearchingException;
import javax.inject.Inject;
import java.io.Serializable;
import java.util.List;
/**
* View behind publisherSearch.xhtml
*/
public class PublisherSearchView {
public class PublisherSearchView implements Serializable {
transient PublisherService publisherService;
......@@ -27,6 +28,12 @@ public class PublisherSearchView {
//no args constructor to make it proxyable
}
/**
*
* @param string String which you expect to find in indexed publishers
* @return List<PublisherVersion>
* @throws SearchingException when getting an error from PublisherSearchRepository
*/
public List<PublisherVersion> search(String string) throws SearchingException{
return publisherService.search(string);
}
......