Coverage Report - org.kuali.rice.kim.service.support.impl.KimResponsibilityTypeServiceBase
 
Classes in this File Line Coverage Branch Coverage Complexity
KimResponsibilityTypeServiceBase
0%
0/9
0%
0/4
2
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.service.support.impl;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.kuali.rice.kim.bo.role.dto.KimResponsibilityInfo;
 22  
 import org.kuali.rice.kim.bo.types.dto.AttributeSet;
 23  
 import org.kuali.rice.kim.service.support.KimResponsibilityTypeService;
 24  
 
 25  
 /**
 26  
  * This is a description of what this class does - ewestfal don't forget to fill this in. 
 27  
  * 
 28  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 29  
  *
 30  
  */
 31  0
 public class KimResponsibilityTypeServiceBase extends KimTypeServiceBase
 32  
                 implements KimResponsibilityTypeService {
 33  
 
 34  
         /**
 35  
          * @see org.kuali.rice.kim.service.support.KimResponsibilityTypeService#getMatchingResponsibilities(AttributeSet, List)
 36  
          */
 37  
         public final List<KimResponsibilityInfo> getMatchingResponsibilities( AttributeSet requestedDetails, List<KimResponsibilityInfo> responsibilitiesList ) {
 38  0
                 requestedDetails = translateInputAttributeSet(requestedDetails);
 39  0
                 validateRequiredAttributesAgainstReceived(requestedDetails);
 40  0
                 return performResponsibilityMatches(requestedDetails, responsibilitiesList);
 41  
         }
 42  
 
 43  
         /**
 44  
          * Internal method for matching Responsibilities.  Override this method to customize the matching behavior.
 45  
          * 
 46  
          * This base implementation uses the {@link #performMatch(AttributeSet, AttributeSet)} method
 47  
          * to perform an exact match on the Responsibility details and return all that are equal.
 48  
          */
 49  
         protected List<KimResponsibilityInfo> performResponsibilityMatches(AttributeSet requestedDetails, List<KimResponsibilityInfo> responsibilitiesList) {
 50  0
                 List<KimResponsibilityInfo> matchingResponsibilities = new ArrayList<KimResponsibilityInfo>();
 51  0
                 for (KimResponsibilityInfo Responsibility : responsibilitiesList) {
 52  0
                         if ( performMatch(requestedDetails, Responsibility.getDetails()) ) {
 53  0
                                 matchingResponsibilities.add( Responsibility );
 54  
                         }
 55  
                 }
 56  0
                 return matchingResponsibilities;
 57  
         }
 58  
 }