Coverage Report - org.kuali.rice.kim.document.rule.ActiveRoleMemberHelper
 
Classes in this File Line Coverage Branch Coverage Complexity
ActiveRoleMemberHelper
0%
0/12
0%
0/8
3
 
 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.document.rule;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.apache.log4j.Logger;
 22  
 import org.kuali.rice.kim.bo.ui.KimDocumentRoleMember;
 23  
 import org.kuali.rice.kim.bo.ui.RoleDocumentDelegationMember;
 24  
 
 25  
 /**
 26  
  * KULRICE-4153: This class is used to receive a set of Role Members and return a set of active Role Members. 
 27  
  * 
 28  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 29  
  *
 30  
  */
 31  0
 public class ActiveRoleMemberHelper {
 32  0
         private static final Logger LOG = Logger.getLogger(ActiveRoleMemberHelper.class);
 33  
 
 34  
         public List<KimDocumentRoleMember> getActiveRoleMembers (List<KimDocumentRoleMember> roleMembers){
 35  0
                 List<KimDocumentRoleMember> activeRoleMembers = new ArrayList<KimDocumentRoleMember>();
 36  0
                 for (KimDocumentRoleMember roleMember : roleMembers)
 37  
                 {
 38  0
                         if (roleMember.isActive())
 39  
                         {
 40  0
                                 activeRoleMembers.add(roleMember);
 41  
                         }
 42  
                 }                
 43  0
                 return activeRoleMembers;                
 44  
         }
 45  
             
 46  
     public List<RoleDocumentDelegationMember> getActiveDelegationRoleMembers(List<RoleDocumentDelegationMember> roleMembers) {
 47  0
         List<RoleDocumentDelegationMember> activeRoleMembers = new ArrayList<RoleDocumentDelegationMember>();
 48  0
         for (RoleDocumentDelegationMember roleMember : roleMembers) {
 49  0
             if (roleMember.isActive()) {
 50  0
                 activeRoleMembers.add(roleMember);
 51  
             }
 52  
         }
 53  0
         return activeRoleMembers;
 54  
     }
 55  
 }