KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > dav > server > webservice > ConfigProperty


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * 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 JavaDoc m_sPropName = null;
34     
35     /**
36      * The property value
37      */

38     private String JavaDoc 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 JavaDoc name, String JavaDoc val) {
55         
56         m_sPropName = name;
57         m_sPropVal = val;
58     }
59
60     /**
61      * @return Returns the property name.
62      */

63     public String JavaDoc getName() {
64         return m_sPropName;
65     }
66     
67     /**
68      * @param propName The property to set.
69      */

70     public void setName(String JavaDoc propName) {
71         m_sPropName = propName;
72     }
73     
74     /**
75      * @return Returns the property value.
76      */

77     public String JavaDoc getValue() {
78         return m_sPropVal;
79     }
80     
81     /**
82      * @param propVal The value to set.
83      */

84     public void setValue(String JavaDoc propVal) {
85         m_sPropVal = propVal;
86     }
87     
88     /* (non-Javadoc)
89      * @see java.lang.Object#toString()
90      */

91     public String JavaDoc toString() {
92         StringBuffer JavaDoc sbuf = new StringBuffer JavaDoc();
93         
94         sbuf.append("[").append(m_sPropName).append(" - ").append(m_sPropVal).append("]");
95         return sbuf.toString();
96     }
97 }
98
Popular Tags