blob: 0a7b3c9c36dd95a08c0384a5e0e6aba2f58fc39e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*******************************************************************************
* Copyright (c) 2010, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Raymond Augé <raymond.auge@liferay.com> - Bug 436698
*******************************************************************************/
package org.eclipse.equinox.http.servlet.internal.servlet;
import java.util.*;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
public class FilterConfigImpl implements FilterConfig {
private final Map<String, String> initparams;
private final String filterName;
private final ServletContext servletContext;
public FilterConfigImpl(
String name, Map<String, String> initparams,
ServletContext servletContext) {
this.filterName = name;
if (initparams != null) {
this.initparams = initparams;
}
else {
this.initparams = Collections.emptyMap();
}
this.servletContext = servletContext;
}
public String getFilterName() {
return filterName;
}
public ServletContext getServletContext() {
return servletContext;
}
public String getInitParameter(String name) {
return initparams.get(name);
}
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(initparams.keySet());
}
}
|