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