private static void overrideEntry(Element entry, Element overrideEntry) {
        // Override name.
        overrideCommonAttributes(entry, overrideEntry);
        if (overrideEntry.attributeValue("url") != null) {
            entry.addAttribute("url", overrideEntry.attributeValue("url"));
        }
        if (overrideEntry.attributeValue("description") != null) {
            entry.addAttribute("description", overrideEntry.attributeValue("description"));
        }
        // Override any sidebars contained in the entry.
        for (Iterator<Element> i = overrideEntry.elementIterator(); i.hasNext(); ) {
            Element sidebar = i.next();
            String id = sidebar.attributeValue("id");
            Element existingSidebar = getElemnetByID(id);
            // Simple case, there is no existing sidebar with the same id.
            if (existingSidebar == null) {
                entry.add(sidebar.createCopy());
            }
            // More complex case -- a sidebar with the same id already exists.
            // In this case, we have to overrite only the difference between
            // the two elements.
            else {
                overrideSidebar(existingSidebar, sidebar);
            }
        }
    }
Sorts all tabs, their containing sidebars, and their containing entries based on the value of their 'order'
attributes.
xmppserver/src/main/java/org/jivesoftware/admin/AdminConsole.java