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