1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.context;
18
19 import java.util.HashMap;
20 import java.util.Map;
21
22 import org.springframework.util.StringUtils;
23
24
25
26
27
28
29
30 public abstract class AbstractMessageContext implements MessageContext {
31
32
33
34
35
36 private Map<String, Object> properties;
37
38 public boolean containsProperty(String name) {
39 return getProperties().containsKey(name);
40 }
41
42 public Object getProperty(String name) {
43 return getProperties().get(name);
44 }
45
46 public String[] getPropertyNames() {
47 return StringUtils.toStringArray(getProperties().keySet());
48 }
49
50 public void removeProperty(String name) {
51 getProperties().remove(name);
52 }
53
54 public void setProperty(String name, Object value) {
55 getProperties().put(name, value);
56 }
57
58 private Map<String, Object> getProperties() {
59 if (properties == null) {
60 properties = new HashMap<String, Object>();
61 }
62 return properties;
63 }
64 }