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.util.HashMap;
020: import java.util.Map;
021: import java.io.Serializable;
022:
023: /**
024: * Representation of a filter definition for a web application, as represented
025: * in a <code><filter></code> element in the deployment descriptor.
026: *
027: * @author Craig R. McClanahan
028: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
029: */
030:
031: public class FilterDef implements Serializable {
032:
033: // ------------------------------------------------------------- Properties
034:
035: /**
036: * The description of this filter.
037: */
038: private String description = null;
039:
040: public String getDescription() {
041: return (this .description);
042: }
043:
044: public void setDescription(String description) {
045: this .description = description;
046: }
047:
048: /**
049: * The display name of this filter.
050: */
051: private String displayName = null;
052:
053: public String getDisplayName() {
054: return (this .displayName);
055: }
056:
057: public void setDisplayName(String displayName) {
058: this .displayName = displayName;
059: }
060:
061: /**
062: * The fully qualified name of the Java class that implements this filter.
063: */
064: private String filterClass = null;
065:
066: public String getFilterClass() {
067: return (this .filterClass);
068: }
069:
070: public void setFilterClass(String filterClass) {
071: this .filterClass = filterClass;
072: }
073:
074: /**
075: * The name of this filter, which must be unique among the filters
076: * defined for a particular web application.
077: */
078: private String filterName = null;
079:
080: public String getFilterName() {
081: return (this .filterName);
082: }
083:
084: public void setFilterName(String filterName) {
085: this .filterName = filterName;
086: }
087:
088: /**
089: * The large icon associated with this filter.
090: */
091: private String largeIcon = null;
092:
093: public String getLargeIcon() {
094: return (this .largeIcon);
095: }
096:
097: public void setLargeIcon(String largeIcon) {
098: this .largeIcon = largeIcon;
099: }
100:
101: /**
102: * The set of initialization parameters for this filter, keyed by
103: * parameter name.
104: */
105: private Map parameters = new HashMap();
106:
107: public Map getParameterMap() {
108:
109: return (this .parameters);
110:
111: }
112:
113: /**
114: * The small icon associated with this filter.
115: */
116: private String smallIcon = null;
117:
118: public String getSmallIcon() {
119: return (this .smallIcon);
120: }
121:
122: public void setSmallIcon(String smallIcon) {
123: this .smallIcon = smallIcon;
124: }
125:
126: // --------------------------------------------------------- Public Methods
127:
128: /**
129: * Add an initialization parameter to the set of parameters associated
130: * with this filter.
131: *
132: * @param name The initialization parameter name
133: * @param value The initialization parameter value
134: */
135: public void addInitParameter(String name, String value) {
136:
137: parameters.put(name, value);
138:
139: }
140:
141: /**
142: * Render a String representation of this object.
143: */
144: public String toString() {
145:
146: StringBuffer sb = new StringBuffer("FilterDef[");
147: sb.append("filterName=");
148: sb.append(this .filterName);
149: sb.append(", filterClass=");
150: sb.append(this .filterClass);
151: sb.append("]");
152: return (sb.toString());
153:
154: }
155:
156: }
|