Package io.jmix.imap.sync
Class ImapSynchronizer
java.lang.Object
io.jmix.imap.sync.ImapSynchronizer
- Direct Known Subclasses:
ImapFlaglessSynchronizer
-
Field Summary
Modifier and TypeFieldDescriptionprotected SystemAuthenticator
protected jakarta.persistence.EntityManager
protected ImapDataProvider
protected ImapHelper
protected ImapMessageSyncDataProvider
protected ImapOperations
protected ImapProperties
protected Metadata
protected TimeSource
protected org.springframework.transaction.support.TransactionTemplate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
close
(ImapMailBox mailBox, com.sun.mail.imap.IMAPFolder imapFolder) protected ImapMessage
createMessage
(com.sun.mail.imap.IMAPMessage msg, ImapFolder jmixFolder) protected void
handleExistingMessages
(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder folder, com.sun.mail.imap.IMAPFolder imapFolder) protected void
handleMissedMessages
(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> missedMessages) protected void
handleNewMessages
(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder jmixFolder, com.sun.mail.imap.IMAPFolder imapFolder) protected void
setAnswersFlag
(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> checkAnswers) protected void
setTransactionManager
(org.springframework.transaction.PlatformTransactionManager transactionManager) void
synchronize
(ImapMailBox imapMailBox) protected void
unsetCustomFlags
(jakarta.mail.Message msg)
-
Field Details
-
imapHelper
-
imapOperations
-
entityManager
protected jakarta.persistence.EntityManager entityManager -
imapProperties
-
authenticator
-
imapDataProvider
-
imapMessageSyncDataProvider
-
metadata
-
timeSource
-
transaction
protected org.springframework.transaction.support.TransactionTemplate transaction
-
-
Constructor Details
-
ImapSynchronizer
public ImapSynchronizer()
-
-
Method Details
-
setTransactionManager
@Autowired protected void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) -
synchronize
-
handleExistingMessages
protected void handleExistingMessages(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder folder, com.sun.mail.imap.IMAPFolder imapFolder) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
handleNewMessages
protected void handleNewMessages(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder jmixFolder, com.sun.mail.imap.IMAPFolder imapFolder) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
handleMissedMessages
protected void handleMissedMessages(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> missedMessages) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
setAnswersFlag
protected void setAnswersFlag(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> checkAnswers) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
close
-
createMessage
protected ImapMessage createMessage(com.sun.mail.imap.IMAPMessage msg, ImapFolder jmixFolder) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
unsetCustomFlags
protected void unsetCustomFlags(jakarta.mail.Message msg) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-