Coverage Report - org.mule.module.cxf.support.MuleServiceConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleServiceConfiguration
0%
0/15
0%
0/6
0
 
 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.module.cxf.support;
 8  
 
 9  
 import org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder;
 10  
 
 11  
 import javax.xml.namespace.QName;
 12  
 
 13  
 import org.apache.cxf.service.factory.AbstractServiceConfiguration;
 14  
 
 15  
 /**
 16  
  * This is the {@link AbstractServiceConfiguration ServiceConfiguration} that is
 17  
  * associated to the {@link AbstractInboundMessageProcessorBuilder
 18  
  * InboundMessageProcessorBuilder}, so it can obtain properties directly from it.
 19  
  */
 20  
 public class MuleServiceConfiguration extends AbstractServiceConfiguration
 21  
 {
 22  
     final AbstractInboundMessageProcessorBuilder builder;
 23  
 
 24  
     public MuleServiceConfiguration(AbstractInboundMessageProcessorBuilder builder)
 25  0
     {
 26  0
         this.builder = builder;
 27  0
     }
 28  
 
 29  
     @Override
 30  
     public String getServiceNamespace()
 31  
     {
 32  0
         final String builderNameSpace = builder.getNamespace();
 33  0
         if (builderNameSpace != null)
 34  
         {
 35  0
             return builderNameSpace;
 36  
         }
 37  
         else
 38  
         {
 39  0
             return super.getServiceNamespace();
 40  
         }
 41  
     }
 42  
 
 43  
     @Override
 44  
     public String getServiceName()
 45  
     {
 46  0
         final String builderServiceName = builder.getService();
 47  0
         if (builderServiceName != null)
 48  
         {
 49  0
             return builderServiceName;
 50  
         }
 51  
         else
 52  
         {
 53  0
             return super.getServiceName();
 54  
         }
 55  
     }
 56  
 
 57  
     @Override
 58  
     public QName getEndpointName()
 59  
     {
 60  0
         final String builderPort = builder.getPort();
 61  0
         if (builderPort != null)
 62  
         {
 63  0
             return new QName(getServiceNamespace(), builderPort);
 64  
         }
 65  
         else
 66  
         {
 67  0
             return super.getEndpointName();
 68  
         }
 69  
     }
 70  
 }