1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kns.datadictionary.exporter; |
17 | |
|
18 | |
import org.kuali.rice.krad.datadictionary.CollectionDefinition; |
19 | |
import org.kuali.rice.krad.datadictionary.DataDictionaryEntryBase; |
20 | |
import org.kuali.rice.krad.datadictionary.exporter.ExportMap; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
@Deprecated |
28 | |
public class CollectionsMapBuilder { |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | 0 | public CollectionsMapBuilder() { |
34 | 0 | } |
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
public ExportMap buildCollectionsMap(DataDictionaryEntryBase entry) { |
42 | 0 | ExportMap collectionsMap = new ExportMap("collections"); |
43 | |
|
44 | 0 | for ( CollectionDefinition collection : entry.getCollections() ) { |
45 | 0 | collectionsMap.set(buildCollectionMap(collection)); |
46 | |
} |
47 | |
|
48 | 0 | return collectionsMap; |
49 | |
} |
50 | |
|
51 | |
private ExportMap buildCollectionMap(CollectionDefinition collection) { |
52 | 0 | ExportMap collectionMap = new ExportMap(collection.getName()); |
53 | |
|
54 | 0 | collectionMap.set("name", collection.getName()); |
55 | 0 | collectionMap.set("label", collection.getLabel()); |
56 | 0 | collectionMap.set("shortLabel", collection.getShortLabel()); |
57 | 0 | if (collection.getSummary() != null) { |
58 | 0 | collectionMap.set("summary", collection.getSummary()); |
59 | |
} |
60 | 0 | if (collection.getDescription() != null) { |
61 | 0 | collectionMap.set("description", collection.getDescription()); |
62 | |
} |
63 | |
|
64 | 0 | return collectionMap; |
65 | |
} |
66 | |
|
67 | |
} |