Coverage Report - org.kuali.student.contract.model.util.ServicesFilterExcludeDev
 
Classes in this File Line Coverage Branch Coverage Complexity
ServicesFilterExcludeDev
0%
0/10
0%
0/6
3
 
 1  
 /*
 2  
  * Copyright 2010 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.osedu.org/licenses/ECL-2.0
 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.student.contract.model.util;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.kuali.student.contract.model.Service;
 22  
 
 23  
 /**
 24  
  *
 25  
  * @author nwright
 26  
  */
 27  0
 public class ServicesFilterExcludeDev implements ServicesFilter
 28  
 {
 29  
 
 30  
  @Override
 31  
  public List<Service> filter (List<Service> services)
 32  
  {
 33  0
   List<Service> list = new ArrayList ();
 34  0
   for (Service target : services)
 35  
   {
 36  0
    if (shouldInclude (target.getVersion ()))
 37  
    {
 38  0
     list.add (target);
 39  0
     continue;
 40  
    }
 41  
   }
 42  0
   return list;
 43  
  }
 44  
 
 45  
  protected boolean shouldInclude (String version)
 46  
  {
 47  0
   if (version.equalsIgnoreCase ("dev"))
 48  
   {
 49  0
    return false;
 50  
   }
 51  0
   return true;
 52  
  }
 53  
 
 54  
 }