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 a context initialization parameter that is configured
023: * in the server configuration file, rather than the application deployment
024: * descriptor. This is convenient for establishing default values (which
025: * may be configured to allow application overrides or not) without having
026: * to modify the application deployment descriptor itself.
027: *
028: * @author Craig R. McClanahan
029: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
030: */
031:
032: public class ApplicationParameter implements Serializable {
033:
034: // ------------------------------------------------------------- Properties
035:
036: /**
037: * The description of this environment entry.
038: */
039: private String description = null;
040:
041: public String getDescription() {
042: return (this .description);
043: }
044:
045: public void setDescription(String description) {
046: this .description = description;
047: }
048:
049: /**
050: * The name of this application parameter.
051: */
052: private String name = null;
053:
054: public String getName() {
055: return (this .name);
056: }
057:
058: public void setName(String name) {
059: this .name = name;
060: }
061:
062: /**
063: * Does this application parameter allow overrides by the application
064: * deployment descriptor?
065: */
066: private boolean override = true;
067:
068: public boolean getOverride() {
069: return (this .override);
070: }
071:
072: public void setOverride(boolean override) {
073: this .override = override;
074: }
075:
076: /**
077: * The value of this application parameter.
078: */
079: private String value = null;
080:
081: public String getValue() {
082: return (this .value);
083: }
084:
085: public void setValue(String value) {
086: this .value = value;
087: }
088:
089: // --------------------------------------------------------- Public Methods
090:
091: /**
092: * Return a String representation of this object.
093: */
094: public String toString() {
095:
096: StringBuffer sb = new StringBuffer("ApplicationParameter[");
097: sb.append("name=");
098: sb.append(name);
099: if (description != null) {
100: sb.append(", description=");
101: sb.append(description);
102: }
103: sb.append(", value=");
104: sb.append(value);
105: sb.append(", override=");
106: sb.append(override);
107: sb.append("]");
108: return (sb.toString());
109:
110: }
111:
112: }
|