1 /** 2 * Copyright 2005-2014 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 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 @Deprecated 42 public class KualiUserControlDefinition extends ControlDefinitionBase { 43 private static final long serialVersionUID = 4749994521411547705L; 44 45 protected String universalIdAttributeName; 46 protected String userIdAttributeName; 47 protected String personNameAttributeName; 48 49 public KualiUserControlDefinition() { 50 } 51 52 /** 53 * 54 * @see org.kuali.rice.krad.datadictionary.control.ControlDefinition#isKualiUser() 55 */ 56 public boolean isKualiUser() { 57 return true; 58 } 59 60 /** 61 * 62 * @see java.lang.Object#toString() 63 */ 64 public String toString() { 65 return "KualiUserControlDefinition"; 66 } 67 68 /** 69 * Gets the personNameAttributeName attribute. 70 * 71 * @return Returns the personNameAttributeName. 72 */ 73 public String getPersonNameAttributeName() { 74 return personNameAttributeName; 75 } 76 77 /** 78 * personNameAttributeName - 79 attribute that provides the User Name - e.g. JONES,JOHN P 80 */ 81 public void setPersonNameAttributeName(String personNameAttributeName) { 82 if (StringUtils.isBlank(personNameAttributeName)) { 83 throw new IllegalArgumentException("invalid (blank) personNameAttributeName"); 84 } 85 this.personNameAttributeName = personNameAttributeName; 86 } 87 88 /** 89 * Gets the universalIdAttributeName attribute. 90 * 91 * @return Returns the universalIdAttributeName. 92 */ 93 public String getUniversalIdAttributeName() { 94 return universalIdAttributeName; 95 } 96 97 /** 98 * universalIdAttributeName - 99 attribute that provides the Universal User Id - e.g. 3583663872 100 */ 101 public void setUniversalIdAttributeName(String universalIdAttributeName) { 102 if (StringUtils.isBlank(universalIdAttributeName)) { 103 throw new IllegalArgumentException("invalid (blank) universalIdAttributeName"); 104 } 105 this.universalIdAttributeName = universalIdAttributeName; 106 } 107 108 /** 109 * Gets the userIdAttributeName attribute. 110 * 111 * @return Returns the userIdAttributeName. 112 */ 113 public String getUserIdAttributeName() { 114 return userIdAttributeName; 115 } 116 117 /** 118 * userIdAttributeName - 119 attribute that provides the User Id - e.g. JPJONES 120 */ 121 public void setUserIdAttributeName(String userIdAttributeName) { 122 if (StringUtils.isBlank(userIdAttributeName)) { 123 throw new IllegalArgumentException("invalid (blank) userIdAttributeName"); 124 } 125 this.userIdAttributeName = userIdAttributeName; 126 } 127 128 }