use of com.zimbra.doc.soap.apidesc.SoapApiElement in project zm-mailbox by Zimbra.
the class CommandChanges method findSubElementChanges.
private void findSubElementChanges(Ancestry ancestry, Map<String, SoapApiNamedElement> baseElems, Map<String, SoapApiNamedElement> currElems) {
for (Entry<String, SoapApiNamedElement> entry : currElems.entrySet()) {
SoapApiNamedElement baseElem = baseElems.get(entry.getKey());
if (baseElem != null) {
String className = null;
boolean insideSelf = false;
if (baseElem instanceof SoapApiElement) {
SoapApiElement be = (SoapApiElement) baseElem;
className = be.getJaxb();
insideSelf = ancestry.hasAncestor(className);
}
if (!insideSelf) {
Ancestry subAncestry = new Ancestry(ancestry, baseElem.getName(), className);
findElementChanges(subAncestry, baseElem, entry.getValue());
}
} else {
newElems.add(new NamedElem(ancestry.getXpath(), entry.getValue()));
}
}
for (Entry<String, SoapApiNamedElement> entry : baseElems.entrySet()) {
if (!currElems.containsKey(entry.getKey())) {
deletedElems.add(new NamedElem(ancestry.getXpath(), entry.getValue()));
}
}
}
Aggregations