use of com.zimbra.soap.mail.type.PendingFolderModifications in project zm-mailbox by Zimbra.
the class ImapServerListener method notifyAccountChange.
public void notifyAccountChange(AccountWithModifications accInfo) {
ConcurrentHashMap<Integer, Set<ImapRemoteSession>> foldersToSessions = sessionMap.get(accInfo.getId());
if (foldersToSessions != null && !foldersToSessions.isEmpty()) {
Collection<PendingFolderModifications> mods = accInfo.getPendingFolderModifications();
if (mods != null && !mods.isEmpty()) {
for (PendingFolderModifications folderMods : mods) {
Integer folderId = folderMods.getFolderId();
PendingRemoteModifications remoteMods = PendingRemoteModifications.fromSOAP(folderMods, folderId, accInfo.getId());
Set<ImapRemoteSession> listeners = foldersToSessions.get(folderId);
if (listeners != null) {
for (ImapRemoteSession l : listeners) {
l.notifyPendingChanges(remoteMods, accInfo.getLastChangeId(), null);
}
}
}
}
}
}
Aggregations