View Javadoc

1   package com.atlassian.plugin.spring;
2   
3   import com.atlassian.plugin.osgi.hostcomponents.ContextClassLoaderStrategy;
4   
5   import java.lang.annotation.Target;
6   import java.lang.annotation.ElementType;
7   import java.lang.annotation.Retention;
8   import java.lang.annotation.RetentionPolicy;
9   
10  /**
11   * Annotation for Spring beans which are made available to OSGi plugin components
12   *
13   * If a Class is specified, then the bean is exposed only as that class -- otherwise it is exposed as all interfaces it implements.
14   */
15  @Target(ElementType.TYPE)
16  @Retention(RetentionPolicy.RUNTIME)
17  public @interface AvailableToPlugins
18  {
19      /**
20       * @return The interface the bean is exposed as
21       */
22      Class value() default Void.class;
23  
24      /**
25       * @return The context class loader strategy to use when determine which CCL should be set when host component methods are invoked
26       */
27      ContextClassLoaderStrategy contextClassLoaderStrategy() default ContextClassLoaderStrategy.USE_HOST;
28  }