001: /*
002: * Copyright 2006 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.core.datadictionary.control;
017:
018: import org.apache.commons.lang.StringUtils;
019: import org.apache.commons.logging.Log;
020: import org.apache.commons.logging.LogFactory;
021:
022: public class KualiUserControlDefinition extends ControlDefinitionBase {
023:
024: // logger
025: private static Log LOG = LogFactory
026: .getLog(KualiUserControlDefinition.class);
027:
028: private String universalIdAttributeName;
029: private String userIdAttributeName;
030: private String personNameAttributeName;
031:
032: public KualiUserControlDefinition() {
033: LOG.debug("creating new KualiUserControlDefinition");
034: }
035:
036: /**
037: *
038: * @see org.kuali.core.datadictionary.control.ControlDefinition#isKualiUser()
039: */
040: public boolean isKualiUser() {
041: return true;
042: }
043:
044: /**
045: *
046: * @see java.lang.Object#toString()
047: */
048: public String toString() {
049: return "KualiUserControlDefinition";
050: }
051:
052: /**
053: * Gets the personNameAttributeName attribute.
054: *
055: * @return Returns the personNameAttributeName.
056: */
057: public String getPersonNameAttributeName() {
058: return personNameAttributeName;
059: }
060:
061: /**
062: * Sets the personNameAttributeName attribute value.
063: *
064: * @param personNameAttributeName The personNameAttributeName to set.
065: */
066: public void setPersonNameAttributeName(
067: String personNameAttributeName) {
068: LOG.debug("calling setPersonNameAttributeName '"
069: + personNameAttributeName + "'");
070: if (StringUtils.isBlank(personNameAttributeName)) {
071: throw new IllegalArgumentException(
072: "invalid (blank) personNameAttributeName");
073: }
074: this .personNameAttributeName = personNameAttributeName;
075: }
076:
077: /**
078: * Gets the universalIdAttributeName attribute.
079: *
080: * @return Returns the universalIdAttributeName.
081: */
082: public String getUniversalIdAttributeName() {
083: return universalIdAttributeName;
084: }
085:
086: /**
087: * Sets the universalIdAttributeName attribute value.
088: *
089: * @param universalIdAttributeName The universalIdAttributeName to set.
090: */
091: public void setUniversalIdAttributeName(
092: String universalIdAttributeName) {
093: LOG.debug("calling setUniversalIdAttributeName '"
094: + universalIdAttributeName + "'");
095: if (StringUtils.isBlank(universalIdAttributeName)) {
096: throw new IllegalArgumentException(
097: "invalid (blank) universalIdAttributeName");
098: }
099: this .universalIdAttributeName = universalIdAttributeName;
100: }
101:
102: /**
103: * Gets the userIdAttributeName attribute.
104: *
105: * @return Returns the userIdAttributeName.
106: */
107: public String getUserIdAttributeName() {
108: return userIdAttributeName;
109: }
110:
111: /**
112: * Sets the userIdAttributeName attribute value.
113: *
114: * @param userIdAttributeName The userIdAttributeName to set.
115: */
116: public void setUserIdAttributeName(String userIdAttributeName) {
117: LOG.debug("calling setUserIdAttributeName '"
118: + userIdAttributeName + "'");
119: if (StringUtils.isBlank(userIdAttributeName)) {
120: throw new IllegalArgumentException(
121: "invalid (blank) userIdAttributeName");
122: }
123: this.userIdAttributeName = userIdAttributeName;
124: }
125:
126: }
|