| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IBeansManager |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.beans; | |
| 2 | ||
| 3 | import org.springframework.context.ApplicationContext; | |
| 4 | ||
| 5 | /* | |
| 6 | * This file is part of JTheque. | |
| 7 | * | |
| 8 | * JTheque is free software: you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation, either version 3 of the License. | |
| 11 | * | |
| 12 | * JTheque is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 19 | */ | |
| 20 | /** | |
| 21 | * A beans manager. It seems a manager who provide access to injected beans. | |
| 22 | * | |
| 23 | * @author Baptiste Wicht | |
| 24 | */ | |
| 25 | public interface IBeansManager { | |
| 26 | /** | |
| 27 | * Return the bean with a specific name. | |
| 28 | * | |
| 29 | * @param name The name of the bean. | |
| 30 | * @return The bean. | |
| 31 | */ | |
| 32 | <T> T getBean(String name); | |
| 33 | ||
| 34 | /** | |
| 35 | * Inject the dependencies into the object. A dependency is habitually declared with the | |
| 36 | * Resource annotation. | |
| 37 | * | |
| 38 | * @param object The object to inject dependencies into | |
| 39 | */ | |
| 40 | void inject(Object object); | |
| 41 | ||
| 42 | /** | |
| 43 | * Return the application context. | |
| 44 | * | |
| 45 | * @return The application context. | |
| 46 | */ | |
| 47 | ApplicationContext getApplicationContext(); | |
| 48 | } |