Jean-Francois Leveque

Ajout d'@Override sur les implémentations

......@@ -45,6 +45,7 @@ public class PublisherServiceDefault implements PublisherService {
PublisherServiceDefault() {
}
@Override
public PublisherVersion addNewPublisher(PublisherVersion publisherVersion) {
Publisher publisher = new Publisher();
Set<PublisherVersion> publisherVersions = new HashSet<>();
......@@ -58,6 +59,7 @@ public class PublisherServiceDefault implements PublisherService {
return publisherVersion;
}
@Override
public PublisherVersion addVersionToPublisher(Publisher publisher, PublisherVersion publisherVersion) {
logger.trace("debut addVersionToPublisher, publisherVersion = {}", publisherVersion);
Set<PublisherVersion> publisherVersionSet = publisher.getVersions();
......@@ -72,6 +74,7 @@ public class PublisherServiceDefault implements PublisherService {
return publisherVersion;
}
@Override
public PublisherAction validatePublisherVersion(PublisherVersion publisherVersion) {
Publisher publisher = publisherVersion.getPublisher();
publisher.setValidatedVersion(publisherVersion);
......@@ -101,22 +104,27 @@ public class PublisherServiceDefault implements PublisherService {
}
// get
@Override
public List<PublisherVersion> getAllPublisherVersions() {
return publisherVersionRepository.findAll();
}
@Override
public PublisherVersion getPublisherVersion(Integer publisherVersionId) {
return publisherVersionRepository.findOne(publisherVersionId);
}
@Override
public PublisherAction getLastValidate(Publisher publisher) {
return publisherActionRepository.findFirstByActionTypeAndPublisherOrderByPublisherActionDatetimeDesc(ActionType.VALIDATE, publisher);
}
@Override
public List<PublisherAction> getAllPublisherActions() {
return publisherActionRepository.findAll();
}
@Override
public List<PublisherAction> getAllPublisherVersionActions(PublisherVersion publisherVersion) {
return publisherActionRepository.findByPublisherVersion(publisherVersion);
}
......
......@@ -30,15 +30,18 @@ public class SharedServiceDefault implements SharedService {
private List<DisplayNameMask> allDisplayNameMasks;
@Override
public Country addCountry(Country country) {
countryRepository.save(country);
return country;
}
@Override
public List<Country> getAllCountries() {
return countryRepository.findAll();
}
@Override
public List<DisplayNameMask> getAllDisplayNameMasks() {
if (allDisplayNameMasks == null)
{
......@@ -52,12 +55,15 @@ public class SharedServiceDefault implements SharedService {
return allDisplayNameMasks;
}
@Override
public List<AccountRole> getAvailableUserRoles() {
return accountRoleRepository.findAll();
}
@Override
public List<AccountProperty> getAvailableUserProperties() { return accountPropertyRepository.findAll(); }
@Override
public Account getCurrentUser() {
// TODO Remplacer l'astuce par une vraie récupération de l'utilisateur
List<Account> accounts = userService.getAllUsers();
......