Coverage Report - org.kuali.rice.krad.datadictionary.control.KualiUserControlDefinition
 
Classes in this File Line Coverage Branch Coverage Complexity
KualiUserControlDefinition
0%
0/19
0%
0/6
1.667
 
 1  
 /*
 2  
  * Copyright 2006-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.krad.datadictionary.control;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 
 20  
 /**
 21  
                         The kualiUser element defines a control that identifies
 22  
                         a Kuali user. As an example, consider a person with the
 23  
                         following:
 24  
                             * User ID = JPJONES
 25  
                             * Universal User ID = 3583663872
 26  
                             * Employee ID = 0000123456
 27  
                             * Name = JONES,JOHN p
 28  
                         This control defines a field in which the user can enter the User Id or choose a
 29  
                         user using the magnifying glass lookup.  After a user is selected, user name
 30  
                         will be displayed under the User ID.
 31  
 
 32  
                         When using this control, the names of other attributes must be specified
 33  
                         to allow the control to function:
 34  
                             * universalIdAttributeName  -
 35  
                                 attribute that provides the Universal User Id - e.g. 3583663872
 36  
                             * userIdAttributeName -
 37  
                                 attribute that provides the User Id - e.g. JPJONES
 38  
                             * personNameAttributeName -
 39  
                                 attribute that provides the User Name - e.g. JONES,JOHN P
 40  
  */
 41  
 public class KualiUserControlDefinition extends ControlDefinitionBase {
 42  
     private static final long serialVersionUID = 4749994521411547705L;
 43  
     
 44  
         protected String universalIdAttributeName;
 45  
     protected String userIdAttributeName;
 46  
     protected String personNameAttributeName;
 47  
 
 48  0
     public KualiUserControlDefinition() {
 49  0
     }
 50  
 
 51  
     /**
 52  
      * 
 53  
      * @see org.kuali.rice.krad.datadictionary.control.ControlDefinition#isKualiUser()
 54  
      */
 55  
     public boolean isKualiUser() {
 56  0
         return true;
 57  
     }
 58  
 
 59  
     /**
 60  
      * 
 61  
      * @see java.lang.Object#toString()
 62  
      */
 63  
     public String toString() {
 64  0
         return "KualiUserControlDefinition";
 65  
     }
 66  
 
 67  
     /**
 68  
      * Gets the personNameAttributeName attribute.
 69  
      * 
 70  
      * @return Returns the personNameAttributeName.
 71  
      */
 72  
     public String getPersonNameAttributeName() {
 73  0
         return personNameAttributeName;
 74  
     }
 75  
 
 76  
     /**
 77  
      * personNameAttributeName -
 78  
                                 attribute that provides the User Name - e.g. JONES,JOHN P
 79  
      */
 80  
     public void setPersonNameAttributeName(String personNameAttributeName) {
 81  0
         if (StringUtils.isBlank(personNameAttributeName)) {
 82  0
             throw new IllegalArgumentException("invalid (blank) personNameAttributeName");
 83  
         }
 84  0
         this.personNameAttributeName = personNameAttributeName;
 85  0
     }
 86  
 
 87  
     /**
 88  
      * Gets the universalIdAttributeName attribute.
 89  
      * 
 90  
      * @return Returns the universalIdAttributeName.
 91  
      */
 92  
     public String getUniversalIdAttributeName() {
 93  0
         return universalIdAttributeName;
 94  
     }
 95  
 
 96  
     /**
 97  
      * universalIdAttributeName  -
 98  
                                 attribute that provides the Universal User Id - e.g. 3583663872
 99  
      */
 100  
     public void setUniversalIdAttributeName(String universalIdAttributeName) {
 101  0
         if (StringUtils.isBlank(universalIdAttributeName)) {
 102  0
             throw new IllegalArgumentException("invalid (blank) universalIdAttributeName");
 103  
         }
 104  0
         this.universalIdAttributeName = universalIdAttributeName;
 105  0
     }
 106  
 
 107  
     /**
 108  
      * Gets the userIdAttributeName attribute.
 109  
      * 
 110  
      * @return Returns the userIdAttributeName.
 111  
      */
 112  
     public String getUserIdAttributeName() {
 113  0
         return userIdAttributeName;
 114  
     }
 115  
 
 116  
     /**
 117  
      * userIdAttributeName -
 118  
                                 attribute that provides the User Id - e.g. JPJONES
 119  
      */
 120  
     public void setUserIdAttributeName(String userIdAttributeName) {
 121  0
         if (StringUtils.isBlank(userIdAttributeName)) {
 122  0
             throw new IllegalArgumentException("invalid (blank) userIdAttributeName");
 123  
         }
 124  0
         this.userIdAttributeName = userIdAttributeName;
 125  0
     }
 126  
 
 127  
 }