KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > om > page > impl > PropertyImpl


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 /*
17
18  */

19
20 package org.apache.pluto.portalImpl.om.page.impl;
21
22 import org.apache.pluto.portalImpl.om.page.Property;
23 import org.apache.pluto.util.StringUtils;
24
25 public class PropertyImpl implements Property, java.io.Serializable JavaDoc {
26
27     private String JavaDoc name;
28     private String JavaDoc value;
29
30     public PropertyImpl()
31     {
32         name = "";
33         value = "";
34     }
35
36     // Property implementation.
37

38     public String JavaDoc getName()
39     {
40         return name;
41     }
42
43     public void setName(String JavaDoc name)
44     {
45         this.name = name;
46     }
47
48     public String JavaDoc getValue()
49     {
50         return value;
51     }
52
53     public void setValue(String JavaDoc value)
54     {
55         this.value = value;
56     }
57
58     // additional methods.
59

60     public String JavaDoc toString()
61     {
62         return toString(0);
63     }
64
65     public String JavaDoc toString(int indent)
66     {
67         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc(50);
68         StringUtils.newLine(buffer,indent);
69         buffer.append(getClass().toString());
70         buffer.append(": name='");
71         buffer.append(name);
72         buffer.append("', value='");
73         buffer.append(value);
74         buffer.append("'");
75         return buffer.toString();
76     }
77
78 }
Popular Tags