From 86d209fc7533c8c33234abe1eaac8a0755dfa854 Mon Sep 17 00:00:00 2001 From: Emerson Oliveira Date: Thu, 26 Sep 2013 10:14:19 -0300 Subject: [PATCH] IN PROGRESS - issue FWK-120: Testes da extensão JSF (segurança + mensagem + exceção) --- impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java | 99 --------------------------------------------------------------------------------------------------- 1 file changed, 0 insertions(+), 99 deletions(-) delete mode 100644 impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java diff --git a/impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java b/impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java deleted file mode 100644 index abec1fa..0000000 --- a/impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java +++ /dev/null @@ -1,99 +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 exception.handler.configuration; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import javax.faces.application.FacesMessage; -import javax.faces.context.FacesContext; -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.HttpServlet; -import javax.servlet.http.HttpServletResponse; - -import br.gov.frameworkdemoiselle.util.Beans; - -public class ExceptionHandlerConfigFilter implements Filter { - - private static final long serialVersionUID = 1L; - - private List facesMessage; - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, - ServletException { - -// try { - - chain.doFilter(request, response); - -// String message = response.getContentType(); -// System.out.println("MESSAGE FILTER: " + message); - -// facesMessage = FacesContext.getCurrentInstance().getMessageList(); - -// for(FacesMessage fm : FacesContext.getCurrentInstance().getMessageList()) { -// System.out.println("Sumary: " + fm.getSummary()); -// System.out.println("Detail: " + fm.getDetail()); -// -// if(fm.getSummary().equals("DummyException!")) { -// ((HttpServletResponse)response).setStatus(200); -// }else { -// ((HttpServletResponse)response).setStatus(200); -// } -// } - -// }catch(Exception e) { -// ((HttpServletResponse)response).setStatus(200); -// } - } - - @Override - public void destroy() { - } - -} -- libgit2 0.21.2