Search in sources :

Example 1 with DataSourceManager

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;
}
Also used : DataSourceManager(com.zimbra.cs.datasource.DataSourceManager) Folder(com.zimbra.cs.mailbox.Folder)

Aggregations

DataSourceManager (com.zimbra.cs.datasource.DataSourceManager)1 Folder (com.zimbra.cs.mailbox.Folder)1