Commit 63ba58abf29a9dbbe2befa708d47e0883757717d

Authored by Cleverson Sacramento
1 parent 9b6b708e
Exists in master

Criação da extensão Servlet e transferência de recursos da extensão JSF

para a Servlet.
Showing 21 changed files with 626 additions and 294 deletions   Show diff stats
impl/extension/jsf/pom.xml
@@ -53,6 +53,10 @@ @@ -53,6 +53,10 @@
53 53
54 <dependencies> 54 <dependencies>
55 <dependency> 55 <dependency>
  56 + <groupId>br.gov.frameworkdemoiselle</groupId>
  57 + <artifactId>demoiselle-servlet</artifactId>
  58 + </dependency>
  59 + <dependency>
56 <groupId>com.sun.faces</groupId> 60 <groupId>com.sun.faces</groupId>
57 <artifactId>jsf-api</artifactId> 61 <artifactId>jsf-api</artifactId>
58 </dependency> 62 </dependency>
@@ -61,14 +65,6 @@ @@ -61,14 +65,6 @@
61 <artifactId>jsf-impl</artifactId> 65 <artifactId>jsf-impl</artifactId>
62 </dependency> 66 </dependency>
63 <dependency> 67 <dependency>
64 - <groupId>javax.servlet</groupId>  
65 - <artifactId>jstl</artifactId>  
66 - </dependency>  
67 - <dependency>  
68 - <groupId>javax.servlet</groupId>  
69 - <artifactId>servlet-api</artifactId>  
70 - </dependency>  
71 - <dependency>  
72 <groupId>javax.el</groupId> 68 <groupId>javax.el</groupId>
73 <artifactId>el-api</artifactId> 69 <artifactId>el-api</artifactId>
74 </dependency> 70 </dependency>
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/JsfBootstrap.java
@@ -38,11 +38,22 @@ package br.gov.frameworkdemoiselle.internal.bootstrap; @@ -38,11 +38,22 @@ package br.gov.frameworkdemoiselle.internal.bootstrap;
38 38
39 import javax.enterprise.event.Observes; 39 import javax.enterprise.event.Observes;
40 import javax.enterprise.inject.spi.AfterBeanDiscovery; 40 import javax.enterprise.inject.spi.AfterBeanDiscovery;
  41 +import javax.enterprise.inject.spi.AnnotatedType;
  42 +import javax.enterprise.inject.spi.ProcessAnnotatedType;
41 43
42 import br.gov.frameworkdemoiselle.internal.context.ViewContext; 44 import br.gov.frameworkdemoiselle.internal.context.ViewContext;
  45 +import br.gov.frameworkdemoiselle.internal.producer.ServletLocaleProducer;
