Commit 276e2ae5c9ae09d7a2018b7e605cd55b16a1b2cc
1 parent
93c20a20
Exists in
master
FWK-218: Movendo as anotações do Scoped para o pacote correto
Task-Url: https://demoiselle.atlassian.net/browse/FWK-218
Showing
2 changed files
with
122 additions
and
0 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/lifecycle/StaticScoped.java
0 → 100644
| ... | ... | @@ -0,0 +1,61 @@ |
| 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.lifecycle; | |
| 38 | + | |
| 39 | +import static java.lang.annotation.ElementType.FIELD; | |
| 40 | +import static java.lang.annotation.ElementType.METHOD; | |
| 41 | +import static java.lang.annotation.ElementType.TYPE; | |
| 42 | +import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
| 43 | + | |
| 44 | +import java.lang.annotation.Inherited; | |
| 45 | +import java.lang.annotation.Retention; | |
| 46 | +import java.lang.annotation.Target; | |
| 47 | + | |
| 48 | +import javax.enterprise.context.NormalScope; | |
| 49 | + | |
| 50 | +/** | |
| 51 | + *This scope stores the classes just as if it was a static attribute. | |
| 52 | + * | |
| 53 | + * @author SERPRO | |
| 54 | + */ | |
| 55 | +@Inherited | |
| 56 | +@Target({ METHOD, TYPE, FIELD }) | |
| 57 | +@Retention(RUNTIME) | |
| 58 | +@NormalScope | |
| 59 | +public @interface StaticScoped { | |
| 60 | + | |
| 61 | +} | ... | ... |
impl/core/src/main/java/br/gov/frameworkdemoiselle/lifecycle/ViewScoped.java
0 → 100644
| ... | ... | @@ -0,0 +1,61 @@ |
| 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.lifecycle; | |
| 38 | + | |
| 39 | +import static java.lang.annotation.ElementType.FIELD; | |
| 40 | +import static java.lang.annotation.ElementType.METHOD; | |
| 41 | +import static java.lang.annotation.ElementType.TYPE; | |
| 42 | +import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
| 43 | + | |
| 44 | +import java.lang.annotation.Inherited; | |
| 45 | +import java.lang.annotation.Retention; | |
| 46 | +import java.lang.annotation.Target; | |
| 47 | + | |
| 48 | +import javax.enterprise.context.NormalScope; | |
| 49 | + | |
| 50 | +/** | |
| 51 | + * This scope maintains the context for viewed page; when the viewed page change, the data will be lost. | |
| 52 | + * | |
| 53 | + * @author SERPRO | |
| 54 | + */ | |
| 55 | +@Inherited | |
| 56 | +@Target({ METHOD, TYPE, FIELD }) | |
| 57 | +@Retention(RUNTIME) | |
| 58 | +@NormalScope(passivating = true) | |
| 59 | +public @interface ViewScoped { | |
| 60 | + | |
| 61 | +} | ... | ... |