Coverage Report - org.kuali.rice.kim.api.type.KimTypeUtils
 
Classes in this File Line Coverage Branch Coverage Complexity
KimTypeUtils
0%
0/5
0%
0/2
2.5
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kim.api.type;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.kuali.rice.kim.api.KimConstants;
 20  
 
 21  
 import javax.xml.namespace.QName;
 22  
 
 23  
 public final class KimTypeUtils {
 24  
 
 25  0
     private KimTypeUtils() {
 26  0
         throw new UnsupportedOperationException("do not call");
 27  
     }
 28  
 
 29  
     /**
 30  
      * Resolves the given kim type service name represented as a String to the appropriate QName.
 31  
      * If the value given is empty or null, then it will resolve to a qname representing the
 32  
      * {@link KimConstants#DEFAULT_KIM_TYPE_SERVICE}.
 33  
      *
 34  
      * @param kimTypeServiceName the name to resolve
 35  
      * @return a qname representing a resolved type service
 36  
      */
 37  
     public static QName resolveKimTypeServiceName(String kimTypeServiceName) {
 38  0
         if (StringUtils.isBlank(kimTypeServiceName)) {
 39  0
             return QName.valueOf(KimConstants.DEFAULT_KIM_TYPE_SERVICE);
 40  
         }
 41  0
         return QName.valueOf(kimTypeServiceName);
 42  
     }
 43  
 }