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      /**
11       * Registers the following features:
12       * <ul>
13       * <li>The "available" attribute for beans</li>
14       * <li>The "interface" attribute for beans to declare which interfaces they should be registered against</li>
15       * </ul>
16       */
17      public void init()
18      {
19          super.registerBeanDefinitionDecorator("interface", new PluginInterfaceBeanDefinitionDecorator());
20          super.registerBeanDefinitionDecoratorForAttribute("available", new PluginAvailableBeanDefinitionDecorator());
21          super.registerBeanDefinitionDecoratorForAttribute("contextClassLoader", new PluginContextClassLoaderStrategyBeanDefinitionDecorator());
22  
23          // Deprecated
24          super.registerBeanDefinitionDecoratorForAttribute("ccls", new PluginContextClassLoaderStrategyBeanDefinitionDecorator());
25      }
26  }