View Javadoc

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