KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tester > ContextBean


1 /*
2  * Copyright 1999, 2000 ,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 package org.apache.tester;
18
19
20 import java.io.Serializable JavaDoc;
21
22
23 /**
24  * Simple JavaBean to use for context attribute tests.
25  *
26  * @author Craig R. McClanahan
27  * @version $Revision: 1.2 $ $Date: 2004/02/27 14:58:56 $
28  */

29
30 public class ContextBean implements Serializable JavaDoc {
31
32
33     // ------------------------------------------------------------- Properties
34

35
36     /**
37      * The lifecycle events that have happened on this bean instance.
38      */

39     protected String JavaDoc lifecycle = "";
40
41     public String JavaDoc getLifecycle() {
42         return (this.lifecycle);
43     }
44
45     public void setLifecycle(String JavaDoc lifecycle) {
46         this.lifecycle = lifecycle;
47     }
48
49
50     /**
51      * A string property.
52      */

53     protected String JavaDoc stringProperty = "Default String Property Value";
54
55     public String JavaDoc getStringProperty() {
56         return (this.stringProperty);
57     }
58
59     public void setStringProperty(String JavaDoc stringProperty) {
60         this.stringProperty = stringProperty;
61     }
62
63
64     // --------------------------------------------------------- Public Methods
65

66
67     /**
68      * Return a string representation of this bean.
69      */

70     public String JavaDoc toString() {
71
72         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("ContextBean[lifecycle=");
73         sb.append(lifecycle);
74         sb.append(", stringProperty=");
75         sb.append(this.stringProperty);
76         sb.append("]");
77         return (sb.toString());
78
79     }
80
81
82 }
83
84
Popular Tags