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