Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2016-11-16 17:25:43 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4c5c0a92e68af76e69b43d5d5af2f2c0a5d28a06
4c5c0a92
1 parent
e548b399
Ajout de constructeur avec injection.
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
src/main/java/org/legrog/web/publisher/PublisherServiceSpring.java
src/main/java/org/legrog/web/publisher/PublisherServiceSpring.java
View file @
4c5c0a9
...
...
@@ -25,14 +25,22 @@ import java.util.Set;
public
class
PublisherServiceSpring
implements
PublisherService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
@Inject
PublisherRepository
publisherRepository
;
@Inject
PublisherVersionRepository
publisherVersionRepository
;
SharedService
sharedService
;
@Inject
SharedService
sharedService
;
public
PublisherServiceSpring
(
PublisherRepository
publisherRepository
,
PublisherVersionRepository
publisherVersionRepository
,
SharedService
sharedService
)
{
this
.
publisherRepository
=
publisherRepository
;
this
.
publisherVersionRepository
=
publisherVersionRepository
;
this
.
sharedService
=
sharedService
;
}
//no args constructor to make it proxyable
PublisherServiceSpring
()
{
}
public
void
addNewPublisher
(
PublisherVersion
publisherVersion
)
{
Publisher
publisher
=
new
Publisher
();
...
...
@@ -45,6 +53,7 @@ public class PublisherServiceSpring implements PublisherService {
this
.
savePublisherVersion
(
publisherVersion
);
this
.
savePublisher
(
publisher
);
}
public
void
addVersionToPublisher
(
Publisher
publisher
,
PublisherVersion
publisherVersion
)
{
logger
.
trace
(
"debut addVersionToPublisher, publisherVersion = {}"
,
publisherVersion
);
Set
<
PublisherVersion
>
publisherVersionSet
=
publisher
.
getVersions
();
...
...
Please
register
or
login
to post a comment