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",
21 new PluginAvailableBeanDefinitionDecorator());
22 }
23 }