Coverage Report - org.kuali.rice.kns.datadictionary.control.ApcSelectControlDefinition
 
Classes in this File Line Coverage Branch Coverage Complexity
ApcSelectControlDefinition
0%
0/19
0%
0/6
1.75
 
 1  
 /*
 2  
  * Copyright 2006-2007 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.kns.datadictionary.control;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.kuali.rice.kns.lookup.keyvalues.ApcValuesFinder;
 20  
 
 21  
 /**
 22  
     The apcSelect element will render an HTML select control.
 23  
     The values for the select control are obtained from
 24  
     parameter table in the database.
 25  
     
 26  
     paramNamespace, parameterDetailType, and parameterName uniquely identify the parameter from which the select's
 27  
         values will be derived
 28  
  */
 29  
 public class ApcSelectControlDefinition extends SelectControlDefinition {
 30  
     private static final long serialVersionUID = 7068651175290924411L;
 31  
     
 32  
         protected String parameterNamespace;
 33  
     protected String parameterDetailType;
 34  
     protected String parameterName;
 35  
 
 36  
     public ApcSelectControlDefinition() {
 37  0
         super();
 38  0
         setValuesFinderClass(ApcValuesFinder.class.getName());
 39  0
     }
 40  
 
 41  
     public String getParameterNamespace() {
 42  0
         return parameterNamespace;
 43  
     }
 44  
 
 45  
     /**
 46  
      * Used by the ApcSelectControlDefinition to pull the needed parameter from the ParameterService.
 47  
      */
 48  
     public void setParameterNamespace(String parameterNamespace) {
 49  0
         if (StringUtils.isBlank(parameterNamespace)) {
 50  0
             throw new IllegalArgumentException("invalid (blank) parameterNamespace in <apcSelect>");
 51  
         }
 52  0
         this.parameterNamespace = parameterNamespace;
 53  0
     }
 54  
 
 55  
     public String getParameterName() {
 56  0
         return parameterName;
 57  
     }
 58  
 
 59  
     /**
 60  
      * Used by the ApcSelectControlDefinition to pull the needed parameter from the ParameterService.
 61  
      */
 62  
     public void setParameterName(String parameterName) {
 63  0
         if (StringUtils.isBlank(parameterName)) {
 64  0
             throw new IllegalArgumentException("invalid (blank) parameterName in <apcSelect>");
 65  
         }
 66  0
         this.parameterName = parameterName;
 67  0
     }
 68  
 
 69  
     public boolean isApcSelect() {
 70  0
         return true;
 71  
     }
 72  
 
 73  
         public String getParameterDetailType() {
 74  0
                 return this.parameterDetailType;
 75  
         }
 76  
 
 77  
     /**
 78  
      * Used by the ApcSelectControlDefinition to pull the needed parameter from the ParameterService.
 79  
      */
 80  
         public void setParameterDetailType(String parameterDetailType) {
 81  0
         if (StringUtils.isBlank(parameterDetailType)) {
 82  0
             throw new IllegalArgumentException("invalid (blank) parameterDetailType in <apcSelect>");
 83  
         }
 84  0
                 this.parameterDetailType = parameterDetailType;
 85  0
         }
 86  
 
 87  
 }