Commit 83843ee87a4860c73f0b2232927c8813adc6ccdd

Authored by Cleverson Sacramento
1 parent 807f6905
Exists in master

Correção na funcionalidade Parameter para utilizar qualificadores

impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ParameterImpl.java
... ... @@ -41,6 +41,7 @@ import java.util.Map;
41 41  
42 42 import javax.enterprise.context.RequestScoped;
43 43 import javax.enterprise.context.SessionScoped;
  44 +import javax.enterprise.inject.Alternative;
44 45 import javax.enterprise.inject.spi.InjectionPoint;
45 46 import javax.faces.convert.Converter;
46 47 import javax.inject.Inject;
... ... @@ -53,6 +54,7 @@ import br.gov.frameworkdemoiselle.util.Faces;
53 54 import br.gov.frameworkdemoiselle.util.Parameter;
54 55 import br.gov.frameworkdemoiselle.util.Reflections;
55 56  
  57 +@Alternative
56 58 public class ParameterImpl<T extends Serializable> implements Parameter<T>, Serializable {
57 59  
58 60 private static final long serialVersionUID = 1L;
... ...
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/procuder/ParameterProducer.java 0 → 100644
... ... @@ -0,0 +1,76 @@
  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 +/*
  38 + * Demoiselle Framework Copyright (c) 2010 Serpro and other contributors as indicated by the @author tag. See the
  39 + * copyright.txt in the distribution for a full listing of contributors. Demoiselle Framework is an open source Java EE
  40 + * library designed to accelerate the development of transactional database Web applications. Demoiselle Framework is
  41 + * released under the terms of the LGPL license 3 http://www.gnu.org/licenses/lgpl.html LGPL License 3 This file is part
  42 + * of Demoiselle Framework. Demoiselle Framework is free software: you can redistribute it and/or modify it under the
  43 + * terms of the GNU Lesser General Public License 3 as published by the Free Software Foundation. Demoiselle Framework
  44 + * is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  45 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You
  46 + * should have received a copy of the GNU Lesser General Public License along with Demoiselle Framework. If not, see
  47 + * <http://www.gnu.org/licenses/>.
  48 + */
  49 +package br.gov.frameworkdemoiselle.internal.procuder;
  50 +
  51 +import java.io.Serializable;
  52 +
  53 +import javax.enterprise.inject.Default;
  54 +import javax.enterprise.inject.Produces;
  55 +import javax.enterprise.inject.spi.InjectionPoint;
  56 +
  57 +import br.gov.frameworkdemoiselle.annotation.Name;
  58 +import br.gov.frameworkdemoiselle.internal.implementation.ParameterImpl;
  59 +import br.gov.frameworkdemoiselle.util.Parameter;
  60 +
  61 +public class ParameterProducer implements Serializable {
  62 +
  63 + private static final long serialVersionUID = 1L;
  64 +
  65 + @Default
  66 + @Produces
  67 + public <T extends Serializable> Parameter<T> createDefault(final InjectionPoint ip) {
  68 + return new ParameterImpl<T>(ip);
  69 + }
  70 +
  71 + @Name("")
  72 + @Produces
  73 + public <T extends Serializable> Parameter<T> createNamed(final InjectionPoint ip) {
  74 + return new ParameterImpl<T>(ip);
  75 + }
  76 +}
... ...