View Javadoc

1   /*
2    * $Id: RssNamespaceHandler.java 21236 2011-02-10 05:12:40Z dirk.olmes $
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.MessageProcessorDefinitionParser;
14  import org.mule.config.spring.parsers.specific.RouterDefinitionParser;
15  import org.mule.module.rss.routing.EntryLastUpdatedFilter;
16  import org.mule.module.rss.routing.FeedLastUpdatedFilter;
17  import org.mule.module.rss.routing.FeedSplitter;
18  import org.mule.module.rss.transformers.ObjectToRssFeed;
19  
20  import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
21  
22  public class RssNamespaceHandler extends NamespaceHandlerSupport
23  {
24      public void init()
25      {
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  }