1 package org.apache.turbine.services.urlmapper.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.List;
23 import java.util.concurrent.CopyOnWriteArrayList;
24
25 import javax.xml.bind.annotation.XmlAccessType;
26 import javax.xml.bind.annotation.XmlAccessorType;
27 import javax.xml.bind.annotation.XmlAttribute;
28 import javax.xml.bind.annotation.XmlElement;
29 import javax.xml.bind.annotation.XmlElementWrapper;
30 import javax.xml.bind.annotation.XmlRootElement;
31
32 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
33 import com.fasterxml.jackson.annotation.JsonProperty;
34
35
36
37
38
39
40 @XmlRootElement(name="url-mapping")
41 @XmlAccessorType(XmlAccessType.NONE)
42 @JsonIgnoreProperties(ignoreUnknown = true)
43 public class URLMappingContainer
44 {
45
46
47
48
49 @XmlAttribute
50 private String name;
51
52
53
54
55 @JsonProperty("maps")
56 private List<URLMapEntry> urlMapEntries = new CopyOnWriteArrayList<>();
57
58
59
60
61
62
63
64 protected void setName(String name)
65 {
66 this.name = name;
67 }
68
69
70
71
72
73
74 public String getName()
75 {
76 return name;
77 }
78
79
80
81
82 @XmlElementWrapper(name="maps")
83 @XmlElement(name="map")
84 public List<URLMapEntry> getMapEntries()
85 {
86 return urlMapEntries;
87 }
88
89
90
91
92
93
94 protected void setMapEntries(List<URLMapEntry> newURLMapEntries)
95 {
96 this.urlMapEntries = new CopyOnWriteArrayList<>(newURLMapEntries);
97 }
98 }