43 46
44 public class JsfBootstrap extends AbstractBootstrap { 47 public class JsfBootstrap extends AbstractBootstrap {
45 48
  49 + protected <T> void cancelServletLocaleProducer(@Observes final ProcessAnnotatedType<T> event) {
  50 + final AnnotatedType<T> annotatedType = event.getAnnotatedType();
  51 +
  52 + if (annotatedType.getJavaClass() == ServletLocaleProducer.class) {
  53 + event.veto();
  54 + }
  55 + }
  56 +
46 public void loadContexts(@Observes final AfterBeanDiscovery event) { 57 public void loadContexts(@Observes final AfterBeanDiscovery event) {
47 addContext(new ViewContext(), event); 58 addContext(new ViewContext(), event);
48 } 59 }
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpServletRequestProducer.java
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -/*  
2 - * Demoiselle Framework  
3 - * Copyright (C) 2010 SERPRO  
4 - * ----------------------------------------------------------------------------  
5 - * This file is part of Demoiselle Framework.  
6 - *  
7 - * Demoiselle Framework is free software; you can redistribute it and/or  
8 - * modify it under the terms of the GNU Lesser General Public License version 3  
9 - * as published by the Free Software Foundation.  
10 - *  
11 - * This program is distributed in the hope that it will be useful,  
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of  
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
14 - * GNU General Public License for more details.  
15 - *  
16 - * You should have received a copy of the GNU Lesser General Public License version 3  
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>  
18 - * or write to the Free Software Foundation, Inc., 51 Franklin Street,  
19 - * Fifth Floor, Boston, MA 02110-1301, USA.  
20 - * ----------------------------------------------------------------------------  
21 - * Este arquivo é parte do Framework Demoiselle.  
22 - *  
23 - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou  
24 - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação  
25 - * do Software Livre (FSF).  
26 - *  
27 - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA  
28 - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou  
29 - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português  
30 - * para maiores detalhes.  
31 - *  
32 - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título  
33 - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>  
34 - * ou escreva para a Fundação do Software Livre (FSF) Inc.,  
35 - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.  
36 - */  
37 -package br.gov.frameworkdemoiselle.internal.producer;  
38 -  
39 -import javax.enterprise.context.RequestScoped;  
40 -import javax.enterprise.inject.Default;  
41 -import javax.enterprise.inject.Produces;  
42 -import javax.faces.context.FacesContext;  
43 -import javax.servlet.http.HttpServletRequest;  
44 -  
45 -public class HttpServletRequestProducer {  
46 -  
47 - @Produces  
48 - @Default  
49 - @RequestScoped  
50 - public HttpServletRequest create(final FacesContext facesContext) {  
51 - return (HttpServletRequest) facesContext.getExternalContext().getRequest();  
52 - }  
53 -}  
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpServletResponseProducer.java
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -/*  
2 - * Demoiselle Framework  
3 - * Copyright (C) 2010 SERPRO  
4 - * ----------------------------------------------------------------------------  
5 - * This file is part of Demoiselle Framework.  
6 - *  
7 - * Demoiselle Framework is free software; you can redistribute it and/or  
8 - * modify it under the terms of the GNU Lesser General Public License version 3  
9 - * as published by the Free Software Foundation.  
10 - *  
11 - * This program is distributed in the hope that it will be useful,  
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of  
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
14 - * GNU General Public License for more details.  
15 - *  
16 - * You should have received a copy of the GNU Lesser General Public License version 3  
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>  
18 - * or write to the Free Software Foundation, Inc., 51 Franklin Street,  
19 - * Fifth Floor, Boston, MA 02110-1301, USA.  
20 - * ----------------------------------------------------------------------------  
21 - * Este arquivo é parte do Framework Demoiselle.  
22 - *  
23 - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou  
24 - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação  
25 - * do Software Livre (FSF).  
26 - *  
27 - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA  
28 - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou  
29 - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português  
30 - * para maiores detalhes.  
31 - *  
32 - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título  
33 - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>  
34 - * ou escreva para a Fundação do Software Livre (FSF) Inc.,  
35 - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.  
36 - */  
37 -package br.gov.frameworkdemoiselle.internal.producer;  
38 -  
39 -import javax.enterprise.context.RequestScoped;  
40 -import javax.enterprise.inject.Default;  
41 -import javax.enterprise.inject.Produces;  
42 -import javax.faces.context.FacesContext;  
43 -import javax.servlet.http.HttpServletResponse;  
44 -  
45 -public class HttpServletResponseProducer {  
46 -  
47 - @Produces  
48 - @Default  
49 - @RequestScoped  
50 - public HttpServletResponse create(final FacesContext facesContext) {  
51 - return (HttpServletResponse) facesContext.getExternalContext().getResponse();  
52 - }  
53 -}  
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpSessionProducer.java
@@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
1 -/*  
2 - * Demoiselle Framework  
3 - * Copyright (C) 2010 SERPRO  
4 - * ----------------------------------------------------------------------------  
5 - * This file is part of Demoiselle Framework.  
6 - *  
7 - * Demoiselle Framework is free software; you can redistribute it and/or  
8 - * modify it under the terms of the GNU Lesser General Public License version 3  
9 - * as published by the Free Software Foundation.  
10 - *  
11 - * This program is distributed in the hope that it will be useful,  
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of  
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
14 - * GNU General Public License for more details.  
15 - *  
16 - * You should have received a copy of the GNU Lesser General Public License version 3  
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>  
18 - * or write to the Free Software Foundation, Inc., 51 Franklin Street,  
19 - * Fifth Floor, Boston, MA 02110-1301, USA.  
20 - * ----------------------------------------------------------------------------  
21 - * Este arquivo é parte do Framework Demoiselle.  
22 - *  
23 - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou  
24 - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação  
25 - * do Software Livre (FSF).  
26 - *  
27 - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA  
28 - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou  
29 - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português  
30 - * para maiores detalhes.  
31 - *  
32 - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título  
33 - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>  
34 - * ou escreva para a Fundação do Software Livre (FSF) Inc.,  
35 - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.  
36 - */  
37 -package br.gov.frameworkdemoiselle.internal.producer;  
38 -  
39 -import javax.enterprise.context.SessionScoped;  
40 -import javax.enterprise.inject.Default;  
41 -import javax.enterprise.inject.Produces;  
42 -import javax.servlet.http.HttpServletRequest;  
43 -import javax.servlet.http.HttpSession;  
44 -  
45 -import br.gov.frameworkdemoiselle.internal.proxy.HttpSessionProxy;  
46 -  
47 -public class HttpSessionProducer {  
48 -  
49 - @Produces  
50 - @Default  
51 - @SessionScoped  
52 - public HttpSession create(final HttpServletRequest request) {  
53 - return new HttpSessionProxy(request.getSession());  
54 - }  
55 -}  
impl/extension/jsf/src/main/resources/META-INF/web-fragment.xml
@@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
1 -<!--  
2 - Demoiselle Framework  
3 - Copyright (C) 2010 SERPRO  
4 - ============================================================================  
5 - This file is part of Demoiselle Framework.  
6 -  
7 - Demoiselle Framework is free software; you can redistribute it and/or  
8 - modify it under the terms of the GNU Lesser General Public License version 3  
9 - as published by the Free Software Foundation.  
10 -  
11 - This program is distributed in the hope that it will be useful,  
12 - but WITHOUT ANY WARRANTY; without even the implied warranty of  
13 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
14 - GNU General Public License for more details.  
15 -  
16 - You should have received a copy of the GNU Lesser General Public License version 3  
17 - along with this program; if not, see <http://www.gnu.org/licenses/>  
18 - or write to the Free Software Foundation, Inc., 51 Franklin Street,  
19 - Fifth Floor, Boston, MA 02110-1301, USA.  
20 - ============================================================================  
21 - Este arquivo é parte do Framework Demoiselle.  
22 -  
23 - O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou  
24 - modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação  
25 - do Software Livre (FSF).  
26 -  
27 - Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA  
28 - GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou  
29 - APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português  
30 - para maiores detalhes.  
31 -  
32 - Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título  
33 - "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>  
34 - ou escreva para a Fundação do Software Livre (FSF) Inc.,  
35 - 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.  
36 --->  
37 -<web-fragment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"  
38 - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd" version="3.0">  
39 -  
40 - <listener>  
41 - <listener-class>br.gov.frameworkdemoiselle.util.ServletContextListener</listener-class>  
42 - </listener>  
43 -  
44 -</web-fragment>  
impl/extension/jsf/src/test/java/br/gov/frameworkdemoiselle/internal/producer/HttpServletRequestProducerTest.java
@@ -1,81 +0,0 @@ @@ -1,81 +0,0 @@
1 -/*  
2 - * Demoiselle Framework  
3 - * Copyright (C) 2010 SERPRO  
4 - * ----------------------------------------------------------------------------  
5 - * This file is part of Demoiselle Framework.  
6 - *  
7 - * Demoiselle Framework is free software; you can redistribute it and/or  
8 - * modify it under the terms of the GNU Lesser General Public License version 3  
9 - * as published by the Free Software Foundation.  
10 - *  
11 - * This program is distributed in the hope that it will be useful,  
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of  
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
14 - * GNU General Public License for more details.  
15 - *  
16 - * You should have received a copy of the GNU Lesser General Public License version 3  
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>  
18 - * or write to the Free Software Foundation, Inc., 51 Franklin Street,  
19 - * Fifth Floor, Boston, MA 02110-1301, USA.  
20 - * ----------------------------------------------------------------------------  
21 - * Este arquivo é parte do Framework Demoiselle.  
22 - *  
23 - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou  
24 - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação  
25 - * do Software Livre (FSF).  
26 - *  
27 - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA  
28 - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou  
29 - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português  
30 - * para maiores detalhes.  
31 - *  
32 - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título  
33 - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>  
34 - * ou escreva para a Fundação do Software Livre (FSF) Inc.,  
35 - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.  
36 - */  
37 -package br.gov.frameworkdemoiselle.internal.producer;  
38 -  
39 -import static org.easymock.EasyMock.expect;  
40 -import static org.junit.Assert.assertEquals;  
41 -import static org.powermock.api.easymock.PowerMock.replay;  
42 -import static org.powermock.api.easymock.PowerMock.verifyAll;  
43 -  
44 -import javax.faces.context.ExternalContext;  
45 -import javax.faces.context.FacesContext;  
46 -import javax.servlet.http.HttpServletRequest;  
47 -  
48 -import org.junit.Before;  
49 -import org.junit.Test;  
50 -import org.junit.runner.RunWith;  
51 -import org.powermock.api.easymock.PowerMock;  
52 -import org.powermock.core.classloader.annotations.PrepareForTest;  
53 -import org.powermock.modules.junit4.PowerMockRunner;  
54 -  
55 -@RunWith(PowerMockRunner.class)  
56 -@PrepareForTest({ HttpServletRequest.class })  
57 -public class HttpServletRequestProducerTest {  
58 -  
59 - private HttpServletRequestProducer producer;  
60 -  
61 - @Before  
62 - public void before() {  
63 - this.producer = new HttpServletRequestProducer();  
64 - }  
65 -  
66 - @Test  
67 - public void testCreate() {  
68 - FacesContext facesContext = PowerMock.createMock(FacesContext.class);  
69 - ExternalContext externalContext = PowerMock.createMock(ExternalContext.class);  
70 - HttpServletRequest request = PowerMock.createMock(HttpServletRequest.class);  
71 -  
72 - expect(externalContext.getRequest()).andReturn(request);  
73 - expect(facesContext.getExternalContext()).andReturn(externalContext);  
74 - replay(facesContext, externalContext, request);  
75 -  
76 - assertEquals(request, producer.create(facesContext));  
77 -  
78 - verifyAll();  
79 - }  
80 -  
81 -}  
impl/extension/pom.xml
@@ -48,6 +48,7 @@ @@ -48,6 +48,7 @@
48 48
49 <modules> 49 <modules>
50 <module>jta</module> 50 <module>jta</module>
  51 + <module>servlet</module>
51 <module>jsf</module> 52 <module>jsf</module>
52 <module>se</module> 53 <module>se</module>
53 <module>jpa</module> 54 <module>jpa</module>
impl/extension/servlet/.gitignore 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +/target
  2 +/.project
  3 +/.classpath
  4 +/.settings
  5 +/.externalToolBuilders
impl/extension/servlet/pom.xml 0 → 100755
@@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  38 +
  39 + <modelVersion>4.0.0</modelVersion>
  40 +
  41 + <artifactId>demoiselle-servlet</artifactId>
  42 + <packaging>jar</packaging>
  43 +
  44 + <parent>
  45 + <groupId>br.gov.frameworkdemoiselle</groupId>
  46 + <artifactId>demoiselle-extension-parent</artifactId>
  47 + <version>2.3.0-BETA2-SNAPSHOT</version>
  48 + <relativePath>../../../parent/extension/pom.xml</relativePath>
  49 + </parent>
  50 +
  51 + <name>Servlet Extension</name>
  52 + <description />
  53 +
  54 + <dependencies>
  55 + <dependency>
  56 + <groupId>javax.servlet</groupId>
  57 + <artifactId>jstl</artifactId>
  58 + </dependency>
  59 + <dependency>
  60 + <groupId>javax.servlet</groupId>
  61 + <artifactId>servlet-api</artifactId>
  62 + </dependency>
  63 + </dependencies>
  64 +
  65 + <repositories>
  66 + <repository>
  67 + <id>demoiselle.sourceforge.net</id>
  68 + <name>Demoiselle Maven Repository</name>
  69 + <url>http://demoiselle.sourceforge.net/repository/release</url>
  70 + </repository>
  71 + </repositories>
  72 +</project>
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpServletRequestProducer.java 0 → 100644
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.internal.producer;
  38 +
  39 +import javax.enterprise.context.RequestScoped;
  40 +import javax.enterprise.inject.Default;
  41 +import javax.enterprise.inject.Produces;
  42 +import javax.servlet.http.HttpServletRequest;
  43 +
  44 +@RequestScoped
  45 +public class HttpServletRequestProducer {
  46 +
  47 + private HttpServletRequest request;
  48 +
  49 + @Default
  50 + @Produces
  51 + public HttpServletRequest create() {
  52 + return request;
  53 + }
  54 +
  55 + public void setRequest(HttpServletRequest request) {
  56 + this.request = request;
  57 + }
  58 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpServletResponseProducer.java 0 → 100644
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.internal.producer;
  38 +
  39 +import javax.enterprise.context.RequestScoped;
  40 +import javax.enterprise.inject.Default;
  41 +import javax.enterprise.inject.Produces;
  42 +import javax.servlet.http.HttpServletResponse;
  43 +
  44 +@RequestScoped
  45 +public class HttpServletResponseProducer {
  46 +
  47 + private HttpServletResponse response;
  48 +
  49 + @Default
  50 + @Produces
  51 + public HttpServletResponse create() {
  52 + return response;
  53 + }
  54 +
  55 + public void setResponse(HttpServletResponse response) {
  56 + this.response = response;
  57 + }
  58 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/producer/HttpSessionProducer.java 0 → 100644
@@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.internal.producer;
  38 +
  39 +import javax.enterprise.context.SessionScoped;
  40 +import javax.enterprise.inject.Default;
  41 +import javax.enterprise.inject.Produces;
  42 +import javax.servlet.http.HttpServletRequest;
  43 +import javax.servlet.http.HttpSession;
  44 +
  45 +public class HttpSessionProducer {
  46 +
  47 + @Produces
  48 + @Default
  49 + @SessionScoped
  50 + public HttpSession create(final HttpServletRequest request) {
  51 + return request.getSession();
  52 + }
  53 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/producer/ServletLocaleProducer.java 0 → 100644
@@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.internal.producer;
  38 +
  39 +import java.util.Locale;
  40 +
  41 +import javax.enterprise.inject.Default;
  42 +import javax.enterprise.inject.Produces;
  43 +import javax.inject.Inject;
  44 +import javax.servlet.http.HttpServletRequest;
  45 +
  46 +public class ServletLocaleProducer {
  47 +
  48 + @Inject
  49 + private HttpServletRequest request;
  50 +
  51 + @Produces
  52 + @Default
  53 + public Locale create() {
  54 + return request.getLocale();
  55 + }
  56 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletContextListener.java 0 → 100644
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.util;
  38 +
  39 +/**
  40 + * @deprecated Use br.gov.frameworkdemoiselle.util.ServletListener instead.
  41 + */
  42 +@Deprecated
  43 +public class ServletContextListener extends ServletListener {
  44 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletFilter.java 0 → 100644
@@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.util;
  38 +
  39 +import java.io.IOException;
  40 +
  41 +import javax.servlet.Filter;
  42 +import javax.servlet.FilterChain;
  43 +import javax.servlet.FilterConfig;
  44 +import javax.servlet.ServletException;
  45 +import javax.servlet.ServletRequest;
  46 +import javax.servlet.ServletResponse;
  47 +import javax.servlet.http.HttpServletRequest;
  48 +import javax.servlet.http.HttpServletResponse;
  49 +
  50 +import br.gov.frameworkdemoiselle.internal.producer.HttpServletRequestProducer;
  51 +import br.gov.frameworkdemoiselle.internal.producer.HttpServletResponseProducer;
  52 +
  53 +public class ServletFilter implements Filter {
  54 +
  55 + @Override
  56 + public void init(FilterConfig filterConfig) throws ServletException {
  57 + }
  58 +
  59 + @Override
  60 + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
  61 + ServletException {
  62 +
  63 + HttpServletRequestProducer requestProducer = Beans.getReference(HttpServletRequestProducer.class);
  64 + requestProducer.setRequest((HttpServletRequest) request);
  65 +
  66 + HttpServletResponseProducer responseProducer = Beans.getReference(HttpServletResponseProducer.class);
  67 + responseProducer.setResponse((HttpServletResponse) response);
  68 +
  69 + chain.doFilter(request, response);
  70 + }
  71 +
  72 + @Override
  73 + public void destroy() {
  74 + }
  75 +}
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletListener.java 0 → 100644
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.util;
  38 +
  39 +import javax.servlet.ServletContextEvent;
  40 +
  41 +import br.gov.frameworkdemoiselle.internal.bootstrap.ShutdownBootstrap;
  42 +import br.gov.frameworkdemoiselle.internal.bootstrap.StartupBootstrap;
  43 +
  44 +public class ServletListener implements javax.servlet.ServletContextListener {
  45 +
  46 + @Override
  47 + public void contextInitialized(ServletContextEvent event) {
  48 + StartupBootstrap.startup();
  49 + }
  50 +
  51 + @Override
  52 + public void contextDestroyed(ServletContextEvent event) {
  53 + ShutdownBootstrap.shutdown();
  54 + }
  55 +}
impl/extension/servlet/src/main/resources/META-INF/beans.xml 0 → 100644
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  38 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
  39 +
  40 +</beans>
0 \ No newline at end of file 41 \ No newline at end of file
impl/extension/servlet/src/main/resources/META-INF/web-fragment.xml 0 → 100644
@@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<web-fragment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
  38 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd" version="3.0">
  39 +
  40 + <listener>
  41 + <listener-class>br.gov.frameworkdemoiselle.util.ServletListener</listener-class>
  42 + </listener>
  43 +
  44 + <filter>
  45 + <filter-name>Demoiselle Servlet Filter</filter-name>
  46 + <filter-class>br.gov.frameworkdemoiselle.util.ServletFilter</filter-class>
  47 + </filter>
  48 + <filter-mapping>
  49 + <filter-name>Demoiselle Servlet Filter</filter-name>
  50 + <url-pattern>/*</url-pattern>
  51 + </filter-mapping>
  52 +
  53 +</web-fragment>
impl/extension/servlet/src/main/resources/demoiselle-servlet-bundle.properties 0 → 100644
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
  1 +# Demoiselle Framework
  2 +# Copyright (C) 2010 SERPRO
  3 +# ----------------------------------------------------------------------------
  4 +# This file is part of Demoiselle Framework.
  5 +#
  6 +# Demoiselle Framework is free software; you can redistribute it and/or
  7 +# modify it under the terms of the GNU Lesser General Public License version 3
  8 +# as published by the Free Software Foundation.
  9 +#
  10 +# This program is distributed in the hope that it will be useful,
  11 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13 +# GNU General Public License for more details.
  14 +#
  15 +# You should have received a copy of the GNU Lesser General Public License version 3
  16 +# along with this program; if not, see <http://www.gnu.org/licenses/>
  17 +# or write to the Free Software Foundation, Inc., 51 Franklin Street,
  18 +# Fifth Floor, Boston, MA 02110-1301, USA.
  19 +# ----------------------------------------------------------------------------
  20 +# Este arquivo é parte do Framework Demoiselle.
  21 +#
  22 +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  23 +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  24 +# do Software Livre (FSF).
  25 +#
  26 +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  27 +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  28 +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  29 +# para maiores detalhes.
  30 +#
  31 +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  32 +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  33 +# ou escreva para a Fundação do Software Livre (FSF) Inc.,
  34 +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  35 +
  36 +id-converter-not-found=Voc\u00EA precisa criar um FacesConverter para a classe "{0}".
0 \ No newline at end of file 37 \ No newline at end of file
parent/framework/pom.xml
@@ -38,6 +38,11 @@ @@ -38,6 +38,11 @@
38 </dependency> 38 </dependency>
39 <dependency> 39 <dependency>
40 <groupId>br.gov.frameworkdemoiselle</groupId> 40 <groupId>br.gov.frameworkdemoiselle</groupId>
  41 + <artifactId>demoiselle-servlet</artifactId>
  42 + <version>2.3.0-BETA2-SNAPSHOT</version>
  43 + </dependency>
  44 + <dependency>
  45 + <groupId>br.gov.frameworkdemoiselle</groupId>
41 <artifactId>demoiselle-jsf</artifactId> 46 <artifactId>demoiselle-jsf</artifactId>
42 <version>2.3.0-BETA2-SNAPSHOT</version> 47 <version>2.3.0-BETA2-SNAPSHOT</version>
43 </dependency> 48 </dependency>