diff --git a/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/Demoiselle.java b/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/Demoiselle.java
index fb710c1..338af82 100644
--- a/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/Demoiselle.java
+++ b/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/Demoiselle.java
@@ -1,347 +1,347 @@
-/*
- * Demoiselle Framework
- * Copyright (C) 2010 SERPRO
- * ----------------------------------------------------------------------------
- * This file is part of Demoiselle Framework.
- *
- * Demoiselle Framework is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License version 3
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License version 3
- * along with this program; if not, see
- * or write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301, USA.
- * ----------------------------------------------------------------------------
- * Este arquivo é parte do Framework Demoiselle.
- *
- * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
- * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
- * do Software Livre (FSF).
- *
- * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
- * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
- * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
- * para maiores detalhes.
- *
- * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
- * "LICENCA.txt", junto com esse programa. Se não, acesse
- * ou escreva para a Fundação do Software Livre (FSF) Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-package br.gov.frameworkdemoiselle;
-
-import java.awt.EventQueue;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-import java.lang.reflect.Method;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import javax.swing.JFrame;
-
-import org.jboss.weld.environment.se.Weld;
-import org.jboss.weld.environment.se.WeldContainer;
-
-import br.gov.frameworkdemoiselle.bootstrap.MainClass;
-import br.gov.frameworkdemoiselle.lifecycle.AfterShutdownProccess;
-import br.gov.frameworkdemoiselle.lifecycle.AfterStartupProccess;
-import br.gov.frameworkdemoiselle.util.Beans;
-
-/**
- * Central class to bootstrap Demoiselle SE applications.
- *
- * @author serpro
- */
-public class Demoiselle {
-
- private static final String BUNDLE_NAME = "demoiselle-se-bundle";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- protected Demoiselle() {
- throw new UnsupportedOperationException(getString("se-util-instantiation-error"));
- }
-
- /**
- *
- * Bootstrapper that initializes the framework and call a main method. This method will ensure that the framework
- * facilities (CDI, etc.) are started before calling the application's real main method and that they are shut down
- * before the application's end.
- *
- *
- * To start an application using this method, execute the following code on a terminal:
- *
- *
- *
- * ~$ java br.gov.frameworkdemoiselle.Demoiselle com.application.ClassWithMainMethod
- *
- *
- * As you can see, you must pass the full qualified name of the class that has a main method as the first argument
- * of your application.
- *
- *
- * If your application needs more arguments, pass them normally after the class name. This method will remove the
- * class name of the argument list, so your real main method will se the first argument after the class name as
- * index 0 (zero) of the args
parameter. Ex:
- *
- *
- *
- * ~$ java br.gov.frameworkdemoiselle.Demoiselle com.application.ClassWithMainMethod firstArg secondArg
- *
- *
- * Your application's main method will run as follow:
- *
- *
- *
- *
- * package com.application;
- * public class ClassWithMainMethod {
- * public static void main(String[] args){
- * System.out.println(args[0]); //will print "firstArg"
- * System.out.println(args[1]); //will print "secondArg"
- * }
- * }
- *
- *
- *
- * @param args
- * Arguments array. The first argument must be the full qualified name of the real class that has the
- * desired main method. All following arguments will be passed to the real main method.
- */
- public static void main(String[] args) {
- if (args == null || args.length <= 0) {
- throw new DemoiselleException(getString("se-util-no-main-defined"));
- }
-
- Class> mainClass;
- try {
- mainClass = Class.forName(args[0]);
- } catch (ClassNotFoundException e) {
- throw new DemoiselleException(getString("se-util-invalid-main-defined"), e);
- }
-
- Weld weld = new Weld();
- WeldContainer container = weld.initialize();
-
- // Fire the AfterStartupProccess event. Methods annotated with @Startup will run now
- container.getBeanManager().fireEvent(new AfterStartupProccess() {
- });
-
- String[] passedArgs = null;
- if (args.length > 1) {
- passedArgs = new String[args.length - 1];
- System.arraycopy(args, 1, passedArgs, 0, args.length - 1);
- }
-
- Method mainMethod;
- try {
- mainMethod = mainClass.getMethod("main", String[].class);
- } catch (Exception e) {
- throw new DemoiselleException(getString("se-util-invalid-main-defined"), e);
- }
-
- try {
- mainMethod.invoke(null, ((Object) passedArgs));
- } catch (Exception e) {
- throw new DemoiselleException(getString("se-util-error-calling-main"), e);
- } finally {
- container.getBeanManager().fireEvent(new AfterShutdownProccess() {
- });
- weld.shutdown();
- }
- }
-
- /**
- *
- * Bootstrapper that initializes the framework and call a predefined user method. This method will ensure that the
- * framework facilities (CDI, etc.) are started before calling the application's {@link MainClass#run(String[] args)}
- * method.
- *
- * To use this method you need to do two things:
- *
- *
- * - Create a concrete class that implements the {@link MainClass} interface
- * - Create a
main
class that calls this method passing your MainClass
as argument
- *
- *
- * Here is an example of bootstrap with this method.
- *
- *
- *
- *
- * package com.application;
- *
- * import br.gov.frameworkdemoiselle.bootstrap.MainClass;
- *
- * public class MyStarterClass implements MainClass {
- *
- * public static void main(String[] args){
- * Demoiselle.runStarterClass(MyStarterClass.class , args);
- * }
- *
- * public void run(String[] args){
- * //Real startup code runs here
- * }
- *
- * @Startup
- * protected void init(){
- * //This method will be called by the framework before the run
method runs
- * }
- *
- * @Shutdown
- * protected void cleanup(){
- * //This method will be called by the framework after the run
method
- * //finishes and before the application closes.
- * }
- *
- * }
- *
- *
- *
- * @param args
- * Arguments array. It will be passed unmodified to the {@link MainClass#run(String[] args)} method.
- */
- public static void runStarterClass(final Class extends MainClass> mainClass, String[] args) {
- Weld weld = new Weld();
- WeldContainer container = weld.initialize();
-
- // Fire the AfterStartupProccess event. Methods annotated with @Startup will run now
- container.getBeanManager().fireEvent(new AfterStartupProccess() {
- });
-
- MainClass mainClassInstance = null;
- try {
- mainClassInstance = Beans.getReference(mainClass);
- mainClassInstance.run(args);
- } catch (Exception e) {
- mainClassInstance = null;
- throw new DemoiselleException(getString("se-util-error-calling-run"), e);
- } finally {
- container.getBeanManager().fireEvent(new AfterShutdownProccess() {
- });
- weld.shutdown();
-
- mainClassInstance = null;
- }
- }
-
- /**
- *
- * Bootstraps CDI and starts a main window. This window will be instantiated using the default constructor and have
- * all of it's injections resolved before instantiation. Also any methods annotated with @Startup
- * and @Shutdown
will run before this window is created and after this window is closed,
- * respectively.
- *
- *
- * The new window will be started on the AWT event dispatcher thread, so it follows the recomendation of creating a
- * single thread to show the user interface and dispatch events since Swing components aren't thread-safe.
- *
- *
- *
- * A typical use case of this method is:
- *
- *
- *
- *
- * package com.application;
- *
- * public class MyMainWindow extends JFrame {
- *
- * //Main method
- * public static void main(String args[]){
- * Demoiselle.runMainWindow(MyMainWindow.class);
- * }
- *
- * //Configures the window
- * public MyMainWindow(){
- * super("My Main Window");
- * }
- *
- * //This method will be called after the window is constructed
- * @PostConstruct
- * public void initComponents(){
- * //Initializes components.
- *
- * setVisible(true);
- * }
- *
- * }
- *
- *
- *
- * @param jFrameClass
- * Type of the window that will be created.
- */
- public static void runMainWindow(final Class extends JFrame> jFrameClass) {
- final Weld weld = new Weld();
- final WeldContainer container = weld.initialize();
-
- EventQueue.invokeLater(new Runnable() {
-
- public void run() {
- container.getBeanManager().fireEvent(new AfterStartupProccess() {
- });
-
- JFrame jframe = null;
- try {
- jframe = Beans.getReference(jFrameClass);
-
- if (jframe.getDefaultCloseOperation() == JFrame.HIDE_ON_CLOSE) {
- jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
-
- jframe.addWindowListener(new WindowListener() {
-
- @Override
- public void windowOpened(WindowEvent e) {
- }
-
- @Override
- public void windowIconified(WindowEvent e) {
- }
-
- @Override
- public void windowDeiconified(WindowEvent e) {
- }
-
- @Override
- public void windowDeactivated(WindowEvent e) {
- }
-
- @Override
- public void windowClosing(WindowEvent e) {
- container.getBeanManager().fireEvent(new AfterShutdownProccess() {
- });
- weld.shutdown();
- }
-
- @Override
- public void windowClosed(WindowEvent e) {
- }
-
- @Override
- public void windowActivated(WindowEvent e) {
- }
- });
- } catch (Exception e) {
- throw new DemoiselleException(getString("se-util-error-starting-jframe"), e);
- }
- }
- });
- }
-
- private static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-
-}
+///*
+// * Demoiselle Framework
+// * Copyright (C) 2010 SERPRO
+// * ----------------------------------------------------------------------------
+// * This file is part of Demoiselle Framework.
+// *
+// * Demoiselle Framework is free software; you can redistribute it and/or
+// * modify it under the terms of the GNU Lesser General Public License version 3
+// * as published by the Free Software Foundation.
+// *
+// * This program is distributed in the hope that it will be useful,
+// * but WITHOUT ANY WARRANTY; without even the implied warranty of
+// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// * GNU General Public License for more details.
+// *
+// * You should have received a copy of the GNU Lesser General Public License version 3
+// * along with this program; if not, see
+// * or write to the Free Software Foundation, Inc., 51 Franklin Street,
+// * Fifth Floor, Boston, MA 02110-1301, USA.
+// * ----------------------------------------------------------------------------
+// * Este arquivo é parte do Framework Demoiselle.
+// *
+// * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
+// * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
+// * do Software Livre (FSF).
+// *
+// * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
+// * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
+// * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
+// * para maiores detalhes.
+// *
+// * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
+// * "LICENCA.txt", junto com esse programa. Se não, acesse
+// * ou escreva para a Fundação do Software Livre (FSF) Inc.,
+// * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
+// */
+//package br.gov.frameworkdemoiselle;
+//
+//import java.awt.EventQueue;
+//import java.awt.event.WindowEvent;
+//import java.awt.event.WindowListener;
+//import java.lang.reflect.Method;
+//import java.util.MissingResourceException;
+//import java.util.ResourceBundle;
+//
+//import javax.swing.JFrame;
+//
+//import org.jboss.weld.environment.se.Weld;
+//import org.jboss.weld.environment.se.WeldContainer;
+//
+//import br.gov.frameworkdemoiselle.bootstrap.MainClass;
+//import br.gov.frameworkdemoiselle.lifecycle.AfterShutdownProccess;
+//import br.gov.frameworkdemoiselle.lifecycle.AfterStartupProccess;
+//import br.gov.frameworkdemoiselle.util.Beans;
+//
+///**
+// * Central class to bootstrap Demoiselle SE applications.
+// *
+// * @author serpro
+// */
+//public class Demoiselle {
+//
+// private static final String BUNDLE_NAME = "demoiselle-se-bundle";
+//
+// private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+//
+// protected Demoiselle() {
+// throw new UnsupportedOperationException(getString("se-util-instantiation-error"));
+// }
+//
+// /**
+// *
+// * Bootstrapper that initializes the framework and call a main method. This method will ensure that the framework
+// * facilities (CDI, etc.) are started before calling the application's real main method and that they are shut down
+// * before the application's end.
+// *
+// *
+// * To start an application using this method, execute the following code on a terminal:
+// *
+// *
+// *
+// * ~$ java br.gov.frameworkdemoiselle.Demoiselle com.application.ClassWithMainMethod
+// *
+// *
+// * As you can see, you must pass the full qualified name of the class that has a main method as the first argument
+// * of your application.
+// *
+// *
+// * If your application needs more arguments, pass them normally after the class name. This method will remove the
+// * class name of the argument list, so your real main method will se the first argument after the class name as
+// * index 0 (zero) of the args
parameter. Ex:
+// *
+// *
+// *
+// * ~$ java br.gov.frameworkdemoiselle.Demoiselle com.application.ClassWithMainMethod firstArg secondArg
+// *
+// *
+// * Your application's main method will run as follow:
+// *
+// *
+// *
+// *
+// * package com.application;
+// * public class ClassWithMainMethod {
+// * public static void main(String[] args){
+// * System.out.println(args[0]); //will print "firstArg"
+// * System.out.println(args[1]); //will print "secondArg"
+// * }
+// * }
+// *
+// *
+// *
+// * @param args
+// * Arguments array. The first argument must be the full qualified name of the real class that has the
+// * desired main method. All following arguments will be passed to the real main method.
+// */
+// public static void main(String[] args) {
+// if (args == null || args.length <= 0) {
+// throw new DemoiselleException(getString("se-util-no-main-defined"));
+// }
+//
+// Class> mainClass;
+// try {
+// mainClass = Class.forName(args[0]);
+// } catch (ClassNotFoundException e) {
+// throw new DemoiselleException(getString("se-util-invalid-main-defined"), e);
+// }
+//
+// Weld weld = new Weld();
+// WeldContainer container = weld.initialize();
+//
+// // Fire the AfterStartupProccess event. Methods annotated with @Startup will run now
+// container.getBeanManager().fireEvent(new AfterStartupProccess() {
+// });
+//
+// String[] passedArgs = null;
+// if (args.length > 1) {
+// passedArgs = new String[args.length - 1];
+// System.arraycopy(args, 1, passedArgs, 0, args.length - 1);
+// }
+//
+// Method mainMethod;
+// try {
+// mainMethod = mainClass.getMethod("main", String[].class);
+// } catch (Exception e) {
+// throw new DemoiselleException(getString("se-util-invalid-main-defined"), e);
+// }
+//
+// try {
+// mainMethod.invoke(null, ((Object) passedArgs));
+// } catch (Exception e) {
+// throw new DemoiselleException(getString("se-util-error-calling-main"), e);
+// } finally {
+// container.getBeanManager().fireEvent(new AfterShutdownProccess() {
+// });
+// weld.shutdown();
+// }
+// }
+//
+// /**
+// *
+// * Bootstrapper that initializes the framework and call a predefined user method. This method will ensure that the
+// * framework facilities (CDI, etc.) are started before calling the application's {@link MainClass#run(String[] args)}
+// * method.
+// *
+// * To use this method you need to do two things:
+// *
+// *
+// * - Create a concrete class that implements the {@link MainClass} interface
+// * - Create a
main
class that calls this method passing your MainClass
as argument
+// *
+// *
+// * Here is an example of bootstrap with this method.
+// *
+// *
+// *
+// *
+// * package com.application;
+// *
+// * import br.gov.frameworkdemoiselle.bootstrap.MainClass;
+// *
+// * public class MyStarterClass implements MainClass {
+// *
+// * public static void main(String[] args){
+// * Demoiselle.runStarterClass(MyStarterClass.class , args);
+// * }
+// *
+// * public void run(String[] args){
+// * //Real startup code runs here
+// * }
+// *
+// * @Startup
+// * protected void init(){
+// * //This method will be called by the framework before the run
method runs
+// * }
+// *
+// * @Shutdown
+// * protected void cleanup(){
+// * //This method will be called by the framework after the run
method
+// * //finishes and before the application closes.
+// * }
+// *
+// * }
+// *
+// *
+// *
+// * @param args
+// * Arguments array. It will be passed unmodified to the {@link MainClass#run(String[] args)} method.
+// */
+// public static void runStarterClass(final Class extends MainClass> mainClass, String[] args) {
+// Weld weld = new Weld();
+// WeldContainer container = weld.initialize();
+//
+// // Fire the AfterStartupProccess event. Methods annotated with @Startup will run now
+// container.getBeanManager().fireEvent(new AfterStartupProccess() {
+// });
+//
+// MainClass mainClassInstance = null;
+// try {
+// mainClassInstance = Beans.getReference(mainClass);
+// mainClassInstance.run(args);
+// } catch (Exception e) {
+// mainClassInstance = null;
+// throw new DemoiselleException(getString("se-util-error-calling-run"), e);
+// } finally {
+// container.getBeanManager().fireEvent(new AfterShutdownProccess() {
+// });
+// weld.shutdown();
+//
+// mainClassInstance = null;
+// }
+// }
+//
+// /**
+// *
+// * Bootstraps CDI and starts a main window. This window will be instantiated using the default constructor and have
+// * all of it's injections resolved before instantiation. Also any methods annotated with @Startup
+// * and @Shutdown
will run before this window is created and after this window is closed,
+// * respectively.
+// *
+// *
+// * The new window will be started on the AWT event dispatcher thread, so it follows the recomendation of creating a
+// * single thread to show the user interface and dispatch events since Swing components aren't thread-safe.
+// *
+// *
+// *
+// * A typical use case of this method is:
+// *
+// *
+// *
+// *
+// * package com.application;
+// *
+// * public class MyMainWindow extends JFrame {
+// *
+// * //Main method
+// * public static void main(String args[]){
+// * Demoiselle.runMainWindow(MyMainWindow.class);
+// * }
+// *
+// * //Configures the window
+// * public MyMainWindow(){
+// * super("My Main Window");
+// * }
+// *
+// * //This method will be called after the window is constructed
+// * @PostConstruct
+// * public void initComponents(){
+// * //Initializes components.
+// *
+// * setVisible(true);
+// * }
+// *
+// * }
+// *
+// *
+// *
+// * @param jFrameClass
+// * Type of the window that will be created.
+// */
+// public static void runMainWindow(final Class extends JFrame> jFrameClass) {
+// final Weld weld = new Weld();
+// final WeldContainer container = weld.initialize();
+//
+// EventQueue.invokeLater(new Runnable() {
+//
+// public void run() {
+// container.getBeanManager().fireEvent(new AfterStartupProccess() {
+// });
+//
+// JFrame jframe = null;
+// try {
+// jframe = Beans.getReference(jFrameClass);
+//
+// if (jframe.getDefaultCloseOperation() == JFrame.HIDE_ON_CLOSE) {
+// jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+// }
+//
+// jframe.addWindowListener(new WindowListener() {
+//
+// @Override
+// public void windowOpened(WindowEvent e) {
+// }
+//
+// @Override
+// public void windowIconified(WindowEvent e) {
+// }
+//
+// @Override
+// public void windowDeiconified(WindowEvent e) {
+// }
+//
+// @Override
+// public void windowDeactivated(WindowEvent e) {
+// }
+//
+// @Override
+// public void windowClosing(WindowEvent e) {
+// container.getBeanManager().fireEvent(new AfterShutdownProccess() {
+// });
+// weld.shutdown();
+// }
+//
+// @Override
+// public void windowClosed(WindowEvent e) {
+// }
+//
+// @Override
+// public void windowActivated(WindowEvent e) {
+// }
+// });
+// } catch (Exception e) {
+// throw new DemoiselleException(getString("se-util-error-starting-jframe"), e);
+// }
+// }
+// });
+// }
+//
+// private static String getString(String key) {
+// try {
+// return RESOURCE_BUNDLE.getString(key);
+// } catch (MissingResourceException e) {
+// return '!' + key + '!';
+// }
+// }
+//
+//}
diff --git a/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/bootstrap/MainClass.java b/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/bootstrap/MainClass.java
index d52d2aa..ce72dcc 100644
--- a/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/bootstrap/MainClass.java
+++ b/impl/extension/se/src/main/java/br/gov/frameworkdemoiselle/bootstrap/MainClass.java
@@ -36,7 +36,6 @@
*/
package br.gov.frameworkdemoiselle.bootstrap;
-import br.gov.frameworkdemoiselle.Demoiselle;
/**
* Simple interface a class must implement to be started by the {@link Demoiselle#runStarterClass(Class, String[])} utility method.
diff --git a/impl/extension/se/src/test/java/bootstraper/DemoiselleSeBootstrapTest.java b/impl/extension/se/src/test/java/bootstraper/DemoiselleSeBootstrapTest.java
index 744fcfe..ffc3542 100644
--- a/impl/extension/se/src/test/java/bootstraper/DemoiselleSeBootstrapTest.java
+++ b/impl/extension/se/src/test/java/bootstraper/DemoiselleSeBootstrapTest.java
@@ -36,41 +36,39 @@
*/
package bootstraper;
-import org.junit.Assert;
-import org.junit.Test;
-
-import br.gov.frameworkdemoiselle.Demoiselle;
-
+import org.junit.Ignore;
+@Ignore
public class DemoiselleSeBootstrapTest {
- @Test
- public void startThroughMainMethod(){
- Demoiselle.main(new String[]{"bootstraper.ClassWithMain" , "firstArgument" , "secondArgument" , "lastArgument"});
-
- Assert.assertEquals("firstArgument", ClassWithMain.firstArgument);
- Assert.assertEquals("lastArgument", ClassWithMain.lastArgument);
- Assert.assertEquals("injected resource data", ClassWithMain.dataFromInjectedResource);
- Assert.assertEquals("filled", ClassWithMain.startupData);
- Assert.assertEquals("filled", ClassWithMain.shutdownData);
- }
-
- @Test
- public void startThroughMainClassInterface(){
- Demoiselle.runStarterClass(ClassImplementingMainClass.class, new String[]{"firstArgument" , "secondArgument" , "lastArgument"});
-
- Assert.assertEquals("firstArgument", ClassImplementingMainClass.firstArgument);
- Assert.assertEquals("lastArgument", ClassImplementingMainClass.lastArgument);
- Assert.assertEquals("injected resource data", ClassImplementingMainClass.dataFromInjectedResource);
- Assert.assertEquals("filled", ClassImplementingMainClass.startupData);
- Assert.assertEquals("filled", ClassImplementingMainClass.shutdownData);
- }
-
- @Test
- public void startJFrame(){
- Demoiselle.runMainWindow(FakeJFrame.class);
-
- Assert.assertEquals("injected resource data", FakeJFrame.dataFromInjectedResource);
- Assert.assertEquals("dataFromPostConstruct", FakeJFrame.dataFromPostConstruct);
- }
+ // @Test
+ // public void startThroughMainMethod(){
+ // Demoiselle.main(new String[]{"bootstraper.ClassWithMain" , "firstArgument" , "secondArgument" , "lastArgument"});
+ //
+ // Assert.assertEquals("firstArgument", ClassWithMain.firstArgument);
+ // Assert.assertEquals("lastArgument", ClassWithMain.lastArgument);
+ // Assert.assertEquals("injected resource data", ClassWithMain.dataFromInjectedResource);
+ // Assert.assertEquals("filled", ClassWithMain.startupData);
+ // Assert.assertEquals("filled", ClassWithMain.shutdownData);
+ // }
+ //
+ // @Test
+ // public void startThroughMainClassInterface(){
+ // Demoiselle.runStarterClass(ClassImplementingMainClass.class, new String[]{"firstArgument" , "secondArgument" ,
+ // "lastArgument"});
+ //
+ // Assert.assertEquals("firstArgument", ClassImplementingMainClass.firstArgument);
+ // Assert.assertEquals("lastArgument", ClassImplementingMainClass.lastArgument);
+ // Assert.assertEquals("injected resource data", ClassImplementingMainClass.dataFromInjectedResource);
+ // Assert.assertEquals("filled", ClassImplementingMainClass.startupData);
+ // Assert.assertEquals("filled", ClassImplementingMainClass.shutdownData);
+ // }
+ //
+ // @Test
+ // public void startJFrame(){
+ // Demoiselle.runMainWindow(FakeJFrame.class);
+ //
+ // Assert.assertEquals("injected resource data", FakeJFrame.dataFromInjectedResource);
+ // Assert.assertEquals("dataFromPostConstruct", FakeJFrame.dataFromPostConstruct);
+ // }
}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/BasicAuthenticationFilter.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/BasicAuthenticationFilter.java
deleted file mode 100644
index b2fb786..0000000
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/BasicAuthenticationFilter.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Demoiselle Framework
- * Copyright (C) 2010 SERPRO
- * ----------------------------------------------------------------------------
- * This file is part of Demoiselle Framework.
- *
- * Demoiselle Framework is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License version 3
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License version 3
- * along with this program; if not, see
- * or write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301, USA.
- * ----------------------------------------------------------------------------
- * Este arquivo é parte do Framework Demoiselle.
- *
- * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
- * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
- * do Software Livre (FSF).
- *
- * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
- * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
- * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
- * para maiores detalhes.
- *
- * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
- * "LICENCA.txt", junto com esse programa. Se não, acesse
- * ou escreva para a Fundação do Software Livre (FSF) Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-package br.gov.frameworkdemoiselle.internal.implementation;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.codec.binary.Base64;
-
-import br.gov.frameworkdemoiselle.security.AuthenticationException;
-import br.gov.frameworkdemoiselle.security.Credentials;
-import br.gov.frameworkdemoiselle.security.SecurityContext;
-import br.gov.frameworkdemoiselle.util.Beans;
-
-public class BasicAuthenticationFilter implements Filter {
-
- @Override
- public void init(FilterConfig filterConfig) throws ServletException {
- }
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException {
-
- String[] basicCredentials = getCredentials((HttpServletRequest) request);
-
- if (basicCredentials != null) {
- Credentials credentials = Beans.getReference(Credentials.class);
- credentials.setUsername(basicCredentials[0]);
- credentials.setPassword(basicCredentials[1]);
-
- try {
- Beans.getReference(SecurityContext.class).login();
-
- } catch (AuthenticationException cause) {
- // TODO Informar via logger que a autenticação não foi bem sucedida.
- }
- }
-
- chain.doFilter(request, response);
- }
-
- private String getAuthHeader(HttpServletRequest request) {
- String result = request.getHeader("Authorization");
- result = (result == null ? request.getHeader("authorization") : result);
-
- return result;
- }
-
- private String[] getCredentials(HttpServletRequest request) {
- String[] result = null;
- String header = getAuthHeader(request);
-
- if (header != null) {
- byte[] decoded = Base64.decodeBase64(header.substring(6));
- result = new String(decoded).split(":");
- }
-
- if (result != null && Arrays.asList(result).size() != 2) {
- result = null;
-
- // TODO Informar via logger que o header Authorization não contém as informações de username e password
- }
-
- return result;
- }
-
- @Override
- public void destroy() {
- }
-}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletRequestProducerFilter.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletRequestProducerFilter.java
deleted file mode 100644
index 1766063..0000000
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletRequestProducerFilter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package br.gov.frameworkdemoiselle.internal.implementation;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import br.gov.frameworkdemoiselle.internal.producer.HttpServletRequestProducer;
-import br.gov.frameworkdemoiselle.util.Beans;
-
-public class HttpServletRequestProducerFilter implements Filter {
-
- @Override
- public void init(FilterConfig config) throws ServletException {
- }
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException {
- Beans.getReference(HttpServletRequestProducer.class).setDelegate((HttpServletRequest) request);
- chain.doFilter(request, response);
- }
-
- @Override
- public void destroy() {
- }
-}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletResponseProducerFilter.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletResponseProducerFilter.java
deleted file mode 100644
index 6500fa5..0000000
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/HttpServletResponseProducerFilter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package br.gov.frameworkdemoiselle.internal.implementation;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponse;
-
-import br.gov.frameworkdemoiselle.internal.producer.HttpServletResponseProducer;
-import br.gov.frameworkdemoiselle.util.Beans;
-
-public class HttpServletResponseProducerFilter implements Filter {
-
- @Override
- public void init(FilterConfig config) throws ServletException {
- }
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException {
- Beans.getReference(HttpServletResponseProducer.class).setDelegate((HttpServletResponse) response);
- chain.doFilter(request, response);
- }
-
- @Override
- public void destroy() {
- }
-}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/InternalProcessorFilterImpl.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/InternalProcessorFilterImpl.java
deleted file mode 100644
index 5d4426c..0000000
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/InternalProcessorFilterImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package br.gov.frameworkdemoiselle.internal.implementation;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import br.gov.frameworkdemoiselle.annotation.StaticScoped;
-import br.gov.frameworkdemoiselle.util.ServletFilter.InternalProcessorFilter;
-
-@StaticScoped
-public class InternalProcessorFilterImpl implements InternalProcessorFilter {
-
- private List filters;
-
- public InternalProcessorFilterImpl() {
- filters = new ArrayList();
-
- filters.add(new HttpServletRequestProducerFilter());
- filters.add(new HttpServletResponseProducerFilter());
-
- // TODO Analizar o uso do BasicAuthenticationFilter
- filters.add(new BasicAuthenticationFilter());
- }
-
- @Override
- public void init(FilterConfig config) throws ServletException {
- for (Filter filter : filters) {
- filter.init(config);
- }
- }
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException {
- FilterChain emptyChain = createEmptyChain();
-
- for (Filter filter : filters) {
- filter.doFilter(request, response, emptyChain);
- }
- }
-
- @Override
- public void destroy() {
- for (Filter filter : filters) {
- filter.destroy();
- }
- }
-
- private FilterChain createEmptyChain() {
- return new FilterChain() {
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
- }
- };
- }
-}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/BasicAuthFilter.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/BasicAuthFilter.java
new file mode 100644
index 0000000..cd9621b
--- /dev/null
+++ b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/BasicAuthFilter.java
@@ -0,0 +1,147 @@
+/*
+ * Demoiselle Framework
+ * Copyright (C) 2010 SERPRO
+ * ----------------------------------------------------------------------------
+ * This file is part of Demoiselle Framework.
+ *
+ * Demoiselle Framework is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License version 3
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License version 3
+ * along with this program; if not, see
+ * or write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301, USA.
+ * ----------------------------------------------------------------------------
+ * Este arquivo é parte do Framework Demoiselle.
+ *
+ * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
+ * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
+ * do Software Livre (FSF).
+ *
+ * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
+ * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
+ * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
+ * para maiores detalhes.
+ *
+ * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
+ * "LICENCA.txt", junto com esse programa. Se não, acesse
+ * ou escreva para a Fundação do Software Livre (FSF) Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
+ */
+package br.gov.frameworkdemoiselle.util;
+
+import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED;
+
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.codec.binary.Base64;
+
+import br.gov.frameworkdemoiselle.security.Credentials;
+import br.gov.frameworkdemoiselle.security.InvalidCredentialsException;
+import br.gov.frameworkdemoiselle.security.SecurityContext;
+
+public class BasicAuthFilter implements Filter {
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ }
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+ ServletException {
+ try {
+ boolean isLoggedIn = performLogin(getAuthHeader(request), (HttpServletRequest) request);
+
+ chain.doFilter(request, response);
+
+ if (isLoggedIn) {
+ performLogout();
+ }
+
+ } catch (InvalidCredentialsException cause) {
+ setUnauthorizedStatus((HttpServletResponse) response, cause);
+ }
+ }
+
+ private boolean performLogin(String header, HttpServletRequest request) {
+ SecurityContext securityContext = Beans.getReference(SecurityContext.class);
+
+ if (header != null) {
+ String[] basicCredentials = getCredentials(header);
+
+ Credentials credentials = Beans.getReference(Credentials.class);
+ credentials.setUsername(basicCredentials[0]);
+ credentials.setPassword(basicCredentials[1]);
+
+ securityContext.login();
+ }
+
+ return securityContext.isLoggedIn();
+ }
+
+ private void performLogout() {
+ Beans.getReference(SecurityContext.class).logout();
+ }
+
+ private void setUnauthorizedStatus(HttpServletResponse response, Exception cause) throws IOException {
+ response.setStatus(SC_UNAUTHORIZED);
+ response.setContentType("text/html");
+
+ response.getWriter().write(cause.getMessage());
+ response.getWriter().flush();
+ response.getWriter().close();
+ }
+
+ private String getAuthHeader(ServletRequest request) {
+ String result = null;
+
+ if (request instanceof HttpServletRequest) {
+ HttpServletRequest httpRequest = ((HttpServletRequest) request);
+
+ result = httpRequest.getHeader("Authorization");
+ result = (result == null ? httpRequest.getHeader("authorization") : result);
+ }
+
+ return result;
+ }
+
+ private static String[] getCredentials(String header) throws InvalidCredentialsException {
+ String[] result = null;
+
+ String regexp = "^Basic[ \\n]+(.+)$";
+ Pattern pattern = Pattern.compile(regexp);
+ Matcher matcher = pattern.matcher(header);
+
+ if (matcher.matches()) {
+ byte[] decoded = Base64.decodeBase64(matcher.group(1));
+ result = new String(decoded).split(":");
+ }
+
+ if (result == null || result.length != 2) {
+ throw new InvalidCredentialsException("Formato inválido do cabeçalho");
+ }
+
+ return result;
+ }
+
+ @Override
+ public void destroy() {
+ }
+}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletFilter.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletFilter.java
index a376a46..187ba15 100644
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletFilter.java
+++ b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletFilter.java
@@ -44,34 +44,41 @@ import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import br.gov.frameworkdemoiselle.internal.producer.HttpServletRequestProducer;
+import br.gov.frameworkdemoiselle.internal.producer.HttpServletResponseProducer;
/**
* Implements the {@link javax.servlet.Filter} interface.
*
* @author SERPRO
- *
*/
-
public class ServletFilter implements Filter {
@Override
public void init(FilterConfig config) throws ServletException {
- Beans.getReference(InternalProcessorFilter.class).init(config);
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
- Beans.getReference(InternalProcessorFilter.class).doFilter(request, response, chain);
-
+ setDelegate(request, response);
chain.doFilter(request, response);
}
- @Override
- public void destroy() {
- Beans.getReference(InternalProcessorFilter.class).destroy();
+ private void setDelegate(ServletRequest request, ServletResponse response) {
+ if (request instanceof HttpServletRequest) {
+ Beans.getReference(HttpServletRequestProducer.class).setDelegate((HttpServletRequest) request);
+ }
+
+ if (response instanceof HttpServletResponse) {
+ Beans.getReference(HttpServletResponseProducer.class).setDelegate((HttpServletResponse) response);
+ }
}
- public interface InternalProcessorFilter extends Filter {
+ @Override
+ public void destroy() {
}
}
diff --git a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletListener.java b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletListener.java
index 216ea4d..d115439 100644
--- a/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletListener.java
+++ b/impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/ServletListener.java
@@ -42,13 +42,11 @@ import br.gov.frameworkdemoiselle.lifecycle.AfterShutdownProccess;
import br.gov.frameworkdemoiselle.lifecycle.AfterStartupProccess;
/**
- * Implements the {@link javax.servlet.ServletContextListener} interface, and fire two events:
+ * Implements the {@link javax.servlet.ServletContextListener} interface, and fire two events:
* {@link AfterStartupProccess} and {@link AfterShutdownProccess}.
*
* @author SERPRO
- *
*/
-
public class ServletListener implements javax.servlet.ServletContextListener {
@Override
diff --git a/impl/extension/servlet/src/main/resources/META-INF/web-fragment.xml b/impl/extension/servlet/src/main/resources/META-INF/web-fragment.xml
index e5cabbe..60a3eea 100644
--- a/impl/extension/servlet/src/main/resources/META-INF/web-fragment.xml
+++ b/impl/extension/servlet/src/main/resources/META-INF/web-fragment.xml
@@ -35,8 +35,7 @@
51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
-->
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd" version="3.0" id="demoiselle-servlet">
demoiselle_servlet
@@ -53,6 +52,15 @@
/*
+
+ Demoiselle BasicAuth Filter
+ br.gov.frameworkdemoiselle.util.BasicAuthFilter
+
+
+ Demoiselle BasicAuth Filter
+ /*
+
+
diff --git a/impl/extension/servlet/src/test/java/security/authentication/basic/BasicAuthenticationFilterTest.java b/impl/extension/servlet/src/test/java/security/authentication/basic/BasicAuthenticationFilterTest.java
index 9b02bd3..833b8a9 100644
--- a/impl/extension/servlet/src/test/java/security/authentication/basic/BasicAuthenticationFilterTest.java
+++ b/impl/extension/servlet/src/test/java/security/authentication/basic/BasicAuthenticationFilterTest.java
@@ -1,6 +1,6 @@
package security.authentication.basic;
-import static org.apache.http.HttpStatus.SC_FORBIDDEN;
+import static org.apache.http.HttpStatus.SC_UNAUTHORIZED;
import static org.apache.http.HttpStatus.SC_OK;
import static org.junit.Assert.assertEquals;
@@ -62,6 +62,6 @@ public class BasicAuthenticationFilterTest {
HttpResponse httpResponse = HttpClientBuilder.create().build().execute(httpGet);
int status = httpResponse.getStatusLine().getStatusCode();
- assertEquals(SC_FORBIDDEN, status);
+ assertEquals(SC_UNAUTHORIZED, status);
}
}
diff --git a/impl/extension/servlet/src/test/java/test/Tests.java b/impl/extension/servlet/src/test/java/test/Tests.java
index a7b6059..5448d20 100644
--- a/impl/extension/servlet/src/test/java/test/Tests.java
+++ b/impl/extension/servlet/src/test/java/test/Tests.java
@@ -44,10 +44,6 @@ import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.junit.Ignore;
-import br.gov.frameworkdemoiselle.internal.implementation.BasicAuthenticationFilter;
-import br.gov.frameworkdemoiselle.internal.implementation.HttpServletRequestProducerFilter;
-import br.gov.frameworkdemoiselle.internal.implementation.HttpServletResponseProducerFilter;
-import br.gov.frameworkdemoiselle.internal.implementation.InternalProcessorFilterImpl;
import br.gov.frameworkdemoiselle.internal.producer.HttpServletRequestProducer;
import br.gov.frameworkdemoiselle.internal.producer.HttpServletResponseProducer;
import br.gov.frameworkdemoiselle.internal.producer.HttpSessionProducer;
@@ -55,6 +51,7 @@ import br.gov.frameworkdemoiselle.internal.producer.ServletLocaleProducer;
import br.gov.frameworkdemoiselle.security.Credentials;
import br.gov.frameworkdemoiselle.security.ServletAuthenticator;
import br.gov.frameworkdemoiselle.security.ServletAuthorizer;
+import br.gov.frameworkdemoiselle.util.BasicAuthFilter;
import br.gov.frameworkdemoiselle.util.ServletFilter;
import br.gov.frameworkdemoiselle.util.ServletListener;
@@ -83,10 +80,7 @@ public final class Tests {
.addClass(HttpServletResponseProducer.class)
.addClass(HttpSessionProducer.class)
.addClass(ServletLocaleProducer.class)
- .addClass(BasicAuthenticationFilter.class)
- .addClass(HttpServletRequestProducerFilter.class)
- .addClass(HttpServletResponseProducerFilter.class)
- .addClass(InternalProcessorFilterImpl.class)
+ .addClass(BasicAuthFilter.class)
.addAsResource(createFileAsset("src/main/resources/demoiselle-servlet-bundle.properties"),
"demoiselle-servlet-bundle.properties")
.addAsWebInfResource(createFileAsset("src/test/resources/test/beans.xml"), "beans.xml")
diff --git a/impl/extension/servlet/src/test/resources/security/authentication/basic/web.xml b/impl/extension/servlet/src/test/resources/security/authentication/basic/web.xml
index 0787f10..de63266 100644
--- a/impl/extension/servlet/src/test/resources/security/authentication/basic/web.xml
+++ b/impl/extension/servlet/src/test/resources/security/authentication/basic/web.xml
@@ -50,6 +50,15 @@
/*
+
+ Demoiselle BasicAuth Filter
+ br.gov.frameworkdemoiselle.util.BasicAuthFilter
+
+
+ Demoiselle BasicAuth Filter
+ /*
+
+
Helper Servlet
security.authentication.basic.HelperServlet
--
libgit2 0.21.2