1 package com.atlassian.plugin.osgi.spring;
2
3 import com.atlassian.plugin.module.ContainerAccessor;
4 import com.atlassian.plugin.AutowireCapablePlugin;
5
6 /**
7 * Allows to access the spring container and access springs beans.
8 *
9 * @since 2.5.0
10 */
11 public interface SpringContainerAccessor extends ContainerAccessor
12 {
13 /**
14 * Retrieves a spring bean from the spring bean factory.
15 *
16 * @param id the id of the spring bean, cannot be null
17 *
18 * @return the spring bean object
19 */
20 Object getBean(String id);
21
22 /**
23 * 'Autowires' a given object - injects all dependencies defined in the constructor.
24 *
25 * @param instance the object instance to autowire
26 * @param strategy the autowire strategy
27 *
28 * @deprecated Since 2.5.0, use the createBean method instead.
29 */
30 @Deprecated
31 void autowireBean(Object instance, AutowireCapablePlugin.AutowireStrategy strategy);
32 }