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.editors;
8   
9   import org.mule.api.MuleContext;
10  import org.mule.endpoint.URIBuilder;
11  
12  import java.beans.PropertyEditorSupport;
13  
14  /**
15   * Translates a connector name property into the corresponding {@link org.mule.api.transport.Connector}
16   * instance.
17   */
18  public class URIBuilderPropertyEditor extends PropertyEditorSupport
19  {
20      private MuleContext muleContext;
21  
22      public URIBuilderPropertyEditor(MuleContext muleContext)
23      {
24          this.muleContext = muleContext;
25      }
26  
27      public void setAsText(String text)
28      {
29          setValue(new URIBuilder(text, muleContext));
30      }
31  
32  }