001 /**
002 * Copyright 2005-2015 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kns.datadictionary.control;
017
018 import org.apache.commons.lang.StringUtils;
019
020 /**
021 The kualiUser element defines a control that identifies
022 a Kuali user. As an example, consider a person with the
023 following:
024 * User ID = JPJONES
025 * Universal User ID = 3583663872
026 * Employee ID = 0000123456
027 * Name = JONES,JOHN p
028 This control defines a field in which the user can enter the User Id or choose a
029 user using the magnifying glass lookup. After a user is selected, user name
030 will be displayed under the User ID.
031
032 When using this control, the names of other attributes must be specified
033 to allow the control to function:
034 * universalIdAttributeName -
035 attribute that provides the Universal User Id - e.g. 3583663872
036 * userIdAttributeName -
037 attribute that provides the User Id - e.g. JPJONES
038 * personNameAttributeName -
039 attribute that provides the User Name - e.g. JONES,JOHN P
040 */
041 @Deprecated
042 public class KualiUserControlDefinition extends ControlDefinitionBase {
043 private static final long serialVersionUID = 4749994521411547705L;
044
045 protected String universalIdAttributeName;
046 protected String userIdAttributeName;
047 protected String personNameAttributeName;
048
049 public KualiUserControlDefinition() {
050 }
051
052 /**
053 *
054 * @see org.kuali.rice.krad.datadictionary.control.ControlDefinition#isKualiUser()
055 */
056 public boolean isKualiUser() {
057 return true;
058 }
059
060 /**
061 *
062 * @see java.lang.Object#toString()
063 */
064 public String toString() {
065 return "KualiUserControlDefinition";
066 }
067
068 /**
069 * Gets the personNameAttributeName attribute.
070 *
071 * @return Returns the personNameAttributeName.
072 */
073 public String getPersonNameAttributeName() {
074 return personNameAttributeName;
075 }
076
077 /**
078 * personNameAttributeName -
079 attribute that provides the User Name - e.g. JONES,JOHN P
080 */
081 public void setPersonNameAttributeName(String personNameAttributeName) {
082 if (StringUtils.isBlank(personNameAttributeName)) {
083 throw new IllegalArgumentException("invalid (blank) personNameAttributeName");
084 }
085 this.personNameAttributeName = personNameAttributeName;
086 }
087
088 /**
089 * Gets the universalIdAttributeName attribute.
090 *
091 * @return Returns the universalIdAttributeName.
092 */
093 public String getUniversalIdAttributeName() {
094 return universalIdAttributeName;
095 }
096
097 /**
098 * universalIdAttributeName -
099 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 }