Coverage Report - org.kuali.rice.kim.bo.options.NameSuffixValuesFinder
 
Classes in this File Line Coverage Branch Coverage Complexity
NameSuffixValuesFinder
0%
0/8
0%
0/2
2
 
 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.bo.options;
 17  
 
 18  
 import org.kuali.rice.core.api.util.ConcreteKeyValue;
 19  
 import org.kuali.rice.core.api.util.KeyValue;
 20  
 import org.kuali.rice.core.framework.services.CoreFrameworkServiceLocator;
 21  
 import org.kuali.rice.kim.api.KimConstants;
 22  
 import org.kuali.rice.kim.bo.ui.PersonDocumentName;
 23  
 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
 24  
 
 25  
 import java.util.ArrayList;
 26  
 import java.util.Collection;
 27  
 import java.util.List;
 28  
 
 29  
 /**
 30  
  * This is a description of what this class does - shyu don't forget to fill this in. 
 31  
  * 
 32  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 33  
  *
 34  
  */
 35  0
 public class NameSuffixValuesFinder extends KeyValuesBase {
 36  
 
 37  0
         private static final String PARAM_BO_CLASSNAME = PersonDocumentName.class.getSimpleName();
 38  
         
 39  
     /*
 40  
      * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
 41  
      */
 42  
     @Override
 43  
         public List<KeyValue> getKeyValues() {
 44  
 
 45  0
             Collection<String> values = CoreFrameworkServiceLocator.getParameterService().getParameterValuesAsString(
 46  
                 KimConstants.NAMESPACE_CODE, PARAM_BO_CLASSNAME, "SUFFIXES"
 47  
         );
 48  0
         List<KeyValue> labels = new ArrayList<KeyValue>();
 49  0
         labels.add(new ConcreteKeyValue("", ""));
 50  0
         for (String suffix : values) {
 51  0
             labels.add(new ConcreteKeyValue(suffix, suffix));            
 52  
         }
 53  
 
 54  0
         return labels;
 55  
     }
 56  
 
 57  
 
 58  
 }