001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.metadata;
023:
024: /**
025: * Config property meta data
026: *
027: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
028: * @version $Revision: 57189 $
029: */
030: public class ConfigPropertyMetaData extends
031: DescriptionMetaDataContainer {
032: private static final long serialVersionUID = -3247621229521854849L;
033:
034: /** The name */
035: private String name;
036:
037: /** The type */
038: private String type = "java.lang.String";
039:
040: /** The value */
041: private String value = "";
042:
043: /**
044: * Get the name
045: *
046: * @return the name
047: */
048: public String getName() {
049: return name;
050: }
051:
052: /**
053: * Set the name
054: *
055: * @param name the name
056: */
057: public void setName(String name) {
058: this .name = name;
059: }
060:
061: /**
062: * Get the type
063: *
064: * @return the type
065: */
066: public String getType() {
067: return type;
068: }
069:
070: /**
071: * Set the type
072: *
073: * @param type the type
074: */
075: public void setType(String type) {
076: this .type = type;
077: }
078:
079: /**
080: * Get the value
081: *
082: * @return the value
083: */
084: public String getValue() {
085: return value;
086: }
087:
088: /**
089: * Set the value
090: *
091: * @param value the value
092: */
093: public void setValue(String value) {
094: this .value = value;
095: }
096:
097: public String toString() {
098: StringBuffer buffer = new StringBuffer();
099: buffer.append("ConfigPropertyMetaData").append('@');
100: buffer.append(Integer
101: .toHexString(System.identityHashCode(this )));
102: buffer.append("[name=").append(name);
103: if (type != null)
104: buffer.append(" type=").append(type);
105: if (value != null)
106: buffer.append(" value=").append(value);
107: buffer.append(" descriptions=").append(getDescriptions());
108: buffer.append(']');
109: return buffer.toString();
110: }
111: }
|