elem.addAttribute(MailService.A_REVISION, folder.getModifiedSequence()); }
    private static Element encodeFolderCommon(Element elem, ZimbraContext lc, Folder folder, int fields) {        int folderId = folder.getId();        elem.addAttribute(MailService.A_ID, lc.formatItemId(folder));        if (folderId != Mailbox.ID_FOLDER_ROOT) {            if (needToOutput(fields, Change.MODIFIED_NAME)) {                String name = folder.getName();                if (name != null && name.length() > 0)                    elem.addAttribute(MailService.A_NAME, name);            }            if (needToOutput(fields, Change.MODIFIED_FOLDER))                elem.addAttribute(MailService.A_FOLDER, lc.formatItemId(folder.getFolderId()));        }        if (needToOutput(fields, Change.MODIFIED_COLOR)) {            byte color = folder.getColor();            if (color != MailItem.DEFAULT_COLOR || fields != NOTIFY_FIELDS)                elem.addAttribute(MailService.A_COLOR, color);        }        if (needToOutput(fields, Change.MODIFIED_UNREAD)) {            int unread = folder.getUnreadCount();            if (unread > 0 || fields != NOTIFY_FIELDS)                elem.addAttribute(MailService.A_UNREAD, unread);        }        if (needToOutput(fields, Change.MODIFIED_VIEW)) {            byte view = folder.getDefaultView();            if (view != MailItem.TYPE_UNKNOWN)                elem.addAttribute(MailService.A_DEFAULT_VIEW, MailItem.getNameForType(view));        }        if (needToOutput(fields, Change.MODIFIED_CONFLICT))            elem.addAttribute(MailService.A_CHANGE_DATE, folder.getChangeDate() / 1000);        return elem;    }