Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IocContainer |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.beans.ioc; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque 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 JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import org.springframework.context.ApplicationContext; | |
20 | import org.springframework.context.support.AbstractMessageSource; | |
21 | ||
22 | /** | |
23 | * An IoC container specification. | |
24 | * | |
25 | * @author Baptiste Wicht | |
26 | */ | |
27 | public interface IocContainer { | |
28 | /** | |
29 | * Return the resource bundle of the IoC container. | |
30 | * | |
31 | * @return The resource bundle of the container. | |
32 | */ | |
33 | AbstractMessageSource getResourceBundle(); | |
34 | ||
35 | /** | |
36 | * Return the application context. | |
37 | * | |
38 | * @return The Spring application context. | |
39 | */ | |
40 | ApplicationContext getApplicationContext(); | |
41 | ||
42 | /** | |
43 | * Load the context. | |
44 | */ | |
45 | void loadContext(); | |
46 | ||
47 | /** | |
48 | * Destroy the application context. | |
49 | */ | |
50 | void destroy(); | |
51 | ||
52 | /** | |
53 | * Inject the dependencies into the object. A dependency is habitually declared with the | |
54 | * Resource annotation. If the class has been annotated with AfterInject, the method will be invoked after the | |
55 | * injection. | |
56 | * | |
57 | * @param bean The object to inject dependencies into | |
58 | */ | |
59 | void inject(Object bean); | |
60 | ||
61 | /** | |
62 | * Add a beans file. | |
63 | * | |
64 | * @param file The beans file to add. | |
65 | */ | |
66 | void addBeansFile(String file); | |
67 | } |