Merge branch 'infra' into historiqueEditeur
Conflicts: src/main/java/org/legrog/presentation/ListPublisherRevisionsBean.java src/main/java/org/legrog/presentation/ListPublisherRevisionsView.java src/main/java/org/legrog/web/publisher/ListPublisherRevisionsBean.java src/main/java/org/legrog/web/publisher/PublisherRevisionView.java src/main/java/org/legrog/web/publisher/PublisherService.java
Showing
37 changed files
with
171 additions
and
124 deletions
This diff is collapsed. Click to expand it.
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 ListPublisherRevisionsView { | ... | @@ -21,7 +16,7 @@ public class ListPublisherRevisionsView { |
21 | Logger logger = LoggerFactory.getLogger(getClass()); | 16 | Logger logger = LoggerFactory.getLogger(getClass()); |
22 | 17 | ||
23 | @Inject | 18 | @Inject |
24 | - PublisherRevisionService publisherRevisionService; | 19 | + PublisherService publisherService; |
25 | 20 | ||
26 | private Integer publisherId; | 21 | private Integer publisherId; |
27 | 22 | ||
... | @@ -48,17 +43,14 @@ public class ListPublisherRevisionsView { | ... | @@ -48,17 +43,14 @@ public class ListPublisherRevisionsView { |
48 | */ | 43 | */ |
49 | @PostConstruct | 44 | @PostConstruct |
50 | public void init() { | 45 | public void init() { |
51 | - publisherRevisions = publisherRevisionService.getAllPublisherRevisions(); | 46 | + publisherRevisions = publisherService.getAllPublisherRevisions(); |
52 | logger.info("init"); | 47 | logger.info("init"); |
53 | } | 48 | } |
54 | 49 | ||
55 | public void setView() { | 50 | public void setView() { |
56 | logger.info("setView"); | 51 | logger.info("setView"); |
57 | logger.info("publisherId = " + publisherId); | 52 | logger.info("publisherId = " + publisherId); |
58 | - viewAll = false; | 53 | + viewAll = ( publisherId == null ) ; |
59 | - if (publisherId == null) { | ||
60 | - viewAll = true; | ||
61 | - } | ||
62 | } | 54 | } |
63 | 55 | ||
64 | public Integer getPublisherId() { | 56 | public Integer getPublisherId() { | ... | ... |
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; |
... | @@ -17,7 +15,11 @@ import javax.inject.Inject; | ... | @@ -17,7 +15,11 @@ import javax.inject.Inject; |
17 | import javax.inject.Named; | 15 | import javax.inject.Named; |
18 | import java.io.Serializable; | 16 | import java.io.Serializable; |
19 | import java.sql.Timestamp; | 17 | import java.sql.Timestamp; |
20 | -import java.util.*; | 18 | +import java.util.Date; |
19 | +import java.util.HashSet; | ||
20 | +import java.util.List; | ||
21 | +import java.util.Random; | ||
22 | +import java.util.Set; | ||
21 | 23 | ||
22 | @Named | 24 | @Named |
23 | @ViewScoped | 25 | @ViewScoped |
... | @@ -26,8 +28,7 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -26,8 +28,7 @@ public class PublisherRevisionView implements Serializable { |
26 | 28 | ||
27 | @Inject | 29 | @Inject |
28 | private PublisherService publisherService; | 30 | private PublisherService publisherService; |
29 | - @Inject | 31 | + |
30 | - PublisherRevisionService publisherRevisionService; | ||
31 | @Inject | 32 | @Inject |
32 | UserService userService; | 33 | UserService userService; |
33 | @Inject | 34 | @Inject |
... | @@ -111,7 +112,7 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -111,7 +112,7 @@ public class PublisherRevisionView implements Serializable { |
111 | public void add() { | 112 | public void add() { |
112 | Publisher publisher = new Publisher(); | 113 | Publisher publisher = new Publisher(); |
113 | PublisherRevision publisherRevision = new PublisherRevision(); | 114 | PublisherRevision publisherRevision = new PublisherRevision(); |
114 | - HashSet<PublisherRevision> publisherRevisions = new HashSet<PublisherRevision>(); | 115 | + Set<PublisherRevision> publisherRevisions = new HashSet<PublisherRevision>(); |
115 | publisherRevisions.add(publisherRevision); | 116 | publisherRevisions.add(publisherRevision); |
116 | publisher.setRevisions(publisherRevisions); | 117 | publisher.setRevisions(publisherRevisions); |
117 | 118 | ||
... | @@ -119,8 +120,10 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -119,8 +120,10 @@ public class PublisherRevisionView implements Serializable { |
119 | 120 | ||
120 | setValues(publisherRevision); | 121 | setValues(publisherRevision); |
121 | 122 | ||
123 | + // FIXME un seul appel logique à faire (pour la gestion du rollback) | ||
122 | publisherService.addPublisher(publisher); | 124 | publisherService.addPublisher(publisher); |
123 | - publisherRevisionService.addPublisherRevision(publisherRevision); | 125 | + publisherService.addPublisherRevision(publisherRevision); |
126 | + | ||
124 | newPublisher = false; | 127 | newPublisher = false; |
125 | publisherRevisionId = publisherRevision.getPublisherRevisionId(); | 128 | publisherRevisionId = publisherRevision.getPublisherRevisionId(); |
126 | publisherId = publisher.getPublisherId(); | 129 | publisherId = publisher.getPublisherId(); |
... | @@ -135,8 +138,10 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -135,8 +138,10 @@ public class PublisherRevisionView implements Serializable { |
135 | 138 | ||
136 | setValues(publisherRevision); | 139 | setValues(publisherRevision); |
137 | 140 | ||
141 | + // FIXME un seul appel logique à faire (pour la gestion du rollback) | ||
138 | publisherService.addRevisionToPublisher(publisher, publisherRevision); | 142 | publisherService.addRevisionToPublisher(publisher, publisherRevision); |
139 | - publisherRevisionService.addPublisherRevision(publisherRevision); | 143 | + publisherService.addPublisherRevision(publisherRevision); |
144 | + | ||
140 | editMode = false; | 145 | editMode = false; |
141 | } | 146 | } |
142 | 147 | ||
... | @@ -144,7 +149,8 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -144,7 +149,8 @@ public class PublisherRevisionView implements Serializable { |
144 | logger.debug("publisherRevisionId = {}", this.publisherRevisionId); | 149 | logger.debug("publisherRevisionId = {}", this.publisherRevisionId); |
145 | 150 | ||
146 | if (publisherRevisionId != 0) { | 151 | if (publisherRevisionId != 0) { |
147 | - PublisherRevision publisherRevision = publisherRevisionService.getPublisherRevision(publisherRevisionId); | 152 | + |
153 | + PublisherRevision publisherRevision = publisherService.getPublisherRevision(publisherRevisionId); | ||
148 | 154 | ||
149 | logger.debug("Found a publisher revision : {}", publisherRevision.toString()); | 155 | logger.debug("Found a publisher revision : {}", publisherRevision.toString()); |
150 | 156 | ... | ... |
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 | } | ... | ... |
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
src/main/resources/logback.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<configuration> | ||
3 | + | ||
4 | + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
5 | + <layout class="ch.qos.logback.classic.PatternLayout"> | ||
6 | + <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> | ||
7 | + </layout> | ||
8 | + </appender> | ||
9 | + | ||
10 | + <logger name="org.legrog" level="DEBUG"/> | ||
11 | + | ||
12 | + <root level="warn"> | ||
13 | + <appender-ref ref="STDOUT" /> | ||
14 | + </root> | ||
15 | +</configuration> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -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