View Javadoc

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