View Javadoc

1   /*
2    * $Id: QueueStoreDefinitionParser.java 22174 2011-06-14 08:01:42Z 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  
11  package org.mule.config.spring.parsers.specific;
12  
13  import org.mule.config.spring.parsers.delegate.ParentContextDefinitionParser;
14  import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
15  import org.mule.config.spring.parsers.generic.MuleOrphanDefinitionParser;
16  
17  /**
18   * This allows a queue store to be defined globally, or embedded within a queue profile.
19   */
20  public class QueueStoreDefinitionParser extends ParentContextDefinitionParser
21  {
22      public QueueStoreDefinitionParser(Class<?> queueStoreFactoryBeanClass)
23      {
24          super(MuleOrphanDefinitionParser.ROOT_ELEMENT, 
25              new MuleOrphanDefinitionParser(queueStoreFactoryBeanClass, true));
26          otherwise(new ChildDefinitionParser("queue-store", queueStoreFactoryBeanClass));
27      }
28  
29      /**
30       * For custom processors
31       */
32      public QueueStoreDefinitionParser()
33      {
34          super(MuleOrphanDefinitionParser.ROOT_ELEMENT, new MuleOrphanDefinitionParser(true));
35          otherwise(new ChildDefinitionParser("queue-store"));
36      }
37  }