001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.catalina.deploy;
019:
020: import java.io.Serializable;
021:
022: /**
023: * Representation of an application environment entry, as represented in
024: * an <code><env-entry></code> element in the deployment descriptor.
025: *
026: * @author Craig R. McClanahan
027: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
028: */
029:
030: public class ContextEnvironment implements Serializable {
031:
032: // ------------------------------------------------------------- Properties
033:
034: /**
035: * The description of this environment entry.
036: */
037: private String description = null;
038:
039: public String getDescription() {
040: return (this .description);
041: }
042:
043: public void setDescription(String description) {
044: this .description = description;
045: }
046:
047: /**
048: * The name of this environment entry.
049: */
050: private String name = null;
051:
052: public String getName() {
053: return (this .name);
054: }
055:
056: public void setName(String name) {
057: this .name = name;
058: }
059:
060: /**
061: * Does this environment entry allow overrides by the application
062: * deployment descriptor?
063: */
064: private boolean override = true;
065:
066: public boolean getOverride() {
067: return (this .override);
068: }
069:
070: public void setOverride(boolean override) {
071: this .override = override;
072: }
073:
074: /**
075: * The type of this environment entry.
076: */
077: private String type = null;
078:
079: public String getType() {
080: return (this .type);
081: }
082:
083: public void setType(String type) {
084: this .type = type;
085: }
086:
087: /**
088: * The value of this environment entry.
089: */
090: private String value = null;
091:
092: public String getValue() {
093: return (this .value);
094: }
095:
096: public void setValue(String value) {
097: this .value = value;
098: }
099:
100: // --------------------------------------------------------- Public Methods
101:
102: /**
103: * Return a String representation of this object.
104: */
105: public String toString() {
106:
107: StringBuffer sb = new StringBuffer("ContextEnvironment[");
108: sb.append("name=");
109: sb.append(name);
110: if (description != null) {
111: sb.append(", description=");
112: sb.append(description);
113: }
114: if (type != null) {
115: sb.append(", type=");
116: sb.append(type);
117: }
118: if (value != null) {
119: sb.append(", value=");
120: sb.append(value);
121: }
122: sb.append(", override=");
123: sb.append(override);
124: sb.append("]");
125: return (sb.toString());
126:
127: }
128:
129: // -------------------------------------------------------- Package Methods
130:
131: /**
132: * The NamingResources with which we are associated (if any).
133: */
134: protected NamingResources resources = null;
135:
136: public NamingResources getNamingResources() {
137: return (this .resources);
138: }
139:
140: void setNamingResources(NamingResources resources) {
141: this.resources = resources;
142: }
143:
144: }
|