01: /*
02: * Copyright 2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.apache.myfaces.shared_impl.webapp.webxml;
17:
18: /**
19: * @author Mario Ivankovits (latest modification by $Author: imario $)
20: * @version $Revision: 393150 $ $Date: 2006-04-11 08:37:13 +0200 (Di, 11 Apr 2006) $
21: */
22: public class FilterMapping {
23: private String _filterName;
24: private Class _filterClass;
25: private String _urlPattern;
26: private boolean _isExtensionMapping = false;
27:
28: public FilterMapping(String filterName, Class filterClass,
29: String urlPattern) {
30: _filterName = filterName;
31: _filterClass = filterClass;
32: _urlPattern = urlPattern;
33: if (_urlPattern != null) {
34: if (_urlPattern.startsWith("*.")) {
35: _isExtensionMapping = true;
36: }
37: }
38: }
39:
40: public boolean isExtensionMapping() {
41: return _isExtensionMapping;
42: }
43:
44: public String getFilterName() {
45: return _filterName;
46: }
47:
48: public Class getFilterClass() {
49: return _filterClass;
50: }
51:
52: public String getUrlPattern() {
53: return _urlPattern;
54: }
55: }
|