JR Utily
Committed by Jean-Francois Leveque

moved everything for more readibility

Showing 34 changed files with 213 additions and 109 deletions
1 -package org.legrog.application;
2 -
3 -import org.legrog.entities.PublisherRevision;
4 -
5 -import java.util.List;
6 -
7 -public interface PublisherRevisionService {
8 - void addPublisherRevision(PublisherRevision publisherRevision);
9 -
10 - List<PublisherRevision> getAllPublisherRevisions();
11 -
12 - PublisherRevision getPublisherRevision(Integer publisherRevisionId);
13 -}
1 -package org.legrog.application;
2 -
3 -import org.legrog.entities.PublisherRevision;
4 -import org.legrog.entities.PublisherRevisionRepository;
5 -
6 -import javax.ejb.Stateless;
7 -import javax.inject.Inject;
8 -import java.util.List;
9 -
10 -@Stateless
11 -public class PublisherRevisionServiceSpring implements PublisherRevisionService {
12 - @Inject
13 - PublisherRevisionRepository publisherRevisionRepository;
14 -
15 - public void addPublisherRevision(PublisherRevision publisherRevision) {
16 - publisherRevisionRepository.save(publisherRevision);
17 - }
18 -
19 - public List<PublisherRevision> getAllPublisherRevisions() {
20 - return publisherRevisionRepository.findAll();
21 - }
22 -
23 - public PublisherRevision getPublisherRevision(Integer publisherRevisionId) {
24 - return publisherRevisionRepository.findOne(publisherRevisionId);
25 - }
26 -}
...\ No newline at end of file ...\ No newline at end of file
1 -package org.legrog.presentation; 1 +package org.legrog.web.book;
2 2
3 -import org.legrog.application.BookService;
4 import org.legrog.entities.Book; 3 import org.legrog.entities.Book;
5 4
6 import javax.enterprise.context.RequestScoped; 5 import javax.enterprise.context.RequestScoped;
......
1 -package org.legrog.application; 1 +package org.legrog.web.book;
2 2
3 import org.legrog.entities.Book; 3 import org.legrog.entities.Book;
4 4
......
1 -package org.legrog.application; 1 +package org.legrog.web.book;
2 2
3 import org.legrog.entities.Book; 3 import org.legrog.entities.Book;
4 import org.slf4j.Logger; 4 import org.slf4j.Logger;
...@@ -8,7 +8,6 @@ import javax.ejb.Stateless; ...@@ -8,7 +8,6 @@ import javax.ejb.Stateless;
8 import javax.enterprise.inject.Alternative; 8 import javax.enterprise.inject.Alternative;
9 import javax.inject.Inject; 9 import javax.inject.Inject;
10 import javax.persistence.EntityManager; 10 import javax.persistence.EntityManager;
11 -import javax.persistence.PersistenceContext;
12 import javax.persistence.criteria.CriteriaQuery; 11 import javax.persistence.criteria.CriteriaQuery;
13 import java.util.List; 12 import java.util.List;
14 13
......
1 -package org.legrog.application; 1 +package org.legrog.web.book;
2 2
3 3
4 import org.legrog.entities.Book; 4 import org.legrog.entities.Book;
5 import org.legrog.entities.BookRepository; 5 import org.legrog.entities.BookRepository;
6 +import org.legrog.web.book.BookService;
6 import org.slf4j.Logger; 7 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory; 8 import org.slf4j.LoggerFactory;
8 9
9 import javax.ejb.Stateless; 10 import javax.ejb.Stateless;
10 -import javax.enterprise.inject.Alternative;
11 import javax.inject.Inject; 11 import javax.inject.Inject;
12 import java.util.List; 12 import java.util.List;
13 13
......
1 -package org.legrog.presentation; 1 +package org.legrog.web.publisher;
2 2
3 -import org.legrog.application.PublisherRevisionService; 3 +import org.legrog.web.xyz.SharedService;
4 -import org.legrog.application.PublisherService; 4 +import org.legrog.web.user.UserService;
5 -import org.legrog.application.SharedService;
6 -import org.legrog.application.UserService;
7 import org.legrog.entities.Country; 5 import org.legrog.entities.Country;
8 import org.legrog.entities.Publisher; 6 import org.legrog.entities.Publisher;
9 import org.legrog.entities.PublisherRevision; 7 import org.legrog.entities.PublisherRevision;
...@@ -15,9 +13,8 @@ import javax.annotation.PostConstruct; ...@@ -15,9 +13,8 @@ import javax.annotation.PostConstruct;
15 import javax.enterprise.context.RequestScoped; 13 import javax.enterprise.context.RequestScoped;
16 import javax.inject.Inject; 14 import javax.inject.Inject;
17 import javax.inject.Named; 15 import javax.inject.Named;
18 -import java.util.Date;
19 import java.sql.Timestamp; 16 import java.sql.Timestamp;
20 -import java.time.ZoneId; 17 +import java.util.Date;
21 import java.util.HashSet; 18 import java.util.HashSet;
22 import java.util.List; 19 import java.util.List;
23 import java.util.Random; 20 import java.util.Random;
...@@ -33,8 +30,7 @@ public class AddPublisherBean { ...@@ -33,8 +30,7 @@ public class AddPublisherBean {
33 private UserService userService; 30 private UserService userService;
34 @Inject 31 @Inject
35 private PublisherService publisherService; 32 private PublisherService publisherService;
36 - @Inject 33 +
37 - private PublisherRevisionService publisherRevisionService;
38 34
39 private String publisherName; 35 private String publisherName;
40 private String publisherStreetAddress; 36 private String publisherStreetAddress;
...@@ -82,8 +78,11 @@ public class AddPublisherBean { ...@@ -82,8 +78,11 @@ public class AddPublisherBean {
82 // End TODO 78 // End TODO
83 publisherRevision.setPublisherRevisionAuthor(user); 79 publisherRevision.setPublisherRevisionAuthor(user);
84 logger.info(publisherRevision.toString()); 80 logger.info(publisherRevision.toString());
81 +
82 + // FIXME un seul appel logique à faire (pour la gestion du rollback)
85 publisherService.addPublisher(publisher); 83 publisherService.addPublisher(publisher);
86 - publisherRevisionService.addPublisherRevision(publisherRevision); 84 + publisherService.addPublisherRevision(publisherRevision);
85 +
87 // Test de récupération de l'Id 86 // Test de récupération de l'Id
88 logger.info(publisherRevision.toString()); 87 logger.info(publisherRevision.toString());
89 return "success"; 88 return "success";
......
1 +package org.legrog.web.publisher;
2 +
3 +import org.legrog.entities.PublisherRevision;
4 +import org.slf4j.Logger;
5 +import org.slf4j.LoggerFactory;
6 +
7 +import javax.annotation.PostConstruct;
8 +import javax.enterprise.context.RequestScoped;
9 +import javax.inject.Inject;
10 +import javax.inject.Named;
11 +import java.util.List;
12 +
13 +@Named
14 +@RequestScoped
15 +public class ListPublisherRevisionsBean {
16 + Logger logger = LoggerFactory.getLogger(getClass());
17 +
18 + @Inject
19 + PublisherService publisherRevisionService;
20 +
21 + private Integer publisherId;
22 +
23 + private boolean viewAll;
24 +
25 + private List<PublisherRevision> publisherRevisions;
26 +
27 + public List<PublisherRevision> getPublisherRevisions() {
28 + return publisherRevisions;
29 + }
30 +/*
31 + if (!viewAll) {
32 + logger.info("!viewAll");
33 + ArrayList<PublisherRevision> filteredPublisherRevisions= new ArrayList<PublisherRevision>();
34 + Iterator<PublisherRevision> publisherRevisionIterator = filteredPublisherRevisions.iterator();
35 + while (publisherRevisionIterator.hasNext()) {
36 + PublisherRevision publisherRevision = publisherRevisionIterator.next();
37 + if (publisherRevision.getPublisher().getPublisherId() == publisherId.intValue()) {
38 + filteredPublisherRevisions.add(publisherRevision);
39 + }
40 + }
41 + publisherRevisions = filteredPublisherRevisions;
42 + }
43 +*/
44 + @PostConstruct
45 + public void init() {
46 + publisherRevisions = publisherRevisionService.getAllPublisherRevisions();
47 + logger.info("init");
48 + }
49 +
50 + public void setView() {
51 + logger.info("setView");
52 + logger.info("publisherId = " + publisherId);
53 + viewAll = false;
54 + if (publisherId == null) {
55 + viewAll = true;
56 + }
57 + }
58 +
59 + public Integer getPublisherId() {
60 + return publisherId;
61 + }
62 +
63 + public void setPublisherId(Integer publisherId) {
64 + this.publisherId = publisherId;
65 + }
66 +
67 + public boolean isViewAll() {
68 + return viewAll;
69 + }
70 +}
1 -package org.legrog.presentation; 1 +package org.legrog.web.publisher;
2 2
3 -import org.legrog.application.PublisherRevisionService; 3 +import org.legrog.web.xyz.SharedService;
4 -import org.legrog.application.PublisherService; 4 +import org.legrog.web.user.UserService;
5 -import org.legrog.application.SharedService;
6 -import org.legrog.application.UserService;
7 import org.legrog.entities.Country; 5 import org.legrog.entities.Country;
8 import org.legrog.entities.Publisher; 6 import org.legrog.entities.Publisher;
9 import org.legrog.entities.PublisherRevision; 7 import org.legrog.entities.PublisherRevision;
...@@ -18,7 +16,9 @@ import javax.inject.Inject; ...@@ -18,7 +16,9 @@ import javax.inject.Inject;
18 import javax.inject.Named; 16 import javax.inject.Named;
19 import java.io.Serializable; 17 import java.io.Serializable;
20 import java.sql.Timestamp; 18 import java.sql.Timestamp;
21 -import java.util.*; 19 +import java.util.Date;
20 +import java.util.List;
21 +import java.util.Random;
22 22
23 @Named 23 @Named
24 @ViewScoped 24 @ViewScoped
...@@ -27,8 +27,7 @@ public class PublisherRevisionView implements Serializable { ...@@ -27,8 +27,7 @@ public class PublisherRevisionView implements Serializable {
27 27
28 @Inject 28 @Inject
29 private PublisherService publisherService; 29 private PublisherService publisherService;
30 - @Inject 30 +
31 - PublisherRevisionService publisherRevisionService;
32 @Inject 31 @Inject
33 UserService userService; 32 UserService userService;
34 @Inject 33 @Inject
...@@ -137,7 +136,8 @@ public class PublisherRevisionView implements Serializable { ...@@ -137,7 +136,8 @@ public class PublisherRevisionView implements Serializable {
137 setValues(publisherRevision); 136 setValues(publisherRevision);
138 137
139 publisherService.addRevisionToPublisher(publisher, publisherRevision); 138 publisherService.addRevisionToPublisher(publisher, publisherRevision);
140 - publisherRevisionService.addPublisherRevision(publisherRevision); 139 + publisherService.addPublisherRevision(publisherRevision);
140 +
141 editMode = false; 141 editMode = false;
142 } 142 }
143 143
......
1 -package org.legrog.application; 1 +package org.legrog.web.publisher;
2 2
3 import org.legrog.entities.Publisher; 3 import org.legrog.entities.Publisher;
4 import org.legrog.entities.PublisherRevision; 4 import org.legrog.entities.PublisherRevision;
...@@ -6,6 +6,7 @@ import org.legrog.entities.PublisherRevision; ...@@ -6,6 +6,7 @@ import org.legrog.entities.PublisherRevision;
6 import java.util.List; 6 import java.util.List;
7 7
8 public interface PublisherService { 8 public interface PublisherService {
9 +
9 void addPublisher(Publisher publisher); 10 void addPublisher(Publisher publisher);
10 11
11 void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision); 12 void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision);
...@@ -13,4 +14,10 @@ public interface PublisherService { ...@@ -13,4 +14,10 @@ public interface PublisherService {
13 List<Publisher> getAllPublishers(); 14 List<Publisher> getAllPublishers();
14 15
15 Publisher getPublisher(Integer publisherId); 16 Publisher getPublisher(Integer publisherId);
17 +
18 + void addPublisherRevision(PublisherRevision publisherRevision);
19 +
20 + List<PublisherRevision> getAllPublisherRevisions();
21 +
22 + PublisherRevision getPublisherRevision(Integer publisherRevisionId);
16 } 23 }
......
1 -package org.legrog.application; 1 +package org.legrog.web.publisher;
2 2
3 3
4 import org.legrog.entities.Publisher; 4 import org.legrog.entities.Publisher;
5 import org.legrog.entities.PublisherRepository; 5 import org.legrog.entities.PublisherRepository;
6 import org.legrog.entities.PublisherRevision; 6 import org.legrog.entities.PublisherRevision;
7 +import org.legrog.entities.PublisherRevisionRepository;
7 8
8 import javax.ejb.Stateless; 9 import javax.ejb.Stateless;
9 import javax.inject.Inject; 10 import javax.inject.Inject;
...@@ -15,6 +16,21 @@ public class PublisherServiceSpring implements PublisherService { ...@@ -15,6 +16,21 @@ public class PublisherServiceSpring implements PublisherService {
15 @Inject 16 @Inject
16 PublisherRepository publisherRepository; 17 PublisherRepository publisherRepository;
17 18
19 + @Inject
20 + PublisherRevisionRepository publisherRevisionRepository;
21 +
22 + public void addPublisherRevision(PublisherRevision publisherRevision) {
23 + publisherRevisionRepository.save(publisherRevision);
24 + }
25 +
26 + public List<PublisherRevision> getAllPublisherRevisions() {
27 + return publisherRevisionRepository.findAll();
28 + }
29 +
30 + public PublisherRevision getPublisherRevision(Integer publisherRevisionId) {
31 + return publisherRevisionRepository.findOne(publisherRevisionId);
32 + }
33 +
18 public void addPublisher(Publisher publisher) { 34 public void addPublisher(Publisher publisher) {
19 publisherRepository.save(publisher); 35 publisherRepository.save(publisher);
20 } 36 }
......
1 -package org.legrog.presentation; 1 +package org.legrog.web.user;
2 2
3 -import org.legrog.application.UserService;
4 import org.legrog.entities.User; 3 import org.legrog.entities.User;
5 4
6 import javax.annotation.PostConstruct; 5 import javax.annotation.PostConstruct;
......
1 -package org.legrog.presentation; 1 +package org.legrog.web.user;
2 2
3 -import org.legrog.application.SharedService; 3 +import org.legrog.web.xyz.SharedService;
4 -import org.legrog.application.UserService;
5 import org.legrog.entities.*; 4 import org.legrog.entities.*;
6 import org.slf4j.Logger; 5 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory; 6 import org.slf4j.LoggerFactory;
8 7
9 import javax.annotation.PostConstruct; 8 import javax.annotation.PostConstruct;
10 -import javax.enterprise.context.RequestScoped;
11 import javax.faces.bean.ManagedProperty; 9 import javax.faces.bean.ManagedProperty;
12 import javax.faces.bean.SessionScoped; 10 import javax.faces.bean.SessionScoped;
13 -import javax.faces.context.ExternalContext;
14 -import javax.faces.context.FacesContext;
15 -import javax.faces.view.ViewScoped;
16 import javax.inject.Inject; 11 import javax.inject.Inject;
17 import javax.inject.Named; 12 import javax.inject.Named;
18 -import java.io.IOException;
19 import java.util.ArrayList; 13 import java.util.ArrayList;
20 import java.util.Date; 14 import java.util.Date;
21 import java.util.List; 15 import java.util.List;
......
1 -package org.legrog.application; 1 +package org.legrog.web.user;
2 2
3 import org.legrog.entities.User; 3 import org.legrog.entities.User;
4 4
......
1 -package org.legrog.application; 1 +package org.legrog.web.user;
2 2
3 import org.legrog.entities.User; 3 import org.legrog.entities.User;
4 import org.legrog.entities.UserRepository; 4 import org.legrog.entities.UserRepository;
......
1 -package org.legrog.presentation; 1 +package org.legrog.web.xyz;
2 2
3 -import org.legrog.application.SharedService;
4 import org.legrog.entities.Country; 3 import org.legrog.entities.Country;
5 4
6 import javax.enterprise.context.RequestScoped; 5 import javax.enterprise.context.RequestScoped;
......
1 -package org.legrog.presentation; 1 +package org.legrog.web.xyz;
2 2
3 -import org.legrog.application.SharedService;
4 import org.legrog.entities.Country; 3 import org.legrog.entities.Country;
5 4
6 import javax.annotation.PostConstruct; 5 import javax.annotation.PostConstruct;
......
1 -package org.legrog.application; 1 +package org.legrog.web.xyz;
2 2
3 import org.legrog.entities.Country; 3 import org.legrog.entities.Country;
4 import org.legrog.entities.DisplayNameMask; 4 import org.legrog.entities.DisplayNameMask;
......
1 -package org.legrog.application; 1 +package org.legrog.web.xyz;
2 2
3 import org.legrog.entities.*; 3 import org.legrog.entities.*;
4 //import org.slf4j.Logger; 4 //import org.slf4j.Logger;
......
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +
3 +<body jsf:id="root-body" xmlns="http://www.w3.org/1999/xhtml"
4 + xmlns:h="http://xmlns.jcp.org/jsf/html"
5 + xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
6 + xmlns:f="http://xmlns.jcp.org/jsf/core"
7 + xmlns:jsf="http://xmlns.jcp.org/jsf">
8 +<p>
9 + I'm looking for something
10 +</p>
11 +
12 +<p>
13 +And this is my string : #{testRootView.foo}
14 +</p>
15 +
16 +
17 +<p>
18 + And this is another string : #{testRootView.bar}
19 +</p>
20 +
21 +</body>
1 +package org.legrog.web.xyz;
2 +
3 +import javax.inject.Named;
4 +import java.io.Serializable;
5 +
6 +@Named
7 +@javax.enterprise.context.RequestScoped
8 +//@URLMapping(id = "testroot", pattern = "/testRoot/#{bar : testRootView.bar}", viewId = "xyz/TestRoot.jsf")
9 +public class TestRootView implements Serializable {
10 +
11 + String foo = "my first String";
12 +
13 + String bar ="";
14 +
15 +//
16 +// public void init() {
17 +// if (number == null) {
18 +// foo = "my second String";
19 +// } else {
20 +// foo = "my string #"+number;
21 +// }
22 +//
23 +// }
24 +
25 + public String getFoo() {
26 + return foo;
27 + }
28 +
29 + public void setFoo(String foo) {
30 + this.foo = foo;
31 + }
32 +
33 + public String getBar() {
34 + return bar;
35 + }
36 +
37 + public void setBar(String bar) {
38 + this.bar = bar;
39 + }
40 +}
...@@ -17,92 +17,92 @@ ...@@ -17,92 +17,92 @@
17 <from-view-id>/index.xhtml</from-view-id> 17 <from-view-id>/index.xhtml</from-view-id>
18 <navigation-case> 18 <navigation-case>
19 <from-outcome>addBook</from-outcome> 19 <from-outcome>addBook</from-outcome>
20 - <to-view-id>/book.xhtml</to-view-id> 20 + <to-view-id>/book/book.xhtml</to-view-id>
21 </navigation-case> 21 </navigation-case>
22 <navigation-case> 22 <navigation-case>
23 <from-outcome>listBooks</from-outcome> 23 <from-outcome>listBooks</from-outcome>
24 - <to-view-id>/result.xhtml</to-view-id> 24 + <to-view-id>/book/result.xhtml</to-view-id>
25 </navigation-case> 25 </navigation-case>
26 <navigation-case> 26 <navigation-case>
27 <from-outcome>addCountry</from-outcome> 27 <from-outcome>addCountry</from-outcome>
28 - <to-view-id>/addCountry.xhtml</to-view-id> 28 + <to-view-id>/xyz/addCountry.xhtml</to-view-id>
29 </navigation-case> 29 </navigation-case>
30 <navigation-case> 30 <navigation-case>
31 <from-outcome>listCountries</from-outcome> 31 <from-outcome>listCountries</from-outcome>
32 - <to-view-id>/listCountries.xhtml</to-view-id> 32 + <to-view-id>/xyz/listCountries.xhtml</to-view-id>
33 </navigation-case> 33 </navigation-case>
34 <navigation-case> 34 <navigation-case>
35 <from-outcome>addUser</from-outcome> 35 <from-outcome>addUser</from-outcome>
36 - <to-view-id>/updateUser.xhtml</to-view-id> 36 + <to-view-id>/user/updateUser.xhtml</to-view-id>
37 </navigation-case> 37 </navigation-case>
38 <navigation-case> 38 <navigation-case>
39 <from-outcome>listUsers</from-outcome> 39 <from-outcome>listUsers</from-outcome>
40 - <to-view-id>/listUsers.xhtml</to-view-id> 40 + <to-view-id>/user/listUsers.xhtml</to-view-id>
41 </navigation-case> 41 </navigation-case>
42 </navigation-rule> 42 </navigation-rule>
43 <navigation-rule> 43 <navigation-rule>
44 - <from-view-id>/addPublisher.xhtml</from-view-id> 44 + <from-view-id>/publisher/addPublisher.xhtml</from-view-id>
45 <navigation-case> 45 <navigation-case>
46 <from-outcome>success</from-outcome> 46 <from-outcome>success</from-outcome>
47 - <to-view-id>/listPublisherRevisions.xhtml</to-view-id> 47 + <to-view-id>/publisher/listPublisherRevisions.xhtml</to-view-id>
48 </navigation-case> 48 </navigation-case>
49 </navigation-rule> 49 </navigation-rule>
50 <navigation-rule> 50 <navigation-rule>
51 - <from-view-id>/addCountry.xhtml</from-view-id> 51 + <from-view-id>/xyz/addCountry.xhtml</from-view-id>
52 <navigation-case> 52 <navigation-case>
53 <from-outcome>success</from-outcome> 53 <from-outcome>success</from-outcome>
54 - <to-view-id>/listCountries.xhtml</to-view-id> 54 + <to-view-id>/xyz/listCountries.xhtml</to-view-id>
55 </navigation-case> 55 </navigation-case>
56 </navigation-rule> 56 </navigation-rule>
57 57
58 <navigation-rule> 58 <navigation-rule>
59 - <from-view-id>/addUser_short.xhtml</from-view-id> 59 + <from-view-id>/user/addUser_short.xhtml</from-view-id>
60 <navigation-case> 60 <navigation-case>
61 <from-outcome>success</from-outcome> 61 <from-outcome>success</from-outcome>
62 - <to-view-id>/listUsers_short.xhtml</to-view-id> 62 + <to-view-id>/user/listUsers_short.xhtml</to-view-id>
63 </navigation-case> 63 </navigation-case>
64 </navigation-rule> 64 </navigation-rule>
65 65
66 <navigation-rule> 66 <navigation-rule>
67 - <from-view-id>/book.xhtml</from-view-id> 67 + <from-view-id>/book/book.xhtml</from-view-id>
68 <navigation-case> 68 <navigation-case>
69 <from-outcome>success</from-outcome> 69 <from-outcome>success</from-outcome>
70 - <to-view-id>/result.xhtml</to-view-id> 70 + <to-view-id>/book/result.xhtml</to-view-id>
71 </navigation-case> 71 </navigation-case>
72 </navigation-rule> 72 </navigation-rule>
73 73
74 <navigation-rule> 74 <navigation-rule>
75 - <from-view-id>/result.xhtml</from-view-id> 75 + <from-view-id>/book/result.xhtml</from-view-id>
76 <navigation-case> 76 <navigation-case>
77 <from-outcome>back</from-outcome> 77 <from-outcome>back</from-outcome>
78 - <to-view-id>/book.xhtml</to-view-id> 78 + <to-view-id>/book/book.xhtml</to-view-id>
79 </navigation-case> 79 </navigation-case>
80 </navigation-rule> 80 </navigation-rule>
81 81
82 <navigation-rule> 82 <navigation-rule>
83 - <from-view-id>/updateUser.xhtml</from-view-id> 83 + <from-view-id>/user/updateUser.xhtml</from-view-id>
84 <navigation-case> 84 <navigation-case>
85 <from-outcome>cancel</from-outcome> 85 <from-outcome>cancel</from-outcome>
86 - <to-view-id>/listUsers.xhtml</to-view-id> 86 + <to-view-id>/user/listUsers.xhtml</to-view-id>
87 </navigation-case> 87 </navigation-case>
88 <navigation-case> 88 <navigation-case>
89 <from-outcome>success</from-outcome> 89 <from-outcome>success</from-outcome>
90 - <to-view-id>/listUsers.xhtml</to-view-id> 90 + <to-view-id>/user/listUsers.xhtml</to-view-id>
91 </navigation-case> 91 </navigation-case>
92 </navigation-rule> 92 </navigation-rule>
93 <navigation-rule> 93 <navigation-rule>
94 - <from-view-id>/listUsers.xhtml</from-view-id> 94 + <from-view-id>/user/listUsers.xhtml</from-view-id>
95 <navigation-case> 95 <navigation-case>
96 <from-outcome>add</from-outcome> 96 <from-outcome>add</from-outcome>
97 - <to-view-id>/updateUser.xhtml</to-view-id> 97 + <to-view-id>/user/updateUser.xhtml</to-view-id>
98 </navigation-case> 98 </navigation-case>
99 </navigation-rule> 99 </navigation-rule>
100 100
101 <navigation-rule> 101 <navigation-rule>
102 - <from-view-id>/listPublisherRevisions.xhtml</from-view-id> 102 + <from-view-id>/publisher/listPublisherRevisions.xhtml</from-view-id>
103 <navigation-case> 103 <navigation-case>
104 <from-outcome>view</from-outcome> 104 <from-outcome>view</from-outcome>
105 - <to-view-id>/publisherRevision.xhtml</to-view-id> 105 + <to-view-id>/publisher/publisherRevision.xhtml</to-view-id>
106 </navigation-case> 106 </navigation-case>
107 </navigation-rule> 107 </navigation-rule>
108 </faces-config> 108 </faces-config>
...\ No newline at end of file ...\ No newline at end of file
......
1 -package org.legrog.application; 1 +package org.legrog.web.book;
2 2
3 import org.junit.Before; 3 import org.junit.Before;
4 import org.junit.Test; 4 import org.junit.Test;
5 import org.junit.runner.RunWith; 5 import org.junit.runner.RunWith;
6 import org.legrog.entities.Book; 6 import org.legrog.entities.Book;
7 +import org.legrog.web.book.BookServiceOld;
7 import org.mockito.Answers; 8 import org.mockito.Answers;
8 import org.mockito.Mock; 9 import org.mockito.Mock;
9 import org.mockito.Mockito; 10 import org.mockito.Mockito;
......