use of com.zimbra.cs.datasource.DataSourceManager in project zm-mailbox by Zimbra.
the class ImapSync method forceFullSync.
/*
* For ZDesktop, force a full sync of all folders if requested or INBOX
* not yet fully sync'd. For ZCS import we always do a full sync.
*/
private boolean forceFullSync() throws ServiceException {
if (!dataSource.isOffline()) {
// Always force full sync for ZCS import
return true;
}
DataSourceManager dsm = DataSourceManager.getInstance();
Folder inbox = dsm.getMailbox(dataSource).getFolderById(null, Mailbox.ID_FOLDER_INBOX);
return dsm.isSyncEnabled(dataSource, inbox) && getFolderSyncState(inbox.getId()) == null;
}
Aggregations