KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > deploy > ApplicationParameter


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina.deploy;
20
21 import java.io.Serializable JavaDoc;
22
23
24 /**
25  * Representation of a context initialization parameter that is configured
26  * in the server configuration file, rather than the application deployment
27  * descriptor. This is convenient for establishing default values (which
28  * may be configured to allow application overrides or not) without having
29  * to modify the application deployment descriptor itself.
30  *
31  * @author Craig R. McClanahan
32  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
33  */

34
35 public class ApplicationParameter implements Serializable JavaDoc {
36
37
38     // ------------------------------------------------------------- Properties
39

40
41     /**
42      * The description of this environment entry.
43      */

44     private String JavaDoc description = null;
45
46     public String JavaDoc getDescription() {
47         return (this.description);
48     }
49
50     public void setDescription(String JavaDoc description) {
51         this.description = description;
52     }
53
54
55     /**
56      * The name of this application parameter.
57      */

58     private String JavaDoc name = null;
59
60     public String JavaDoc getName() {
61         return (this.name);
62     }
63
64     public void setName(String JavaDoc name) {
65         this.name = name;
66     }
67
68
69     /**
70      * Does this application parameter allow overrides by the application
71      * deployment descriptor?
72      */

73     private boolean override = true;
74
75     public boolean getOverride() {
76         return (this.override);
77     }
78
79     public void setOverride(boolean override) {
80         this.override = override;
81     }
82
83
84     /**
85      * The value of this application parameter.
86      */

87     private String JavaDoc value = null;
88
89     public String JavaDoc getValue() {
90         return (this.value);
91     }
92
93     public void setValue(String JavaDoc value) {
94         this.value = value;
95     }
96
97     // --------------------------------------------------------- Public Methods
98

99
100     /**
101      * Return a String representation of this object.
102      */

103     public String JavaDoc toString() {
104
105         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("ApplicationParameter[");
106         sb.append("name=");
107         sb.append(name);
108         if (description != null) {
109             sb.append(", description=");
110             sb.append(description);
111         }
112         sb.append(", value=");
113         sb.append(value);
114         sb.append(", override=");
115         sb.append(override);
116         sb.append("]");
117         return (sb.toString());
118
119     }
120
121
122 }
123
Popular Tags