Coverage Report - org.mule.endpoint.EndpointURIEndpointBuilder
 
Classes in this File Line Coverage Branch Coverage Complexity
EndpointURIEndpointBuilder
13%
6/45
0%
0/4
1
 
 1  
 /*
 2  
  * $Id: EndpointURIEndpointBuilder.java 12269 2008-07-10 04:19:03Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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  
 
 11  
 package org.mule.endpoint;
 12  
 
 13  
 import org.mule.api.MuleContext;
 14  
 import org.mule.api.endpoint.EndpointException;
 15  
 import org.mule.api.endpoint.EndpointURI;
 16  
 import org.mule.api.endpoint.ImmutableEndpoint;
 17  
 
 18  
 public class EndpointURIEndpointBuilder extends AbstractEndpointBuilder
 19  
 {
 20  
 
 21  
     public EndpointURIEndpointBuilder()
 22  0
     {
 23  
         // blank
 24  0
     }
 25  
 
 26  
     /**
 27  
      * Called from Spring
 28  
      * 
 29  
      * @param global The global endpoint "template"
 30  
      * @throws EndpointException
 31  
      */
 32  
     public EndpointURIEndpointBuilder(EndpointURIEndpointBuilder global) throws EndpointException
 33  0
     {
 34  
         // can't (concisely) use setters where null is a possibility
 35  
         // for consistency, set directly on all fields (this also avoids logic in
 36  
         // getters)
 37  0
         uriBuilder = global.uriBuilder;
 38  0
         connector = global.connector;
 39  0
         transformers = global.transformers;
 40  0
         responseTransformers = global.responseTransformers;
 41  0
         name = global.name; // this seems a bit odd, but is tested for in the big
 42  
                             // spring config test case
 43  0
         properties = global.properties;
 44  0
         transactionConfig = global.transactionConfig;
 45  0
         filter = global.filter;
 46  0
         deleteUnacceptedMessages = global.deleteUnacceptedMessages;
 47  0
         securityFilter = global.securityFilter;
 48  0
         synchronous = global.synchronous;
 49  0
         remoteSync = global.remoteSync;
 50  0
         remoteSyncTimeout = global.remoteSyncTimeout;
 51  0
         encoding = global.encoding;
 52  0
         connectionStrategy = global.connectionStrategy;
 53  0
     }
 54  
 
 55  
     public EndpointURIEndpointBuilder(URIBuilder URIBuilder, MuleContext muleContext)
 56  486
     {
 57  486
         this.muleContext = muleContext;
 58  486
         this.uriBuilder = URIBuilder;
 59  486
     }
 60  
 
 61  
     /**
 62  
      * @deprecated
 63  
      */
 64  
     public EndpointURIEndpointBuilder(String address, MuleContext muleContext)
 65  
     {
 66  486
         this(new URIBuilder(address), muleContext);
 67  486
     }
 68  
 
 69  
     /**
 70  
      * @deprecated
 71  
      */
 72  
     public EndpointURIEndpointBuilder(EndpointURI endpointURI, MuleContext muleContext)
 73  
     {
 74  0
         this(new URIBuilder(endpointURI), muleContext);
 75  0
     }
 76  
 
 77  
     public EndpointURIEndpointBuilder(ImmutableEndpoint source, MuleContext muleContext)
 78  
     {
 79  0
         this(source.getEndpointURI(), muleContext);
 80  0
         setName(source.getName());
 81  0
         setEncoding(source.getEncoding());
 82  0
         setConnector(source.getConnector());
 83  0
         setTransformers(source.getTransformers().isEmpty() ? null : source.getTransformers());
 84  0
         setResponseTransformers(source.getResponseTransformers().isEmpty() ? null : source.getResponseTransformers());
 85  0
         setProperties(source.getProperties());
 86  0
         setTransactionConfig(source.getTransactionConfig());
 87  0
         setDeleteUnacceptedMessages(source.isDeleteUnacceptedMessages());
 88  0
         setInitialState(source.getInitialState());
 89  0
         setRemoteSyncTimeout(source.getRemoteSyncTimeout());
 90  0
         setRemoteSync(source.isRemoteSync());
 91  0
         setFilter(source.getFilter());
 92  0
         setSecurityFilter(source.getSecurityFilter());
 93  0
         setConnectionStrategy(source.getConnectionStrategy());
 94  0
         setSynchronous(source.isSynchronous());
 95  0
         setMuleContext(source.getMuleContext());
 96  0
     }
 97  
 
 98  
 }