Coverage Report - org.kuali.rice.kns.lookup.keyvalues.ApcValuesFinder
 
Classes in this File Line Coverage Branch Coverage Complexity
ApcValuesFinder
0%
0/22
0%
0/2
1.111
 
 1  
 /*
 2  
  * Copyright 2006-2008 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
 5  
  * compliance with the License. You may obtain a copy of the License at
 6  
  * 
 7  
  * http://www.opensource.org/licenses/ecl2.php
 8  
  * 
 9  
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
 10  
  * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 11  
  * language governing permissions and limitations under the License.
 12  
  */
 13  
 package org.kuali.rice.kns.lookup.keyvalues;
 14  
 
 15  
 import java.util.ArrayList;
 16  
 import java.util.List;
 17  
 
 18  
 import org.kuali.rice.core.util.KeyLabelPair;
 19  
 import org.kuali.rice.kns.service.KNSServiceLocator;
 20  
 import org.kuali.rice.kns.service.ParameterService;
 21  
 
 22  
 public class ApcValuesFinder extends KeyValuesBase {
 23  
 
 24  
     private String parameterName;
 25  
     private String parameterDetailType;
 26  
     private String parameterNamespace;
 27  
 
 28  
     public String getParameterNamespace() {
 29  0
         return this.parameterNamespace;
 30  
     }
 31  
 
 32  
     public void setParameterNamespace(String parameterNamespace) {
 33  0
         this.parameterNamespace = parameterNamespace;
 34  0
     }
 35  
 
 36  
     public ApcValuesFinder() {
 37  0
         super();
 38  0
     }
 39  
 
 40  
     public ApcValuesFinder(String parameterNamesapce, String parameterDetailType, String parameterName) {
 41  0
             super();
 42  0
             this.parameterNamespace = parameterNamespace;
 43  0
             this.parameterDetailType = parameterDetailType;
 44  0
             this.parameterName = parameterName;
 45  0
     }
 46  
 
 47  
     public String getParameterName() {
 48  0
         return parameterName;
 49  
     }
 50  
 
 51  
     public void setParameterName(String parameterName) {
 52  0
         this.parameterName = parameterName;
 53  0
     }
 54  
 
 55  
     public List getKeyValues() {
 56  0
             ParameterService parameterService = KNSServiceLocator.getParameterService();
 57  0
             List<KeyLabelPair> activeLabels = new ArrayList<KeyLabelPair>();
 58  0
             activeLabels.add(new KeyLabelPair("", ""));
 59  0
             for (String parm : parameterService.getParameterValues(parameterNamespace, parameterDetailType, parameterName)) {
 60  0
                 activeLabels.add(new KeyLabelPair(parm, parm));
 61  
             }
 62  0
             return activeLabels;
 63  
     }
 64  
 
 65  
     public String getParameterDetailType() {
 66  0
         return this.parameterDetailType;
 67  
     }
 68  
 
 69  
     public void setParameterDetailType(String parameterDetailType) {
 70  0
         this.parameterDetailType = parameterDetailType;
 71  0
     }
 72  
 
 73  
 }