Search in sources :

Example 21 with Flags

use of com.zimbra.cs.mailclient.imap.Flags in project zm-mailbox by Zimbra.

the class ImapFolderSync method updateImapTrashFolderId.

private void updateImapTrashFolderId(ListData ld) throws ServiceException {
    Flags flags = ld.getFlags();
    if (flags.isSet("\\Trash") && ds.getImapTrashFolderId() != localFolder.getId()) {
        Map<String, Object> attrs = new HashMap<String, Object>();
        attrs.put(Provisioning.A_zimbraDataSourceImapTrashFolderId, localFolder.getId());
        ds.getProvisioning().modifyDataSource(ds.getAccount(), ds.getId(), attrs);
    }
}
Also used : HashMap(java.util.HashMap) Flags(com.zimbra.cs.mailclient.imap.Flags)

Aggregations

Flags (com.zimbra.cs.mailclient.imap.Flags)21 Test (org.junit.Test)14 Date (java.sql.Date)13 Literal (com.zimbra.cs.mailclient.imap.Literal)12 CommandFailedException (com.zimbra.cs.mailclient.CommandFailedException)10 MessageData (com.zimbra.cs.mailclient.imap.MessageData)5 AppendResult (com.zimbra.cs.mailclient.imap.AppendResult)4 ImapRequest (com.zimbra.cs.mailclient.imap.ImapRequest)4 ImapResponse (com.zimbra.cs.mailclient.imap.ImapResponse)4 MailboxInfo (com.zimbra.cs.mailclient.imap.MailboxInfo)4 ServiceException (com.zimbra.common.service.ServiceException)3 IOException (java.io.IOException)3 ZFolder (com.zimbra.client.ZFolder)2 ZMailbox (com.zimbra.client.ZMailbox)2 ZTag (com.zimbra.client.ZTag)2 ResponseHandler (com.zimbra.cs.mailclient.imap.ResponseHandler)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 Body (com.zimbra.cs.mailclient.imap.Body)1 FetchResponseHandler (com.zimbra.cs.mailclient.imap.FetchResponseHandler)1 MailboxName (com.zimbra.cs.mailclient.imap.MailboxName)1