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 public String getExportKey() {
41 return this.exportKey;
42 }
43
44
45
46
47 public Map<String, Object> getExportData() {
48 return Collections.unmodifiableMap(this.exportData);
49 }
50
51
52
53
54 public void set(ExportMap map) {
55 if (map == null) {
56 throw new IllegalArgumentException("invalid (null) map");
57 }
58
59 exportData.set(map.getExportKey(), map.getExportData());
60 }
61
62
63
64
65 public void setOptional(ExportMap map) {
66 if (map != null) {
67 set(map);
68 }
69 }
70
71
72
73
74
75
76
77 public void set(String key, String value) {
78 if (key == null) {
79 throw new IllegalArgumentException("invalid (null) key");
80 }
81 if (value == null) {
82 throw new IllegalArgumentException("invalid (null) value - key=" + key);
83 }
84
85 exportData.set(key, value);
86 }
87
88
89
90
91 public String toString() {
92 return this.exportKey + "(" + this.exportData.size() + " children)";
93 }
94 }