Coverage Report - org.kuali.rice.krms.impl.repository.TermResolverParameterSpecificationBo
 
Classes in this File Line Coverage Branch Coverage Complexity
TermResolverParameterSpecificationBo
0%
0/8
0%
0/10
0
 
 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.krms.impl.repository
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 
 20  
 
 21  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 22  
 
 23  
 import org.kuali.rice.krms.api.repository.term.TermResolverDefinition;
 24  
 
 25  
 
 26  
 public class TermResolverParameterSpecificationBo extends PersistableBusinessObjectBase {
 27  
 
 28  
         def String id
 29  
         def String termResolverId
 30  
         def String name
 31  
                 
 32  
         /**
 33  
         * Converts a mutable bo to it's immutable counterpart
 34  
         * @param bo the mutable business object
 35  
         * @return the immutable object
 36  
         */
 37  
    static String to(TermResolverParameterSpecificationBo bo) {
 38  0
            if (bo == null) { return null }
 39  0
            return bo.name;
 40  
    }
 41  
 
 42  
    /**
 43  
         * Converts a immutable object to it's mutable bo counterpart
 44  
         * @param im immutable object
 45  
         * @return the mutable bo
 46  
         */
 47  
    static TermResolverParameterSpecificationBo from(TermResolverDefinition resolver, String name) {
 48  0
            if (resolver == null) { return null }
 49  0
            if (StringUtils.isBlank(name)) { return null }
 50  
 
 51  0
            TermResolverParameterSpecificationBo bo = new TermResolverParameterSpecificationBo()
 52  0
            bo.termResolverId = resolver.id;
 53  0
            bo.name = name;
 54  
 
 55  0
            return bo
 56  
    }
 57  
  
 58  
 }