KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > deploy > FilterDef


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina.deploy;
20
21
22 import java.util.HashMap JavaDoc;
23 import java.util.Map JavaDoc;
24 import java.io.Serializable JavaDoc;
25
26
27 /**
28  * Representation of a filter definition for a web application, as represented
29  * in a <code>&lt;filter&gt;</code> element in the deployment descriptor.
30  *
31  * @author Craig R. McClanahan
32  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
33  */

34
35 public class FilterDef implements Serializable JavaDoc {
36
37
38     // ------------------------------------------------------------- Properties
39

40
41     /**
42      * The description of this filter.
43      */

44     private String JavaDoc description = null;
45
46     public String JavaDoc getDescription() {
47         return (this.description);
48     }
49
50     public void setDescription(String JavaDoc description) {
51         this.description = description;
52     }
53
54
55     /**
56      * The display name of this filter.
57      */

58     private String JavaDoc displayName = null;
59
60     public String JavaDoc getDisplayName() {
61         return (this.displayName);
62     }
63
64     public void setDisplayName(String JavaDoc displayName) {
65         this.displayName = displayName;
66     }
67
68
69     /**
70      * The fully qualified name of the Java class that implements this filter.
71      */

72     private String JavaDoc filterClass = null;
73
74     public String JavaDoc getFilterClass() {
75         return (this.filterClass);
76     }
77
78     public void setFilterClass(String JavaDoc filterClass) {
79         this.filterClass = filterClass;
80     }
81
82
83     /**
84      * The name of this filter, which must be unique among the filters
85      * defined for a particular web application.
86      */

87     private String JavaDoc filterName = null;
88
89     public String JavaDoc getFilterName() {
90         return (this.filterName);
91     }
92
93     public void setFilterName(String JavaDoc filterName) {
94         this.filterName = filterName;
95     }
96
97
98     /**
99      * The large icon associated with this filter.
100      */

101     private String JavaDoc largeIcon = null;
102
103     public String JavaDoc getLargeIcon() {
104         return (this.largeIcon);
105     }
106
107     public void setLargeIcon(String JavaDoc largeIcon) {
108         this.largeIcon = largeIcon;
109     }
110
111
112     /**
113      * The set of initialization parameters for this filter, keyed by
114      * parameter name.
115      */

116     private Map JavaDoc parameters = new HashMap JavaDoc();
117
118     public Map JavaDoc getParameterMap() {
119
120         return (this.parameters);
121
122     }
123
124
125     /**
126      * The small icon associated with this filter.
127      */

128     private String JavaDoc smallIcon = null;
129
130     public String JavaDoc getSmallIcon() {
131         return (this.smallIcon);
132     }
133
134     public void setSmallIcon(String JavaDoc smallIcon) {
135         this.smallIcon = smallIcon;
136     }
137
138
139     // --------------------------------------------------------- Public Methods
140

141
142     /**
143      * Add an initialization parameter to the set of parameters associated
144      * with this filter.
145      *
146      * @param name The initialization parameter name
147      * @param value The initialization parameter value
148      */

149     public void addInitParameter(String JavaDoc name, String JavaDoc value) {
150
151         parameters.put(name, value);
152
153     }
154
155
156     /**
157      * Render a String representation of this object.
158      */

159     public String JavaDoc toString() {
160
161         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("FilterDef[");
162         sb.append("filterName=");
163         sb.append(this.filterName);
164         sb.append(", filterClass=");
165         sb.append(this.filterClass);
166         sb.append("]");
167         return (sb.toString());
168
169     }
170
171
172 }
173
Popular Tags