Coverage Report - org.mule.config.spring.editors.EndpointURIPropertyEditor
 
Classes in this File Line Coverage Branch Coverage Complexity
EndpointURIPropertyEditor
0%
0/8
N/A
2
 
 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.api.endpoint.EndpointException;
 11  
 import org.mule.endpoint.MuleEndpointURI;
 12  
 
 13  
 import java.beans.PropertyEditorSupport;
 14  
 
 15  
 /**
 16  
  * Translates a connector name property into the corresponding {@link org.mule.api.transport.Connector}
 17  
  * instance.
 18  
  */
 19  
 public class EndpointURIPropertyEditor extends PropertyEditorSupport
 20  
 {
 21  
     private MuleContext muleContext;
 22  
 
 23  
     public EndpointURIPropertyEditor(MuleContext muleContext)
 24  0
     {
 25  0
         this.muleContext = muleContext;
 26  0
     }
 27  
 
 28  
     public void setAsText(String text)
 29  
     {
 30  
         try
 31  
         {
 32  0
             setValue(new MuleEndpointURI(text, muleContext));
 33  
         }
 34  0
         catch (EndpointException e)
 35  
         {
 36  0
             throw new IllegalArgumentException(e.getMessage());
 37  0
         }
 38  0
     }
 39  
 
 40  
 }