use of com.zimbra.doc.soap.apidesc.SoapApiElementArtifact in project zm-mailbox by Zimbra.
the class CommandChanges method makeSubElemMap.
/**
* Convenience method. Creating the map is slightly complicated by SoapApiElementChoiceInfo pseudo nodes
* which we can ignore for the purposes of the changelog, but we need to promote their children
*/
private Map<String, SoapApiNamedElement> makeSubElemMap(Collection<SoapApiElementArtifact> subElems) {
Map<String, SoapApiNamedElement> elems = Maps.newTreeMap();
if (subElems != null) {
for (SoapApiElementArtifact elemArtifact : subElems) {
if (elemArtifact instanceof SoapApiElementChoiceInfo) {
SoapApiElementChoiceInfo choiceNode = (SoapApiElementChoiceInfo) elemArtifact;
for (SoapApiElementArtifact subE : choiceNode.getSubElements()) {
if (subE instanceof SoapApiNamedElement) {
SoapApiNamedElement namedE = (SoapApiNamedElement) subE;
elems.put(namedE.getName(), namedE);
}
}
} else if (elemArtifact instanceof SoapApiNamedElement) {
SoapApiNamedElement namedE = (SoapApiNamedElement) elemArtifact;
elems.put(namedE.getName(), namedE);
}
}
}
return elems;
}
Aggregations