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