1
|
package eu.dnetlib.springutils.condbean;
|
2
|
|
3
|
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
4
|
|
5
|
/**
|
6
|
* register conditional bean parsers for the condbean namespace and schema.
|
7
|
*
|
8
|
* @author marko
|
9
|
*
|
10
|
*/
|
11
|
public class ConditionalBeanNamespaceHandler extends NamespaceHandlerSupport {
|
12
|
/**
|
13
|
* {@inheritDoc}
|
14
|
* @see org.springframework.beans.factory.xml.NamespaceHandler#init()
|
15
|
*/
|
16
|
@Override
|
17
|
public void init() {
|
18
|
super.registerBeanDefinitionDecoratorForAttribute("ifdefined", new ConditionalBeanAttributeDecorator());
|
19
|
|
20
|
super.registerBeanDefinitionParser("cond", new ConditionalBeanDefinitionParser());
|
21
|
}
|
22
|
}
|