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.config.spring.parsers.specific;
8   
9   import org.mule.config.spring.parsers.delegate.InheritDefinitionParser;
10  import org.mule.config.spring.parsers.generic.OrphanDefinitionParser;
11  import org.mule.config.spring.parsers.generic.NamedDefinitionParser;
12  import org.mule.config.spring.parsers.processors.ProvideDefaultName;
13  import org.mule.model.seda.SedaModel;
14  
15  public class ModelDefinitionParser extends InheritDefinitionParser
16  {
17  
18      public ModelDefinitionParser()
19      {
20          super(makeOrphan(), new NamedDefinitionParser());
21      }
22  
23      private static OrphanDefinitionParser makeOrphan()
24      {
25          OrphanDefinitionParser orphan = new OrphanDefinitionParser(SedaModel.class, true);
26          orphan.registerPreProcessor(new ProvideDefaultName("model"));
27          return orphan;
28      }
29  
30  }