Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DroolsService |
|
| 0.0;0 |
1 | /* | |
2 | Drools5 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.drools5.annotations; | |
20 | ||
21 | import static java.lang.annotation.ElementType.TYPE; | |
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.drools5.DroolsServiceType; | |
28 | ||
29 | /** | |
30 | * This annotation defines the interface or the class. | |
31 | * | |
32 | * Usage of this annotation is mandatory: | |
33 | * <ul> | |
34 | * <li>On interface to mark it as DroolsInterface, that will support Drools stuff.</li> | |
35 | * <li>On classe to mark it as DroolsClass, that will be instrumented as compile time.</li> | |
36 | * </ul> | |
37 | * | |
38 | * All attribute of the annotation can be ommited. | |
39 | * | |
40 | * @author mbo | |
41 | * | |
42 | */ | |
43 | @Retention(RUNTIME) | |
44 | @Target(TYPE) | |
45 | public @interface DroolsService { | |
46 | /** | |
47 | * This is the type of the service source. | |
48 | * <ul> | |
49 | * <li>COMPILED=Use a compiled drools rule</li> | |
50 | * <li>SOURCE=Use a source drools file and compile it</li> | |
51 | * <li>XML=This is a XML source drools file and compile it</li> | |
52 | * </ul> | |
53 | * @return | |
54 | */ | |
55 | DroolsServiceType type() default DroolsServiceType.COMPILED; | |
56 | ||
57 | /** | |
58 | * This is the resource name. | |
59 | * If not specified, use interface name.drl for source and interface name.cdrl for compiled one. | |
60 | * @return | |
61 | */ | |
62 | String resourceName() default ""; | |
63 | } |