1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.datadictionary.exporter;
17
18 import java.util.Collections;
19 import java.util.Map;
20
21
22
23
24
25
26
27 @Deprecated
28 public class ExportMap {
29 private final String exportKey;
30 private final StringMap exportData;
31
32 public ExportMap(String exportKey) {
33 this.exportKey = exportKey;
34 this.exportData = new StringMap();
35 }
36
37
38
39
40
41 public String getExportKey() {
42 return this.exportKey;
43 }
44
45
46
47
48 public Map<String, Object> getExportData() {
49 return Collections.unmodifiableMap(this.exportData);
50 }
51
52
53
54
55
56 public void set(ExportMap map) {
57 if (map == null) {
58 throw new IllegalArgumentException("invalid (null) map");
59 }
60
61 exportData.set(map.getExportKey(), map.getExportData());
62 }
63
64
65
66
67 public void setOptional(ExportMap map) {
68 if (map != null) {
69 set(map);
70 }
71 }
72
73
74
75
76
77
78
79 public void set(String key, String value) {
80 if (key == null) {
81 throw new IllegalArgumentException("invalid (null) key");
82 }
83 if (value == null) {
84 throw new IllegalArgumentException("invalid (null) value - key=" + key);
85 }
86
87 exportData.set(key, value);
88 }
89
90
91
92
93
94 public String toString() {
95 return this.exportKey + "(" + this.exportData.size() + " children)";
96 }
97 }