*/
public class InterceptHandlerParser extends AbstractBeanDefinitionParser {
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("com/tacitknowledge/flip/spring/context.xml"));
BeanDefinitionBuilder beanBuilder = BeanDefinitionBuilder.rootBeanDefinition(FlipSpringAspect.class);
String defaultUrlValue = element.getAttribute("default-url");
MutablePropertyValues propertyValues = new MutablePropertyValues();
propertyValues.addPropertyValue("defaultValue", defaultUrlValue);
propertyValues.addPropertyValue(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME, new RuntimeBeanReference(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME));
beanBuilder.getRawBeanDefinition().setPropertyValues(propertyValues);
for(String name : factory.getBeanDefinitionNames()) {
parserContext.getRegistry().registerBeanDefinition(name, factory.getBeanDefinition(name));
}
parserContext.getRegistry().registerBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME, beanBuilder.getBeanDefinition());
return null;
}