Showing
34 changed files
with
144 additions
and
117 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.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.presentation; | 1 | +package org.legrog.web.publisher; |
2 | 2 | ||
3 | -import org.legrog.application.PublisherRevisionService; | ||
4 | -import org.legrog.application.PublisherService; | ||
5 | -import org.legrog.entities.Publisher; | ||
6 | import org.legrog.entities.PublisherRevision; | 3 | import org.legrog.entities.PublisherRevision; |
7 | import org.slf4j.Logger; | 4 | import org.slf4j.Logger; |
8 | import org.slf4j.LoggerFactory; | 5 | import org.slf4j.LoggerFactory; |
... | @@ -11,8 +8,6 @@ import javax.annotation.PostConstruct; | ... | @@ -11,8 +8,6 @@ import javax.annotation.PostConstruct; |
11 | import javax.enterprise.context.RequestScoped; | 8 | import javax.enterprise.context.RequestScoped; |
12 | import javax.inject.Inject; | 9 | import javax.inject.Inject; |
13 | import javax.inject.Named; | 10 | import javax.inject.Named; |
14 | -import java.util.ArrayList; | ||
15 | -import java.util.Iterator; | ||
16 | import java.util.List; | 11 | import java.util.List; |
17 | 12 | ||
18 | @Named | 13 | @Named |
... | @@ -21,7 +16,7 @@ public class ListPublisherRevisionsBean { | ... | @@ -21,7 +16,7 @@ public class ListPublisherRevisionsBean { |
21 | Logger logger = LoggerFactory.getLogger(getClass()); | 16 | Logger logger = LoggerFactory.getLogger(getClass()); |
22 | 17 | ||
23 | @Inject | 18 | @Inject |
24 | - PublisherRevisionService publisherRevisionService; | 19 | + PublisherService publisherRevisionService; |
25 | 20 | ||
26 | private Integer publisherId; | 21 | private Integer publisherId; |
27 | 22 | ... | ... |
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; |
... | @@ -20,7 +18,6 @@ import java.sql.Timestamp; | ... | @@ -20,7 +18,6 @@ import java.sql.Timestamp; |
20 | import java.util.Date; | 18 | import java.util.Date; |
21 | import java.util.List; | 19 | import java.util.List; |
22 | import java.util.Random; | 20 | import java.util.Random; |
23 | -import java.util.Set; | ||
24 | 21 | ||
25 | @Named | 22 | @Named |
26 | @ViewScoped | 23 | @ViewScoped |
... | @@ -29,8 +26,7 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -29,8 +26,7 @@ public class PublisherRevisionView implements Serializable { |
29 | 26 | ||
30 | @Inject | 27 | @Inject |
31 | private PublisherService publisherService; | 28 | private PublisherService publisherService; |
32 | - @Inject | 29 | + |
33 | - PublisherRevisionService publisherRevisionService; | ||
34 | @Inject | 30 | @Inject |
35 | UserService userService; | 31 | UserService userService; |
36 | @Inject | 32 | @Inject |
... | @@ -101,15 +97,17 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -101,15 +97,17 @@ public class PublisherRevisionView implements Serializable { |
101 | // End TODO | 97 | // End TODO |
102 | publisherRevision.setPublisherRevisionAuthor(user); | 98 | publisherRevision.setPublisherRevisionAuthor(user); |
103 | 99 | ||
100 | + // FIXME un seul appel logique à faire (pour la gestion du rollback) | ||
104 | publisherService.addRevisionToPublisher(publisher, publisherRevision); | 101 | publisherService.addRevisionToPublisher(publisher, publisherRevision); |
105 | - publisherRevisionService.addPublisherRevision(publisherRevision); | 102 | + publisherService.addPublisherRevision(publisherRevision); |
103 | + | ||
106 | editMode = false; | 104 | editMode = false; |
107 | } | 105 | } |
108 | 106 | ||
109 | public void loadData() { | 107 | public void loadData() { |
110 | logger.debug("publisherRevisionId = {}", this.publisherRevisionId); | 108 | logger.debug("publisherRevisionId = {}", this.publisherRevisionId); |
111 | 109 | ||
112 | - PublisherRevision publisherRevision = publisherRevisionService.getPublisherRevision(publisherRevisionId); | 110 | + PublisherRevision publisherRevision = publisherService.getPublisherRevision(publisherRevisionId); |
113 | 111 | ||
114 | logger.debug("Found a publisher revision : {}", publisherRevision.toString()); | 112 | logger.debug("Found a publisher revision : {}", publisherRevision.toString()); |
115 | 113 | ... | ... |
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,9 +6,16 @@ import org.legrog.entities.PublisherRevision; | ... | @@ -6,9 +6,16 @@ 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); |
12 | 13 | ||
13 | List<Publisher> getAllPublishers(); | 14 | List<Publisher> getAllPublishers(); |
15 | + | ||
16 | + void addPublisherRevision(PublisherRevision publisherRevision); | ||
17 | + | ||
18 | + List<PublisherRevision> getAllPublisherRevisions(); | ||
19 | + | ||
20 | + PublisherRevision getPublisherRevision(Integer publisherRevisionId); | ||
14 | } | 21 | } | ... | ... |
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 | } | ... | ... |
File moved
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; | ... | ... |
File moved
File moved
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 | +<?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 | +} |
File moved
... | @@ -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; | ... | ... |
-
Please register or login to post a comment