001 /**
002 * Copyright 2005-2012 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;
017
018 import org.apache.commons.lang.StringUtils;
019 import org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase;
020
021 /**
022 * Abstract superclass for all maintainable fields and collections. Never used directly.
023 */
024 @Deprecated
025 public abstract class MaintainableItemDefinition extends DataDictionaryDefinitionBase {
026 private static final long serialVersionUID = 4564613758722159747L;
027
028 private String name;
029
030 public MaintainableItemDefinition() {
031 }
032
033
034 /**
035 * @return name
036 */
037 public String getName() {
038 return name;
039 }
040
041 /**
042 * Sets name to the given value.
043 *
044 * @param name
045 * @throws IllegalArgumentException if the given name is blank
046 */
047 public void setName(String name) {
048 if (StringUtils.isBlank(name)) {
049 throw new IllegalArgumentException("invalid (blank) name");
050 }
051 this.name = name;
052 }
053
054
055 /**
056 * @see java.lang.Object#toString()
057 */
058 public String toString() {
059 return "MaintainableItemDefinition for item " + getName();
060 }
061 }