Showing
2 changed files
with
14 additions
and
0 deletions
... | @@ -45,6 +45,7 @@ public class PublisherServiceDefault implements PublisherService { | ... | @@ -45,6 +45,7 @@ public class PublisherServiceDefault implements PublisherService { |
45 | PublisherServiceDefault() { | 45 | PublisherServiceDefault() { |
46 | } | 46 | } |
47 | 47 | ||
48 | + @Override | ||
48 | public PublisherVersion addNewPublisher(PublisherVersion publisherVersion) { | 49 | public PublisherVersion addNewPublisher(PublisherVersion publisherVersion) { |
49 | Publisher publisher = new Publisher(); | 50 | Publisher publisher = new Publisher(); |
50 | Set<PublisherVersion> publisherVersions = new HashSet<>(); | 51 | Set<PublisherVersion> publisherVersions = new HashSet<>(); |
... | @@ -58,6 +59,7 @@ public class PublisherServiceDefault implements PublisherService { | ... | @@ -58,6 +59,7 @@ public class PublisherServiceDefault implements PublisherService { |
58 | return publisherVersion; | 59 | return publisherVersion; |
59 | } | 60 | } |
60 | 61 | ||
62 | + @Override | ||
61 | public PublisherVersion addVersionToPublisher(Publisher publisher, PublisherVersion publisherVersion) { | 63 | public PublisherVersion addVersionToPublisher(Publisher publisher, PublisherVersion publisherVersion) { |
62 | logger.trace("debut addVersionToPublisher, publisherVersion = {}", publisherVersion); | 64 | logger.trace("debut addVersionToPublisher, publisherVersion = {}", publisherVersion); |
63 | Set<PublisherVersion> publisherVersionSet = publisher.getVersions(); | 65 | Set<PublisherVersion> publisherVersionSet = publisher.getVersions(); |
... | @@ -72,6 +74,7 @@ public class PublisherServiceDefault implements PublisherService { | ... | @@ -72,6 +74,7 @@ public class PublisherServiceDefault implements PublisherService { |
72 | return publisherVersion; | 74 | return publisherVersion; |
73 | } | 75 | } |
74 | 76 | ||
77 | + @Override | ||
75 | public PublisherAction validatePublisherVersion(PublisherVersion publisherVersion) { | 78 | public PublisherAction validatePublisherVersion(PublisherVersion publisherVersion) { |
76 | Publisher publisher = publisherVersion.getPublisher(); | 79 | Publisher publisher = publisherVersion.getPublisher(); |
77 | publisher.setValidatedVersion(publisherVersion); | 80 | publisher.setValidatedVersion(publisherVersion); |
... | @@ -101,22 +104,27 @@ public class PublisherServiceDefault implements PublisherService { | ... | @@ -101,22 +104,27 @@ public class PublisherServiceDefault implements PublisherService { |
101 | } | 104 | } |
102 | 105 | ||
103 | // get | 106 | // get |
107 | + @Override | ||
104 | public List<PublisherVersion> getAllPublisherVersions() { | 108 | public List<PublisherVersion> getAllPublisherVersions() { |
105 | return publisherVersionRepository.findAll(); | 109 | return publisherVersionRepository.findAll(); |
106 | } | 110 | } |
107 | 111 | ||
112 | + @Override | ||
108 | public PublisherVersion getPublisherVersion(Integer publisherVersionId) { | 113 | public PublisherVersion getPublisherVersion(Integer publisherVersionId) { |
109 | return publisherVersionRepository.findOne(publisherVersionId); | 114 | return publisherVersionRepository.findOne(publisherVersionId); |
110 | } | 115 | } |
111 | 116 | ||
117 | + @Override | ||
112 | public PublisherAction getLastValidate(Publisher publisher) { | 118 | public PublisherAction getLastValidate(Publisher publisher) { |
113 | return publisherActionRepository.findFirstByActionTypeAndPublisherOrderByPublisherActionDatetimeDesc(ActionType.VALIDATE, publisher); | 119 | return publisherActionRepository.findFirstByActionTypeAndPublisherOrderByPublisherActionDatetimeDesc(ActionType.VALIDATE, publisher); |
114 | } | 120 | } |
115 | 121 | ||
122 | + @Override | ||
116 | public List<PublisherAction> getAllPublisherActions() { | 123 | public List<PublisherAction> getAllPublisherActions() { |
117 | return publisherActionRepository.findAll(); | 124 | return publisherActionRepository.findAll(); |
118 | } | 125 | } |
119 | 126 | ||
127 | + @Override | ||
120 | public List<PublisherAction> getAllPublisherVersionActions(PublisherVersion publisherVersion) { | 128 | public List<PublisherAction> getAllPublisherVersionActions(PublisherVersion publisherVersion) { |
121 | return publisherActionRepository.findByPublisherVersion(publisherVersion); | 129 | return publisherActionRepository.findByPublisherVersion(publisherVersion); |
122 | } | 130 | } | ... | ... |
... | @@ -30,15 +30,18 @@ public class SharedServiceDefault implements SharedService { | ... | @@ -30,15 +30,18 @@ public class SharedServiceDefault implements SharedService { |
30 | 30 | ||
31 | private List<DisplayNameMask> allDisplayNameMasks; | 31 | private List<DisplayNameMask> allDisplayNameMasks; |
32 | 32 | ||
33 | + @Override | ||
33 | public Country addCountry(Country country) { | 34 | public Country addCountry(Country country) { |
34 | countryRepository.save(country); | 35 | countryRepository.save(country); |
35 | return country; | 36 | return country; |
36 | } | 37 | } |
37 | 38 | ||
39 | + @Override | ||
38 | public List<Country> getAllCountries() { | 40 | public List<Country> getAllCountries() { |
39 | return countryRepository.findAll(); | 41 | return countryRepository.findAll(); |
40 | } | 42 | } |
41 | 43 | ||
44 | + @Override | ||
42 | public List<DisplayNameMask> getAllDisplayNameMasks() { | 45 | public List<DisplayNameMask> getAllDisplayNameMasks() { |
43 | if (allDisplayNameMasks == null) | 46 | if (allDisplayNameMasks == null) |
44 | { | 47 | { |
... | @@ -52,12 +55,15 @@ public class SharedServiceDefault implements SharedService { | ... | @@ -52,12 +55,15 @@ public class SharedServiceDefault implements SharedService { |
52 | return allDisplayNameMasks; | 55 | return allDisplayNameMasks; |
53 | } | 56 | } |
54 | 57 | ||
58 | + @Override | ||
55 | public List<AccountRole> getAvailableUserRoles() { | 59 | public List<AccountRole> getAvailableUserRoles() { |
56 | return accountRoleRepository.findAll(); | 60 | return accountRoleRepository.findAll(); |
57 | } | 61 | } |
58 | 62 | ||
63 | + @Override | ||
59 | public List<AccountProperty> getAvailableUserProperties() { return accountPropertyRepository.findAll(); } | 64 | public List<AccountProperty> getAvailableUserProperties() { return accountPropertyRepository.findAll(); } |
60 | 65 | ||
66 | + @Override | ||
61 | public Account getCurrentUser() { | 67 | public Account getCurrentUser() { |
62 | // TODO Remplacer l'astuce par une vraie récupération de l'utilisateur | 68 | // TODO Remplacer l'astuce par une vraie récupération de l'utilisateur |
63 | List<Account> accounts = userService.getAllUsers(); | 69 | List<Account> accounts = userService.getAllUsers(); | ... | ... |
-
Please register or login to post a comment