View Javadoc
1   package com.atlassian.plugin.spring.pluginns;
2   
3   import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
4   
5   /**
6    * Handler for the "plugin" namespace
7    */
8   public class PluginNamespaceHandler extends NamespaceHandlerSupport {
9       /**
10       * Registers the following features:
11       * <ul>
12       * <li>The "available" attribute for beans</li>
13       * <li>The "interface" attribute for beans to declare which interfaces they should be registered against</li>
14       * </ul>
15       */
16      public void init() {
17          super.registerBeanDefinitionDecorator("interface", new PluginInterfaceBeanDefinitionDecorator());
18          super.registerBeanDefinitionDecoratorForAttribute("available", new PluginAvailableBeanDefinitionDecorator());
19          super.registerBeanDefinitionDecoratorForAttribute("contextClassLoader", new PluginContextClassLoaderStrategyBeanDefinitionDecorator());
20          super.registerBeanDefinitionDecoratorForAttribute("trackBundle", new PluginTrackBundleBeanDefinitionDecorator());
21  
22          // Deprecated
23          super.registerBeanDefinitionDecoratorForAttribute("ccls", new PluginContextClassLoaderStrategyBeanDefinitionDecorator());
24      }
25  }