01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.datadictionary;
17:
18: import org.apache.commons.lang.StringUtils;
19: import org.apache.commons.logging.Log;
20: import org.apache.commons.logging.LogFactory;
21:
22: /**
23: * MaintainableItemDefinition
24: *
25: *
26: */
27: public abstract class MaintainableItemDefinition extends
28: DataDictionaryDefinitionBase {
29: // logger
30: private static Log LOG = LogFactory
31: .getLog(MaintainableItemDefinition.class);
32:
33: private String name;
34:
35: public MaintainableItemDefinition() {
36: LOG.debug("creating new MaintainableItemDefinition");
37: }
38:
39: /**
40: * @return name
41: */
42: public String getName() {
43: return name;
44: }
45:
46: /**
47: * Sets name to the given value.
48: *
49: * @param name
50: * @throws IllegalArgumentException if the given name is blank
51: */
52: public void setName(String name) {
53: if (StringUtils.isBlank(name)) {
54: throw new IllegalArgumentException("invalid (blank) name");
55: }
56: LOG.debug("calling setName '" + name + "'");
57:
58: this .name = name;
59: }
60:
61: /**
62: * @see java.lang.Object#toString()
63: */
64: public String toString() {
65: return "MaintainableItemDefinition for item " + getName();
66: }
67: }
|