1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.commons.resourcehandler.webapp.config.element.impl;
20
21 import java.util.Collection;
22 import java.util.Collections;
23 import java.util.HashSet;
24 import java.util.Set;
25
26 import org.apache.myfaces.commons.resourcehandler.webapp.config.element.ServletRegistration;
27
28
29
30
31
32
33 public class ServletRegistrationImpl implements ServletRegistration
34 {
35
36 private final String name;
37 private String className;
38 private Set<String> mappings = new HashSet<String>();
39
40 public ServletRegistrationImpl(
41 String name)
42 {
43 this.name = name;
44 }
45
46 public ServletRegistrationImpl(
47 String name,
48 String className)
49 {
50 this.name = name;
51 this.className = className;
52 }
53
54 public String getClassName()
55 {
56 return className;
57 }
58
59 public String getName()
60 {
61 return name;
62 }
63
64 public Collection<String> getMappings()
65 {
66 return Collections.unmodifiableCollection(mappings);
67 }
68
69 public void addMapping(String url)
70 {
71 mappings.add(url);
72 }
73
74 public void setClassName(String className)
75 {
76 this.className = className;
77 }
78
79 }