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 * @deprecated since 2.14.0, just use ContainerAccessor directly
11 */
12 public interface SpringContainerAccessor extends ContainerAccessor
13 {
14 /**
15 * Retrieves a spring bean from the spring bean factory.
16 *
17 * @param id the id of the spring bean, cannot be null
18 *
19 * @return the spring bean object
20 */
21 Object getBean(String id);
22
23 /**
24 * 'Autowires' a given object - injects all dependencies defined in the constructor.
25 *
26 * @param instance the object instance to autowire
27 * @param strategy the autowire strategy
28 *
29 * @deprecated Since 2.5.0, use the createBean method instead.
30 */
31 @Deprecated
32 void autowireBean(Object instance, AutowireCapablePlugin.AutowireStrategy strategy);
33 }