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