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.dsl;
8   
9   import org.mule.api.MuleContext;
10  import org.mule.api.model.Model;
11  import org.mule.model.seda.SedaModel;
12  
13  /**
14   * TODO
15   */
16  public class ModelBuilder
17  {
18      private MuleContext muleContext;
19  
20      private Model model;
21  
22      public ModelBuilder(MuleContext muleContext)
23      {
24          this.muleContext = muleContext;
25          model = new SedaModel();
26      }
27  
28      public ServiceBuilder service(String name)
29      {
30          ServiceBuilder builder = new ServiceBuilder(name, muleContext);
31          builder.create().setModel(model);
32          return builder;
33      }
34  }