View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.rss.config;
8   
9   import org.mule.config.spring.parsers.specific.FilterDefinitionParser;
10  import org.mule.config.spring.parsers.specific.MessageProcessorDefinitionParser;
11  import org.mule.config.spring.parsers.specific.RouterDefinitionParser;
12  import org.mule.config.spring.parsers.specific.endpoint.TransportEndpointDefinitionParser;
13  import org.mule.module.rss.endpoint.RssInboundEndpointFactoryBean;
14  import org.mule.module.rss.routing.EntryLastUpdatedFilter;
15  import org.mule.module.rss.routing.FeedLastUpdatedFilter;
16  import org.mule.module.rss.routing.FeedSplitter;
17  import org.mule.module.rss.transformers.ObjectToRssFeed;
18  
19  import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
20  
21  public class RssNamespaceHandler extends NamespaceHandlerSupport
22  {
23      public void init()
24      {
25          registerBeanDefinitionParser("inbound-endpoint", new TransportEndpointDefinitionParser("rss", true, RssInboundEndpointFactoryBean.class, new String[]{"lastUpdate", "splitFeed", "acceptedMimeTypes", "pollingFrequency"}, new String[][]{}, new String[][]{}));
26          registerBeanDefinitionParser("feed-splitter", new RouterDefinitionParser(FeedSplitter.class));
27          registerBeanDefinitionParser("entry-last-updated-filter", new FilterDefinitionParser(EntryLastUpdatedFilter.class));
28          registerBeanDefinitionParser("feed-last-updated-filter", new FilterDefinitionParser(FeedLastUpdatedFilter.class));
29          registerBeanDefinitionParser("object-to-feed-transformer", new MessageProcessorDefinitionParser(ObjectToRssFeed.class));
30      }
31  }