KickJava   Java API By Example, From Geeks To Geeks.

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


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 an application environment entry, as represented in
26  * an <code>&lt;env-entry&gt;</code> element in the deployment descriptor.
27  *
28  * @author Craig R. McClanahan
29  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
30  */

31
32 public class ContextEnvironment implements Serializable JavaDoc {
33
34
35     // ------------------------------------------------------------- Properties
36

37
38     /**
39      * The description of this environment entry.
40      */

41     private String JavaDoc description = null;
42
43     public String JavaDoc getDescription() {
44         return (this.description);
45     }
46
47     public void setDescription(String JavaDoc description) {
48         this.description = description;
49     }
50
51
52     /**
53      * The name of this environment entry.
54      */

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

70     private boolean override = true;
71
72     public boolean getOverride() {
73         return (this.override);
74     }
75
76     public void setOverride(boolean override) {
77         this.override = override;
78     }
79
80
81     /**
82      * The type of this environment entry.
83      */

84     private String JavaDoc type = null;
85
86     public String JavaDoc getType() {
87         return (this.type);
88     }
89
90     public void setType(String JavaDoc type) {
91         this.type = type;
92     }
93
94
95     /**
96      * The value of this environment entry.
97      */

98     private String JavaDoc value = null;
99
100     public String JavaDoc getValue() {
101         return (this.value);
102     }
103
104     public void setValue(String JavaDoc value) {
105         this.value = value;
106     }
107
108     // --------------------------------------------------------- Public Methods
109

110
111     /**
112      * Return a String representation of this object.
113      */

114     public String JavaDoc toString() {
115
116         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("ContextEnvironment[");
117         sb.append("name=");
118         sb.append(name);
119         if (description != null) {
120             sb.append(", description=");
121             sb.append(description);
122         }
123         if (type != null) {
124             sb.append(", type=");
125             sb.append(type);
126         }
127         if (value != null) {
128             sb.append(", value=");
129             sb.append(value);
130         }
131         sb.append(", override=");
132         sb.append(override);
133         sb.append("]");
134         return (sb.toString());
135
136     }
137
138
139     // -------------------------------------------------------- Package Methods
140

141
142     /**
143      * The NamingResources with which we are associated (if any).
144      */

145     protected NamingResources resources = null;
146
147     public NamingResources getNamingResources() {
148         return (this.resources);
149     }
150
151     void setNamingResources(NamingResources resources) {
152         this.resources = resources;
153     }
154
155
156 }
157
Popular Tags