Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ExceptionHandler |
|
| 0.0;0 |
1 | /** | |
2 | * - Digitalis Internal Framework v2.0 - (C) 2007, Digitalis Informatica. Distribuicao e Gestao de Informatica, Lda. | |
3 | * Estrada de Paco de Arcos num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 | |
4 | * http://www.digitalis.pt | |
5 | */ | |
6 | package pt.digitalis.dif.dem.annotations.stage; | |
7 | ||
8 | import java.lang.annotation.ElementType; | |
9 | import java.lang.annotation.Retention; | |
10 | import java.lang.annotation.RetentionPolicy; | |
11 | import java.lang.annotation.Target; | |
12 | ||
13 | import pt.digitalis.dif.controller.ExceptionHandlers; | |
14 | import pt.digitalis.dif.dem.annotations.metaannotations.BindToPrimary; | |
15 | import pt.digitalis.dif.dem.annotations.metaannotations.Primary; | |
16 | ||
17 | /** | |
18 | * This annotation defines a stage for execution if an exception is thrown. It will be added to the | |
19 | * {@link ExceptionHandlers} for the dispatcher to manage. It is a non-pure primary annotation. Yields primariness to | |
20 | * <code>@StageDefinition</code> when used with this annotation. | |
21 | * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a> | |
22 | * @created 2007/05/11 | |
23 | */ | |
24 | @Target( {ElementType.TYPE}) | |
25 | @Retention(RetentionPolicy.RUNTIME) | |
26 | @Primary(yieldTo = "pt.digitalis.dif.dem.annotations.entities.StageDefinition, pt.digitalis.dif.dem.annotations.stage.View") | |
27 | @BindToPrimary("pt.digitalis.dif.dem.annotations.entities.StageDefinition") | |
28 | public @interface ExceptionHandler { | |
29 | ||
30 | /** | |
31 | * The type of the exception whose raising will trigger the error stage. By default, any Exception will trigger the | |
32 | * error stage. Mandatory field!! | |
33 | */ | |
34 | String exceptions(); | |
35 | } |