Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DroolsParameter |
|
| 0.0;0 |
1 | /* | |
2 | Drools4 Integration Helper | |
3 | Copyright (C) 2009 Mathieu Boretti mathieu.boretti@gmail.com | |
4 | ||
5 | This program is free software: you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation, either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | ||
18 | */ | |
19 | package org.boretti.drools.integration.drools4.annotations; | |
20 | ||
21 | import static java.lang.annotation.ElementType.PARAMETER; | |
22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
23 | ||
24 | import java.lang.annotation.Retention; | |
25 | import java.lang.annotation.Target; | |
26 | ||
27 | import org.boretti.drools.integration.drools4.DroolsParameterHandling; | |
28 | ||
29 | /** | |
30 | * This annotation defines how parameter must be handled. | |
31 | * | |
32 | * Usage of this annotation is optional. If omitted, NONE is assumed. | |
33 | * @author mbo | |
34 | * | |
35 | */ | |
36 | @Retention(RUNTIME) | |
37 | @Target(PARAMETER) | |
38 | public @interface DroolsParameter { | |
39 | /** | |
40 | * This defines how to handle the parameter. | |
41 | * <ul> | |
42 | * <li>NONE=No special treatment</li> | |
43 | * <li>IGNORED=Don't pas the parameter to drools</li> | |
44 | * <li>TOFLAT1=If parameter is list or collection, pass each item in drools and not the parameter</li> | |
45 | * <li>TOFLATALL=If parameter is list or collection, pass each item in drools and not the parameter and do it recursively</li> | |
46 | * </ul> | |
47 | * @return | |
48 | */ | |
49 | DroolsParameterHandling handling() default DroolsParameterHandling.NONE; | |
50 | } |