Commit 875576d5063950d63cd52da44c3e7e5bcd4f0de4
Exists in
master
Merge branch '2.4.0' of git@github.com:demoiselle/framework.git into 2.4.0
Showing
40 changed files
with
484 additions
and
47 deletions
Show diff stats
documentation/reference/pt-BR/gerenciamento.xml
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | <para>Ao implantar um sistema para produção, muitas vezes é necessário monitorar aspectos sobre o funcionamento desse sistema. Quanta memória | 11 | <para>Ao implantar um sistema para produção, muitas vezes é necessário monitorar aspectos sobre o funcionamento desse sistema. Quanta memória |
| 12 | ele está utilizando? Qual o pico de MIPS utilizados? Quantas sessões estão autenticadas no momento?</para> | 12 | ele está utilizando? Qual o pico de MIPS utilizados? Quantas sessões estão autenticadas no momento?</para> |
| 13 | 13 | ||
| 14 | - <para>Além de monitorar um sistema, as vezes é necessário gerencia-lo alterando aspectos de seu comportamento. Se o sistema está implantado em um | 14 | + <para>Além de monitorar um sistema, as vezes é necessário gerenciá-lo alterando aspectos de seu comportamento. Se o sistema está implantado em um |
| 15 | servidor alugado, talvez seja necessário ajustar o uso de MIPS para reduzir custos ou talvez deseje-se solicitar que o sistema limpe dados de sessão | 15 | servidor alugado, talvez seja necessário ajustar o uso de MIPS para reduzir custos ou talvez deseje-se solicitar que o sistema limpe dados de sessão |
| 16 | de autenticação abandonados por usuários que desligaram suas estações sem efetuar "logoff".</para> | 16 | de autenticação abandonados por usuários que desligaram suas estações sem efetuar "logoff".</para> |
| 17 | 17 | ||
| @@ -20,8 +20,9 @@ | @@ -20,8 +20,9 @@ | ||
| 20 | <emphasis>Java Management Extension</emphasis> (JMX).</para> | 20 | <emphasis>Java Management Extension</emphasis> (JMX).</para> |
| 21 | 21 | ||
| 22 | <para>O <emphasis>Demoiselle Framework</emphasis> dispõe de uma série de ferramentas para nivelar | 22 | <para>O <emphasis>Demoiselle Framework</emphasis> dispõe de uma série de ferramentas para nivelar |
| 23 | - o conhecimento do desenvolvedor e facilitar o uso e integraçao de várias tecnologias de gerenciamento e monitoração. Através de seu | ||
| 24 | - uso o desenvolvedor pode se despreocupar com detalhes de implementação de cada tecnologia individual e facilmente integrar tais tecnologias.</para> | 23 | + o conhecimento do desenvolvedor e facilitar o uso e integraçao de várias tecnologias de gerenciamento e |
| 24 | + monitoração. Através de seu uso o desenvolvedor pode facilmente integrar tais tecnologias, despreocupando-se | ||
| 25 | + com detalhes de implementação de cada uma delas.</para> | ||
| 25 | </section> | 26 | </section> |
| 26 | 27 | ||
| 27 | <section> | 28 | <section> |
| @@ -35,7 +36,7 @@ | @@ -35,7 +36,7 @@ | ||
| 35 | @ManagementController | 36 | @ManagementController |
| 36 | public class GerenciadorUsuarios]]></programlisting> | 37 | public class GerenciadorUsuarios]]></programlisting> |
| 37 | 38 | ||
| 38 | - <para>Essa anotação é suficiente para o mecanismo de gerenciamento descobrir sua classe e disponibiliza-la para ser monitorada e gerenciada.</para> | 39 | + <para>Essa anotação é suficiente para o mecanismo de gerenciamento descobrir sua classe e disponibilizá-la para ser monitorada e gerenciada.</para> |
| 39 | 40 | ||
| 40 | <para>Contudo, a simples anotação acima não informa ao mecanismo quais aspectos da classe serão expostos. Por padrão, um <emphasis>Management Controller</emphasis> | 41 | <para>Contudo, a simples anotação acima não informa ao mecanismo quais aspectos da classe serão expostos. Por padrão, um <emphasis>Management Controller</emphasis> |
| 41 | não expõe nenhum aspecto seu. Para selecionar quais aspectos serão expostos usamos as anotações | 42 | não expõe nenhum aspecto seu. Para selecionar quais aspectos serão expostos usamos as anotações |
| @@ -43,7 +44,7 @@ public class GerenciadorUsuarios]]></programlisting> | @@ -43,7 +44,7 @@ public class GerenciadorUsuarios]]></programlisting> | ||
| 43 | de classes anotadas com <code>@ManagementController</code>.</para> | 44 | de classes anotadas com <code>@ManagementController</code>.</para> |
| 44 | 45 | ||
| 45 | <informaltable> | 46 | <informaltable> |
| 46 | - <tgroup cols="3"> | 47 | + <tgroup cols="3" rowsep="1" colsep="1"> |
| 47 | <thead> | 48 | <thead> |
| 48 | <row> | 49 | <row> |
| 49 | <entry>Anotação</entry> | 50 | <entry>Anotação</entry> |
| @@ -53,7 +54,7 @@ public class GerenciadorUsuarios]]></programlisting> | @@ -53,7 +54,7 @@ public class GerenciadorUsuarios]]></programlisting> | ||
| 53 | </thead> | 54 | </thead> |
| 54 | 55 | ||
| 55 | <tbody> | 56 | <tbody> |
| 56 | - <row> | 57 | + <row valign="top"> |
| 57 | <entry> | 58 | <entry> |
| 58 | <emphasis role="BOLD">@ManagedProperty</emphasis> | 59 | <emphasis role="BOLD">@ManagedProperty</emphasis> |
| 59 | </entry> | 60 | </entry> |
| @@ -76,7 +77,7 @@ public class GerenciadorUsuarios]]></programlisting> | @@ -76,7 +77,7 @@ public class GerenciadorUsuarios]]></programlisting> | ||
| 76 | </entry> | 77 | </entry> |
| 77 | </row> | 78 | </row> |
| 78 | 79 | ||
| 79 | - <row> | 80 | + <row valign="top"> |
| 80 | <entry> | 81 | <entry> |
| 81 | <emphasis role="BOLD">@ManagedOperation</emphasis> | 82 | <emphasis role="BOLD">@ManagedOperation</emphasis> |
| 82 | </entry> | 83 | </entry> |
| @@ -98,7 +99,7 @@ public class GerenciadorUsuarios]]></programlisting> | @@ -98,7 +99,7 @@ public class GerenciadorUsuarios]]></programlisting> | ||
| 98 | </entry> | 99 | </entry> |
| 99 | </row> | 100 | </row> |
| 100 | 101 | ||
| 101 | - <row> | 102 | + <row valign="top"> |
| 102 | <entry> | 103 | <entry> |
| 103 | <emphasis role="BOLD">@OperationParameter</emphasis> | 104 | <emphasis role="BOLD">@OperationParameter</emphasis> |
| 104 | </entry> | 105 | </entry> |
| @@ -148,6 +149,24 @@ public class ControleAcesso{ | @@ -148,6 +149,24 @@ public class ControleAcesso{ | ||
| 148 | monitorLogin.setContadorLogin( monitorLogin.getContadorLogin() + 1 ); | 149 | monitorLogin.setContadorLogin( monitorLogin.getContadorLogin() + 1 ); |
| 149 | } | 150 | } |
| 150 | }]]></programlisting> | 151 | }]]></programlisting> |
| 152 | + | ||
| 153 | + <programlisting role="JAVA"><![CDATA[ | ||
| 154 | +@ManagementController | ||
| 155 | +public class MonitorLogin{ | ||
| 156 | + | ||
| 157 | + @ManagedProperty | ||
| 158 | + private int contadorLogin; | ||
| 159 | + | ||
| 160 | + @ManagedOperation | ||
| 161 | + public void setContadorLogin(int qtdUsuarioLogados){ | ||
| 162 | + contadorLogin = qtdUsuarioLogados; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + @ManagedOperation | ||
| 166 | + public int getContatorLogin(){ | ||
| 167 | + return contadorLogin; | ||
| 168 | + } | ||
| 169 | +}]]></programlisting> | ||
| 151 | 170 | ||
| 152 | <para>Como é possível ver, classes anotadas com <emphasis>@ManagementController</emphasis> podem ser injetadas em qualquer ponto do código. Valores definidos | 171 | <para>Como é possível ver, classes anotadas com <emphasis>@ManagementController</emphasis> podem ser injetadas em qualquer ponto do código. Valores definidos |
| 153 | para seus atributos retêm seu estado, então um cliente que acesse remotamente o sistema e monitore o valor do atributo <emphasis>contadorLogin</emphasis> verá | 172 | para seus atributos retêm seu estado, então um cliente que acesse remotamente o sistema e monitore o valor do atributo <emphasis>contadorLogin</emphasis> verá |
| @@ -181,7 +200,7 @@ public class ControleAcesso{ | @@ -181,7 +200,7 @@ public class ControleAcesso{ | ||
| 181 | individualmente, as classes monitoradas serão então expostas para todas as extensões escolhidas.</para> | 200 | individualmente, as classes monitoradas serão então expostas para todas as extensões escolhidas.</para> |
| 182 | </tip> | 201 | </tip> |
| 183 | 202 | ||
| 184 | - <para>A figura <xref linkend="exemplo_jconsole"/> mostra como uma classe monitorada na aplicação <emphasis>Bookmark</emphasis> é exibida no <emphasis>JConsole</emphasis>.</para> | 203 | + <para>A figura <xref linkend="exemplo_jconsole" /> mostra como uma classe monitorada na aplicação <emphasis>Bookmark</emphasis> é exibida no <emphasis>JConsole</emphasis>.</para> |
| 185 | 204 | ||
| 186 | <programlisting role="JAVA"><![CDATA[ | 205 | <programlisting role="JAVA"><![CDATA[ |
| 187 | @ManagementController | 206 | @ManagementController |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/ManagementBootstrap.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.bootstrap; | 37 | package br.gov.frameworkdemoiselle.internal.bootstrap; |
| 2 | 38 | ||
| 3 | import java.lang.reflect.Modifier; | 39 | import java.lang.reflect.Modifier; |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/context/ContextManager.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.context; | 37 | package br.gov.frameworkdemoiselle.internal.context; |
| 2 | 38 | ||
| 3 | import java.lang.annotation.Annotation; | 39 | import java.lang.annotation.Annotation; |
| @@ -39,7 +75,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | @@ -39,7 +75,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 39 | * activated upon adding). | 75 | * activated upon adding). |
| 40 | * </p> | 76 | * </p> |
| 41 | * | 77 | * |
| 42 | - * @author serpro | 78 | + * @author SERPRO |
| 43 | */ | 79 | */ |
| 44 | public final class ContextManager { | 80 | public final class ContextManager { |
| 45 | 81 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/context/CustomContext.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.context; | 37 | package br.gov.frameworkdemoiselle.internal.context; |
| 2 | 38 | ||
| 3 | import javax.enterprise.context.spi.Context; | 39 | import javax.enterprise.context.spi.Context; |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/context/ManagedContext.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.context; | 37 | package br.gov.frameworkdemoiselle.internal.context; |
| 2 | 38 | ||
| 3 | import javax.enterprise.context.RequestScoped; | 39 | import javax.enterprise.context.RequestScoped; |
| @@ -8,7 +44,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | @@ -8,7 +44,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | ||
| 8 | * Context that stores {@link RequestScoped} beans during client calls to {@link ManagementController} classes. This | 44 | * Context that stores {@link RequestScoped} beans during client calls to {@link ManagementController} classes. This |
| 9 | * context is only activated when no other context is active for {@link RequestScoped}. | 45 | * context is only activated when no other context is active for {@link RequestScoped}. |
| 10 | * | 46 | * |
| 11 | - * @author serpro | 47 | + * @author SERPRO |
| 12 | */ | 48 | */ |
| 13 | public class ManagedContext extends ThreadLocalContext { | 49 | public class ManagedContext extends ThreadLocalContext { |
| 14 | 50 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/context/ThreadLocalContext.java
| @@ -53,7 +53,7 @@ import java.lang.annotation.Annotation; | @@ -53,7 +53,7 @@ import java.lang.annotation.Annotation; | ||
| 53 | /** | 53 | /** |
| 54 | * Base context that has a separated store for each thread | 54 | * Base context that has a separated store for each thread |
| 55 | * | 55 | * |
| 56 | - * @author serpro | 56 | + * @author SERPRO |
| 57 | */ | 57 | */ |
| 58 | public class ThreadLocalContext extends AbstractCustomContext { | 58 | public class ThreadLocalContext extends AbstractCustomContext { |
| 59 | 59 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ConfigurationImpl.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.implementation; | 37 | package br.gov.frameworkdemoiselle.internal.implementation; |
| 2 | 38 | ||
| 3 | import java.io.Serializable; | 39 | import java.io.Serializable; |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/NotificationManagerImpl.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.internal.implementation; | 37 | package br.gov.frameworkdemoiselle.internal.implementation; |
| 2 | 38 | ||
| 3 | import java.io.Serializable; | 39 | import java.io.Serializable; |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagedType.java
| @@ -60,7 +60,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | @@ -60,7 +60,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 60 | * <p>Instances if this class are passed to each discovered management extension during bootstrap so they can have | 60 | * <p>Instances if this class are passed to each discovered management extension during bootstrap so they can have |
| 61 | * enough information to expose all discovered {@link ManagementController}'s to management clients.</p> | 61 | * enough information to expose all discovered {@link ManagementController}'s to management clients.</p> |
| 62 | * | 62 | * |
| 63 | - * @author serpro | 63 | + * @author SERPRO |
| 64 | */ | 64 | */ |
| 65 | public class ManagedType { | 65 | public class ManagedType { |
| 66 | 66 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/Management.java
| @@ -72,7 +72,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | @@ -72,7 +72,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 72 | * Central class used by management extensions to obtain information, access properties and call operations over | 72 | * Central class used by management extensions to obtain information, access properties and call operations over |
| 73 | * discovered {@link ManagementController} classes. | 73 | * discovered {@link ManagementController} classes. |
| 74 | * | 74 | * |
| 75 | - * @author serpro | 75 | + * @author SERPRO |
| 76 | */ | 76 | */ |
| 77 | @ApplicationScoped | 77 | @ApplicationScoped |
| 78 | public class Management implements Serializable { | 78 | public class Management implements Serializable { |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEventImpl.java
| @@ -44,7 +44,7 @@ import br.gov.frameworkdemoiselle.management.NotificationManager; | @@ -44,7 +44,7 @@ import br.gov.frameworkdemoiselle.management.NotificationManager; | ||
| 44 | * Implementators can capture this event and be notified when the {@link NotificationManager} | 44 | * Implementators can capture this event and be notified when the {@link NotificationManager} |
| 45 | * sends notifications, so they can pass the notification to the underlying technology. | 45 | * sends notifications, so they can pass the notification to the underlying technology. |
| 46 | * | 46 | * |
| 47 | - * @author serpro | 47 | + * @author SERPRO |
| 48 | * | 48 | * |
| 49 | */ | 49 | */ |
| 50 | public class ManagementNotificationEventImpl implements br.gov.frameworkdemoiselle.management.ManagementNotificationEvent { | 50 | public class ManagementNotificationEventImpl implements br.gov.frameworkdemoiselle.management.ManagementNotificationEvent { |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/AttributeChange.java
| @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; | @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; | ||
| 51 | * Enables {@link ManagementNotificationEvent} observers to trigger only with notifications | 51 | * Enables {@link ManagementNotificationEvent} observers to trigger only with notifications |
| 52 | * of the specialized type {@link AttributeChangeNotification}. | 52 | * of the specialized type {@link AttributeChangeNotification}. |
| 53 | * | 53 | * |
| 54 | - * @author serpro | 54 | + * @author SERPRO |
| 55 | * | 55 | * |
| 56 | */ | 56 | */ |
| 57 | @Qualifier | 57 | @Qualifier |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/Generic.java
| @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.management.GenericNotification; | @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.management.GenericNotification; | ||
| 51 | * Enables {@link ManagementNotificationEvent} observers to trigger only with notifications | 51 | * Enables {@link ManagementNotificationEvent} observers to trigger only with notifications |
| 52 | * of the base type {@link GenericNotification}. | 52 | * of the base type {@link GenericNotification}. |
| 53 | * | 53 | * |
| 54 | - * @author serpro | 54 | + * @author SERPRO |
| 55 | * | 55 | * |
| 56 | */ | 56 | */ |
| 57 | @Qualifier | 57 | @Qualifier |
impl/core/src/main/java/br/gov/frameworkdemoiselle/lifecycle/ManagementExtension.java
| @@ -54,7 +54,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | @@ -54,7 +54,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | ||
| 54 | * methods at the apropriate times. | 54 | * methods at the apropriate times. |
| 55 | * </p> | 55 | * </p> |
| 56 | * | 56 | * |
| 57 | - * @author serpro | 57 | + * @author SERPRO |
| 58 | */ | 58 | */ |
| 59 | public interface ManagementExtension { | 59 | public interface ManagementExtension { |
| 60 | 60 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/AttributeChangeNotification.java
| @@ -40,7 +40,7 @@ package br.gov.frameworkdemoiselle.management; | @@ -40,7 +40,7 @@ package br.gov.frameworkdemoiselle.management; | ||
| 40 | * Special notification to denote an attribute has changed values. | 40 | * Special notification to denote an attribute has changed values. |
| 41 | * | 41 | * |
| 42 | * @see GenericNotification | 42 | * @see GenericNotification |
| 43 | - * @author serpro | 43 | + * @author SERPRO |
| 44 | */ | 44 | */ |
| 45 | public class AttributeChangeNotification extends GenericNotification { | 45 | public class AttributeChangeNotification extends GenericNotification { |
| 46 | 46 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/GenericNotification.java
| @@ -39,7 +39,7 @@ package br.gov.frameworkdemoiselle.management; | @@ -39,7 +39,7 @@ package br.gov.frameworkdemoiselle.management; | ||
| 39 | /** | 39 | /** |
| 40 | * Notification that can be sent by the {@link NotificationManager}. | 40 | * Notification that can be sent by the {@link NotificationManager}. |
| 41 | * | 41 | * |
| 42 | - * @author serpro | 42 | + * @author SERPRO |
| 43 | */ | 43 | */ |
| 44 | public class GenericNotification { | 44 | public class GenericNotification { |
| 45 | 45 |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagedAttributeNotFoundException.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.management; | 37 | package br.gov.frameworkdemoiselle.management; |
| 2 | 38 | ||
| 3 | import br.gov.frameworkdemoiselle.DemoiselleException; | 39 | import br.gov.frameworkdemoiselle.DemoiselleException; |
| @@ -7,7 +43,7 @@ import br.gov.frameworkdemoiselle.DemoiselleException; | @@ -7,7 +43,7 @@ import br.gov.frameworkdemoiselle.DemoiselleException; | ||
| 7 | * Thrown when a management client tries to read or write a property, but the | 43 | * Thrown when a management client tries to read or write a property, but the |
| 8 | * management engine has no knowledge of an attribute with the given name. | 44 | * management engine has no knowledge of an attribute with the given name. |
| 9 | * | 45 | * |
| 10 | - * @author serpro | 46 | + * @author SERPRO |
| 11 | * | 47 | * |
| 12 | */ | 48 | */ |
| 13 | public class ManagedAttributeNotFoundException extends DemoiselleException { | 49 | public class ManagedAttributeNotFoundException extends DemoiselleException { |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagedInvokationException.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.management; | 37 | package br.gov.frameworkdemoiselle.management; |
| 2 | 38 | ||
| 3 | import br.gov.frameworkdemoiselle.DemoiselleException; | 39 | import br.gov.frameworkdemoiselle.DemoiselleException; |
| 4 | 40 | ||
| 5 | - | 41 | +/** |
| 42 | + * | ||
| 43 | + * Thrown In case the operation doesn't exist or have a different signature | ||
| 44 | + * | ||
| 45 | + * @author SERPRO | ||
| 46 | + * | ||
| 47 | + */ | ||
| 6 | public class ManagedInvokationException extends DemoiselleException { | 48 | public class ManagedInvokationException extends DemoiselleException { |
| 7 | 49 | ||
| 8 | private static final long serialVersionUID = -1542365184737242152L; | 50 | private static final long serialVersionUID = -1542365184737242152L; |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagementNotificationEvent.java
| 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 | + */ | ||
| 1 | package br.gov.frameworkdemoiselle.management; | 37 | package br.gov.frameworkdemoiselle.management; |
| 2 | 38 | ||
| 3 | /** | 39 | /** |
| @@ -5,7 +41,7 @@ package br.gov.frameworkdemoiselle.management; | @@ -5,7 +41,7 @@ package br.gov.frameworkdemoiselle.management; | ||
| 5 | * Implementators can capture this event and be notified when the {@link NotificationManager} | 41 | * Implementators can capture this event and be notified when the {@link NotificationManager} |
| 6 | * sends notifications, so they can pass the notification to the underlying technology. | 42 | * sends notifications, so they can pass the notification to the underlying technology. |
| 7 | * | 43 | * |
| 8 | - * @author serpro | 44 | + * @author SERPRO |
| 9 | * | 45 | * |
| 10 | */ | 46 | */ |
| 11 | public interface ManagementNotificationEvent { | 47 | public interface ManagementNotificationEvent { |
impl/core/src/main/java/br/gov/frameworkdemoiselle/management/NotificationManager.java
| @@ -59,7 +59,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | @@ -59,7 +59,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | ||
| 59 | * the implementator can use qualifiers like the {@link Generic} and {@link AttributeChange} qualifiers | 59 | * the implementator can use qualifiers like the {@link Generic} and {@link AttributeChange} qualifiers |
| 60 | * to filter what king of notifications they will handle. One example of an implementator is the <b>demoiselle-jmx</b> extension.</p> | 60 | * to filter what king of notifications they will handle. One example of an implementator is the <b>demoiselle-jmx</b> extension.</p> |
| 61 | * | 61 | * |
| 62 | - * @author serpro | 62 | + * @author SERPRO |
| 63 | * | 63 | * |
| 64 | */ | 64 | */ |
| 65 | @ApplicationScoped | 65 | @ApplicationScoped |
impl/core/src/test/java/management/basic/ManagementTest.java
| @@ -57,7 +57,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | @@ -57,7 +57,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | ||
| 57 | * Test case that simulates a management extension and tests if properties and operations on a managed class can be | 57 | * Test case that simulates a management extension and tests if properties and operations on a managed class can be |
| 58 | * easily accessed and invoked. | 58 | * easily accessed and invoked. |
| 59 | * | 59 | * |
| 60 | - * @author serpro | 60 | + * @author SERPRO |
| 61 | */ | 61 | */ |
| 62 | @RunWith(Arquillian.class) | 62 | @RunWith(Arquillian.class) |
| 63 | public class ManagementTest { | 63 | public class ManagementTest { |
impl/core/src/test/java/management/notification/NotificationTest.java
| @@ -61,7 +61,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | @@ -61,7 +61,7 @@ import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 61 | /** | 61 | /** |
| 62 | * Test the {@link NotificationManager} with a dummy extension to check if notifications are correctly propagated | 62 | * Test the {@link NotificationManager} with a dummy extension to check if notifications are correctly propagated |
| 63 | * | 63 | * |
| 64 | - * @author serpro | 64 | + * @author SERPRO |
| 65 | */ | 65 | */ |
| 66 | @RunWith(Arquillian.class) | 66 | @RunWith(Arquillian.class) |
| 67 | public class NotificationTest { | 67 | public class NotificationTest { |
impl/core/src/test/java/management/testclasses/DummyManagedClassPropertyError.java
| @@ -44,7 +44,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | @@ -44,7 +44,7 @@ import br.gov.frameworkdemoiselle.stereotype.ManagementController; | ||
| 44 | * | 44 | * |
| 45 | * Used in tests to detect if the bootstrap detects wrong annotations | 45 | * Used in tests to detect if the bootstrap detects wrong annotations |
| 46 | * | 46 | * |
| 47 | - * @author serpro | 47 | + * @author SERPRO |
| 48 | * | 48 | * |
| 49 | */ | 49 | */ |
| 50 | @ManagementController | 50 | @ManagementController |
impl/core/src/test/java/management/testclasses/DummyNotificationListener.java
| @@ -48,7 +48,7 @@ import br.gov.frameworkdemoiselle.management.NotificationManager; | @@ -48,7 +48,7 @@ import br.gov.frameworkdemoiselle.management.NotificationManager; | ||
| 48 | /** | 48 | /** |
| 49 | * Dummy class to test receiving of notifications sent by the {@link NotificationManager} | 49 | * Dummy class to test receiving of notifications sent by the {@link NotificationManager} |
| 50 | * | 50 | * |
| 51 | - * @author serpro | 51 | + * @author SERPRO |
| 52 | * | 52 | * |
| 53 | */ | 53 | */ |
| 54 | @ApplicationScoped | 54 | @ApplicationScoped |
impl/core/src/test/java/management/testclasses/ManagedClassStore.java
| @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | @@ -51,7 +51,7 @@ import br.gov.frameworkdemoiselle.util.Beans; | ||
| 51 | * and can read/write properties and invoke operations on them, simulating a management | 51 | * and can read/write properties and invoke operations on them, simulating a management |
| 52 | * extension like JMX or SNMP. | 52 | * extension like JMX or SNMP. |
| 53 | * | 53 | * |
| 54 | - * @author serpro | 54 | + * @author SERPRO |
| 55 | * | 55 | * |
| 56 | */ | 56 | */ |
| 57 | @ApplicationScoped | 57 | @ApplicationScoped |
impl/core/src/test/java/management/testclasses/RequestScopeBeanClient.java
| @@ -2,21 +2,20 @@ package management.testclasses; | @@ -2,21 +2,20 @@ package management.testclasses; | ||
| 2 | 2 | ||
| 3 | import br.gov.frameworkdemoiselle.util.Beans; | 3 | import br.gov.frameworkdemoiselle.util.Beans; |
| 4 | 4 | ||
| 5 | - | ||
| 6 | public class RequestScopeBeanClient { | 5 | public class RequestScopeBeanClient { |
| 7 | - | ||
| 8 | - public void operationOne(){ | ||
| 9 | - | 6 | + |
| 7 | + public void operationOne() { | ||
| 8 | + | ||
| 10 | RequestScopedClass bean = Beans.getReference(RequestScopedClass.class); | 9 | RequestScopedClass bean = Beans.getReference(RequestScopedClass.class); |
| 11 | - bean.setInfo( bean.getInfo() + "-OPERATION ONE CALLED-"); | ||
| 12 | - | 10 | + bean.setInfo(bean.getInfo() + "-OPERATION ONE CALLED-"); |
| 11 | + | ||
| 13 | } | 12 | } |
| 14 | - | ||
| 15 | - public void operationTwo(){ | ||
| 16 | - | 13 | + |
| 14 | + public void operationTwo() { | ||
| 15 | + | ||
| 17 | RequestScopedClass bean = Beans.getReference(RequestScopedClass.class); | 16 | RequestScopedClass bean = Beans.getReference(RequestScopedClass.class); |
| 18 | - bean.setInfo( bean.getInfo() + "-OPERATION TWO CALLED-"); | ||
| 19 | - | 17 | + bean.setInfo(bean.getInfo() + "-OPERATION TWO CALLED-"); |
| 18 | + | ||
| 20 | } | 19 | } |
| 21 | 20 | ||
| 22 | } | 21 | } |
impl/core/src/test/java/management/testclasses/RequestScopedClass.java
| @@ -4,19 +4,15 @@ import javax.enterprise.context.RequestScoped; | @@ -4,19 +4,15 @@ import javax.enterprise.context.RequestScoped; | ||
| 4 | 4 | ||
| 5 | @RequestScoped | 5 | @RequestScoped |
| 6 | public class RequestScopedClass { | 6 | public class RequestScopedClass { |
| 7 | - | 7 | + |
| 8 | private String info = ""; | 8 | private String info = ""; |
| 9 | 9 | ||
| 10 | - | ||
| 11 | public String getInfo() { | 10 | public String getInfo() { |
| 12 | return info; | 11 | return info; |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | - | ||
| 16 | public void setInfo(String info) { | 14 | public void setInfo(String info) { |
| 17 | this.info = info; | 15 | this.info = info; |
| 18 | } | 16 | } |
| 19 | - | ||
| 20 | - | ||
| 21 | 17 | ||
| 22 | } | 18 | } |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/annotation/NextView.java
| @@ -47,8 +47,12 @@ import java.lang.annotation.Inherited; | @@ -47,8 +47,12 @@ import java.lang.annotation.Inherited; | ||
| 47 | import java.lang.annotation.Retention; | 47 | import java.lang.annotation.Retention; |
| 48 | import java.lang.annotation.Target; | 48 | import java.lang.annotation.Target; |
| 49 | 49 | ||
| 50 | +/** | ||
| 51 | + * Used to indicate which page to redirect after the execution of some method. | ||
| 52 | + * | ||
| 53 | + * @author SERPRO | ||
| 54 | + */ | ||
| 50 | 55 | ||
| 51 | -// TODO Este qualifier é realmente necessário? Verificar também na anotação PreviousView. | ||
| 52 | @Inherited | 56 | @Inherited |
| 53 | @Documented | 57 | @Documented |
| 54 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) | 58 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/annotation/PreviousView.java
| @@ -47,6 +47,11 @@ import java.lang.annotation.Inherited; | @@ -47,6 +47,11 @@ import java.lang.annotation.Inherited; | ||
| 47 | import java.lang.annotation.Retention; | 47 | import java.lang.annotation.Retention; |
| 48 | import java.lang.annotation.Target; | 48 | import java.lang.annotation.Target; |
| 49 | 49 | ||
| 50 | +/** | ||
| 51 | + * Used to indicate which page to return after the execution of some method. | ||
| 52 | + * | ||
| 53 | + * @author SERPRO | ||
| 54 | + */ | ||
| 50 | @Inherited | 55 | @Inherited |
| 51 | @Documented | 56 | @Documented |
| 52 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) | 57 | @Target({ TYPE, FIELD, METHOD, PARAMETER }) |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractEditPageBean.java
| @@ -48,6 +48,17 @@ import br.gov.frameworkdemoiselle.util.Parameter; | @@ -48,6 +48,17 @@ import br.gov.frameworkdemoiselle.util.Parameter; | ||
| 48 | import br.gov.frameworkdemoiselle.util.Reflections; | 48 | import br.gov.frameworkdemoiselle.util.Reflections; |
| 49 | import br.gov.frameworkdemoiselle.util.ResourceBundle; | 49 | import br.gov.frameworkdemoiselle.util.ResourceBundle; |
| 50 | 50 | ||
| 51 | +/** | ||
| 52 | + * Template Managed Bean class that implements the methods defined by the interface EditPageBean. | ||
| 53 | + * | ||
| 54 | + * @param <T> | ||
| 55 | + * bean object type | ||
| 56 | + * @param <I> | ||
| 57 | + * bean id type | ||
| 58 | + * | ||
| 59 | + * @author SERPRO | ||
| 60 | + * @see EditPageBean | ||
| 61 | + */ | ||
| 51 | public abstract class AbstractEditPageBean<T, I> extends AbstractPageBean implements EditPageBean<T> { | 62 | public abstract class AbstractEditPageBean<T, I> extends AbstractPageBean implements EditPageBean<T> { |
| 52 | 63 | ||
| 53 | private static final long serialVersionUID = 1L; | 64 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractListPageBean.java
| @@ -49,7 +49,17 @@ import javax.inject.Inject; | @@ -49,7 +49,17 @@ import javax.inject.Inject; | ||
| 49 | import br.gov.frameworkdemoiselle.pagination.Pagination; | 49 | import br.gov.frameworkdemoiselle.pagination.Pagination; |
| 50 | import br.gov.frameworkdemoiselle.pagination.PaginationContext; | 50 | import br.gov.frameworkdemoiselle.pagination.PaginationContext; |
| 51 | import br.gov.frameworkdemoiselle.util.Reflections; | 51 | import br.gov.frameworkdemoiselle.util.Reflections; |
| 52 | - | 52 | +/** |
| 53 | + * Template Managed Bean class that implements the methods defined by the interface ListPageBean. | ||
| 54 | + * | ||
| 55 | + * @param <T> | ||
| 56 | + * bean object type | ||
| 57 | + * @param <I> | ||
| 58 | + * bean id type | ||
| 59 | + * | ||
| 60 | + * @author SERPRO | ||
| 61 | + * @see ListPageBean | ||
| 62 | + */ | ||
| 53 | public abstract class AbstractListPageBean<T, I> extends AbstractPageBean implements ListPageBean<T, I> { | 63 | public abstract class AbstractListPageBean<T, I> extends AbstractPageBean implements ListPageBean<T, I> { |
| 54 | 64 | ||
| 55 | private static final long serialVersionUID = 1L; | 65 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/AbstractPageBean.java
| @@ -42,6 +42,12 @@ import javax.inject.Inject; | @@ -42,6 +42,12 @@ import javax.inject.Inject; | ||
| 42 | import br.gov.frameworkdemoiselle.annotation.NextView; | 42 | import br.gov.frameworkdemoiselle.annotation.NextView; |
| 43 | import br.gov.frameworkdemoiselle.annotation.PreviousView; | 43 | import br.gov.frameworkdemoiselle.annotation.PreviousView; |
| 44 | 44 | ||
| 45 | +/** | ||
| 46 | + * Template Managed Bean class that implements the methods defined by the interface PageBean. | ||
| 47 | + * | ||
| 48 | + * @author SERPRO | ||
| 49 | + * @see PageBean | ||
| 50 | + */ | ||
| 45 | public abstract class AbstractPageBean implements PageBean { | 51 | public abstract class AbstractPageBean implements PageBean { |
| 46 | 52 | ||
| 47 | private static final long serialVersionUID = 1L; | 53 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/EditPageBean.java
| @@ -36,6 +36,15 @@ | @@ -36,6 +36,15 @@ | ||
| 36 | */ | 36 | */ |
| 37 | package br.gov.frameworkdemoiselle.template; | 37 | package br.gov.frameworkdemoiselle.template; |
| 38 | 38 | ||
| 39 | +/** | ||
| 40 | + * Interface that defines a contract of facilities that a page with funcionalities of insert, edit and delete could implement. | ||
| 41 | + * | ||
| 42 | + * @param <T> | ||
| 43 | + * bean object type | ||
| 44 | + * | ||
| 45 | + * @author SERPRO | ||
| 46 | + * | ||
| 47 | + */ | ||
| 39 | public interface EditPageBean<T> extends PageBean { | 48 | public interface EditPageBean<T> extends PageBean { |
| 40 | 49 | ||
| 41 | String delete(); | 50 | String delete(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/ListPageBean.java
| @@ -41,6 +41,17 @@ import java.util.Map; | @@ -41,6 +41,17 @@ import java.util.Map; | ||
| 41 | 41 | ||
| 42 | import javax.faces.model.DataModel; | 42 | import javax.faces.model.DataModel; |
| 43 | 43 | ||
| 44 | +/** | ||
| 45 | + * Interface that defines a contract of facilities that a page with the funcionality of list could implement. | ||
| 46 | + * | ||
| 47 | + * @param <T> | ||
| 48 | + * bean object type | ||
| 49 | + * @param <I> | ||
| 50 | + * bean id type | ||
| 51 | + * | ||
| 52 | + * @author SERPRO | ||
| 53 | + * | ||
| 54 | + */ | ||
| 44 | public interface ListPageBean<T, I> extends PageBean { | 55 | public interface ListPageBean<T, I> extends PageBean { |
| 45 | 56 | ||
| 46 | DataModel<T> getDataModel(); | 57 | DataModel<T> getDataModel(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/template/PageBean.java
| @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.template; | @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.template; | ||
| 38 | 38 | ||
| 39 | import java.io.Serializable; | 39 | import java.io.Serializable; |
| 40 | 40 | ||
| 41 | +/** | ||
| 42 | + * Interface that defines a contract of facilities that all pages could implement. | ||
| 43 | + * | ||
| 44 | + * @author SERPRO | ||
| 45 | + * | ||
| 46 | + */ | ||
| 41 | public interface PageBean extends Serializable { | 47 | public interface PageBean extends Serializable { |
| 42 | 48 | ||
| 43 | String getCurrentView(); | 49 | String getCurrentView(); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Faces.java
| @@ -55,6 +55,11 @@ import br.gov.frameworkdemoiselle.exception.ApplicationException; | @@ -55,6 +55,11 @@ import br.gov.frameworkdemoiselle.exception.ApplicationException; | ||
| 55 | import br.gov.frameworkdemoiselle.message.Message; | 55 | import br.gov.frameworkdemoiselle.message.Message; |
| 56 | import br.gov.frameworkdemoiselle.message.SeverityType; | 56 | import br.gov.frameworkdemoiselle.message.SeverityType; |
| 57 | 57 | ||
| 58 | +/** | ||
| 59 | + * Utility class to insert messages in the FacesContext. | ||
| 60 | + * | ||
| 61 | + * @author SERPRO | ||
| 62 | + * */ | ||
| 58 | public class Faces { | 63 | public class Faces { |
| 59 | 64 | ||
| 60 | private Faces() { | 65 | private Faces() { |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Locales.java
| @@ -43,6 +43,11 @@ import javax.faces.context.FacesContext; | @@ -43,6 +43,11 @@ import javax.faces.context.FacesContext; | ||
| 43 | import javax.inject.Inject; | 43 | import javax.inject.Inject; |
| 44 | import javax.inject.Named; | 44 | import javax.inject.Named; |
| 45 | 45 | ||
| 46 | +/** | ||
| 47 | + * Utility class to configure the Locale. | ||
| 48 | + * | ||
| 49 | + * @author SERPRO | ||
| 50 | + * */ | ||
| 46 | @Named | 51 | @Named |
| 47 | public class Locales implements Serializable { | 52 | public class Locales implements Serializable { |
| 48 | 53 |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/PageNotFoundException.java
| @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.util; | @@ -38,6 +38,12 @@ package br.gov.frameworkdemoiselle.util; | ||
| 38 | 38 | ||
| 39 | import br.gov.frameworkdemoiselle.DemoiselleException; | 39 | import br.gov.frameworkdemoiselle.DemoiselleException; |
| 40 | 40 | ||
| 41 | +/** | ||
| 42 | + * | ||
| 43 | + * Utility class that serves as the exception to be thrown when a page is not found. | ||
| 44 | + * | ||
| 45 | + * @author SERPRO | ||
| 46 | + * */ | ||
| 41 | public class PageNotFoundException extends DemoiselleException { | 47 | public class PageNotFoundException extends DemoiselleException { |
| 42 | 48 | ||
| 43 | private static final long serialVersionUID = 1L; | 49 | private static final long serialVersionUID = 1L; |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Parameter.java
| @@ -40,6 +40,15 @@ import java.io.Serializable; | @@ -40,6 +40,15 @@ import java.io.Serializable; | ||
| 40 | 40 | ||
| 41 | import javax.faces.convert.Converter; | 41 | import javax.faces.convert.Converter; |
| 42 | 42 | ||
| 43 | +/** | ||
| 44 | + * | ||
| 45 | + * Interface that defines the methods to be implemented to get and set values on a parameter. | ||
| 46 | + * | ||
| 47 | + * @param <T> | ||
| 48 | + * bean object type | ||
| 49 | + * | ||
| 50 | + * @author SERPRO | ||
| 51 | + * */ | ||
| 43 | public interface Parameter<T extends Serializable> { | 52 | public interface Parameter<T extends Serializable> { |
| 44 | 53 | ||
| 45 | void setValue(T value); | 54 | void setValue(T value); |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Redirector.java
| @@ -47,6 +47,12 @@ import javax.faces.FacesException; | @@ -47,6 +47,12 @@ import javax.faces.FacesException; | ||
| 47 | import javax.faces.application.ViewHandler; | 47 | import javax.faces.application.ViewHandler; |
| 48 | import javax.faces.context.FacesContext; | 48 | import javax.faces.context.FacesContext; |
| 49 | 49 | ||
| 50 | +/** | ||
| 51 | + * | ||
| 52 | + * Utility class to redirect determined page to another one. | ||
| 53 | + * | ||
| 54 | + * @author SERPRO | ||
| 55 | + * */ | ||
| 50 | public class Redirector { | 56 | public class Redirector { |
| 51 | 57 | ||
| 52 | private Redirector() { | 58 | private Redirector() { |