Coverage Report - org.kuali.rice.kew.impl.peopleflow.PeopleFlowAttributeBo
 
Classes in this File Line Coverage Branch Coverage Complexity
PeopleFlowAttributeBo
0%
0/13
0%
0/4
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.kew.impl.peopleflow
 17  
 
 18  
 import org.kuali.rice.kew.impl.type.KewAttributeDefinitionBo
 19  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 20  
 import org.kuali.rice.kew.api.repository.type.KewTypeAttribute
 21  
 import org.kuali.rice.kew.api.repository.type.KewAttributeDefinition
 22  
 
 23  
 class PeopleFlowAttributeBo extends PersistableBusinessObjectBase {
 24  
 
 25  
     String id
 26  
         String attributeDefinitionId
 27  
         String value
 28  
     String peopleFlowId
 29  
 
 30  
         def KewAttributeDefinitionBo attributeDefinition
 31  
 
 32  
     public void setAttributeDefinition(KewAttributeDefinitionBo attrDef) {
 33  0
         if (attrDef != null) {
 34  0
             this.attributeDefinitionId = attrDef.getId();
 35  
         } else {
 36  0
             this.attributeDefinitionId = null;
 37  
         }
 38  0
         this.attributeDefinition = attrDef;
 39  
     }
 40  
 
 41  
     public static PeopleFlowAttributeBo from(KewAttributeDefinition attributeDefinition, String id, String peopleFlowId, String value) {
 42  0
         if (attributeDefinition == null) {
 43  0
             return null;
 44  
         }
 45  0
         PeopleFlowAttributeBo peopleFlowAttributeBo = new PeopleFlowAttributeBo();
 46  0
         peopleFlowAttributeBo.setId(id);
 47  0
         peopleFlowAttributeBo.setPeopleFlowId(peopleFlowId);
 48  0
         peopleFlowAttributeBo.setValue(value);
 49  0
         peopleFlowAttributeBo.setAttributeDefinition(KewAttributeDefinitionBo.from(attributeDefinition));
 50  0
         peopleFlowAttributeBo.setAttributeDefinitionId(attributeDefinition.getId());
 51  0
         return peopleFlowAttributeBo;
 52  
     }
 53  
     
 54  
 }