1
14
15 package com.liferay.portlet;
16
17 import java.util.Collections;
18 import java.util.Enumeration;
19 import java.util.Map;
20
21 import javax.portlet.PortletContext;
22 import javax.portlet.filter.FilterConfig;
23
24
29 public class FilterConfigImpl implements FilterConfig {
30
31 public FilterConfigImpl(
32 String filterName, PortletContext portletContext,
33 Map<String, String> params) {
34
35 _filterName = filterName;
36 _portletContext = portletContext;
37 _params = params;
38 }
39
40 public String getFilterName() {
41 return _filterName;
42 }
43
44 public String getInitParameter(String name) {
45 if (name == null) {
46 throw new IllegalArgumentException();
47 }
48
49 return _params.get(name);
50 }
51
52 public Enumeration<String> getInitParameterNames() {
53 return Collections.enumeration(_params.keySet());
54 }
55
56 public PortletContext getPortletContext() {
57 return _portletContext;
58 }
59
60 private String _filterName;
61 private PortletContext _portletContext;
62 private Map<String, String> _params;
63
64 }