01: /*
02: * The contents of this file are subject to the
03: * Mozilla Public License Version 1.1 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
09: * See the License for the specific language governing rights and
10: * limitations under the License.
11: *
12: * The Initial Developer of the Original Code is Simulacra Media Ltd.
13: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14: *
15: * All Rights Reserved.
16: *
17: * Contributor(s):
18: */
19: package org.openharmonise.dav.server.webservice;
20:
21: /**
22: * This class represents a server config property with a name and value.
23: *
24: * @author Michael Bell
25: * @version $Revision: 1.1 $
26: *
27: */
28: public class ConfigProperty {
29:
30: /**
31: * The property name
32: */
33: private String m_sPropName = null;
34:
35: /**
36: * The property value
37: */
38: private String m_sPropVal = null;
39:
40: /**
41: * Constructs a new <code>ConfigProperty</code>.
42: */
43: public ConfigProperty() {
44: super ();
45: }
46:
47: /**
48: * Constructs a new <code>ConfigProperty</code> with the
49: * given values.
50: *
51: * @param name the property name
52: * @param val the property value
53: */
54: public ConfigProperty(String name, String val) {
55:
56: m_sPropName = name;
57: m_sPropVal = val;
58: }
59:
60: /**
61: * @return Returns the property name.
62: */
63: public String getName() {
64: return m_sPropName;
65: }
66:
67: /**
68: * @param propName The property to set.
69: */
70: public void setName(String propName) {
71: m_sPropName = propName;
72: }
73:
74: /**
75: * @return Returns the property value.
76: */
77: public String getValue() {
78: return m_sPropVal;
79: }
80:
81: /**
82: * @param propVal The value to set.
83: */
84: public void setValue(String propVal) {
85: m_sPropVal = propVal;
86: }
87:
88: /* (non-Javadoc)
89: * @see java.lang.Object#toString()
90: */
91: public String toString() {
92: StringBuffer sbuf = new StringBuffer();
93:
94: sbuf.append("[").append(m_sPropName).append(" - ").append(
95: m_sPropVal).append("]");
96: return sbuf.toString();
97: }
98: }
|