| java.lang.Object org.kuali.kfs.context.SpringContext
All known Subclasses: org.kuali.module.labor.util.LaborSpringContext,
SpringContext | public class SpringContext (Code) | | |
close | protected static void close()(Code) | | |
getBean | public static T getBean(Class<T> type)(Code) | | Use this method to retrieve a spring bean when one of the following is the case. Pass in the type of the service interface,
NOT the service implementation. 1. there is only one bean of the specified type in our spring context 2. there is only one
bean of the specified type in our spring context, but you want the one whose bean id is the same as type.getSimpleName() with
the exception of the first letter being lower case in the former and upper case in the latter, For example, there are two
beans of type DateTimeService in our context – dateTimeService and testDateTimeService. To retrieve the former, you should
specific DateTimeService.class as the type. To retrieve the latter, you should specify ConfigurableDateService.class as the
type. Unless you are writing a unit test and need to down cast to an implementation, you do not need to cast the result of
this method.
< Parameters: T - > Parameters: type - an object that has been defined as a bean in our spring context and is of the specified type |
getBeansOfType | public static Map<String, T> getBeansOfType(Class<T> type)(Code) | | Use this method to retrieve all beans of a give type in our spring context. Pass in the type of the service interface, NOT
the service implementation.
< Parameters: T - > Parameters: type - a map of the spring bean ids / beans that are of the specified type |
initializeApplicationContext | protected static void initializeApplicationContext()(Code) | | |
initializePluginApplicationContext | protected static void initializePluginApplicationContext()(Code) | | |
initializeTestApplicationContext | protected static void initializeTestApplicationContext()(Code) | | |
|
|