@DisallowConcurrentExecution public class MailFilterJob extends AbstractFaxToMailJob
| Modifier and Type | Field and Description |
|---|---|
protected FaxToMailApplicationContext |
applicationContext |
protected ClientService |
clientService |
protected FaxToMailConfiguration |
config |
protected ConfigurationService |
configurationService |
protected DecoratorService |
decoratorService |
protected EmailService |
emailService |
protected MailFolderService |
mailFolderService |
APPLICATION_CONTEXT| Constructor and Description |
|---|
MailFilterJob() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkEmails(EmailAccount account)
Checks the emails of the account
|
protected void |
checkEmailsOfFolder(EmailAccount emailAccount,
javax.mail.Folder folder)
Check the emails of teh folder, create the emails in the database and delete the email in the folder.
|
protected void |
close(javax.mail.Folder folder) |
protected Attachment |
convertHTMLToPdf(List<Attachment> attachments,
String content,
String name)
Convert html content to image.
|
protected Attachment |
convertIfNecessary(Attachment attachment)
Retourne un input stream sur une piece jointe convertie ou pas.
|
protected Attachment |
convertTextToPdf(String content,
String name) |
protected Attachment |
convertToPdf(Attachment attachment,
ExtensionCommand extensionCommand)
Convert attachment to pdf.
|
protected String |
decomposeMultipartEmail(List<Attachment> attachments,
javax.mail.Part part,
Email email,
EmailService emailService)
Decompose a multipart part.
|
protected void |
deleteMail(javax.mail.Message message)
Supprime le mail sur le serveur (si nécéssaire).
|
void |
execute(org.quartz.JobExecutionContext jobExecutionContext) |
getApplicationContextprotected FaxToMailApplicationContext applicationContext
protected FaxToMailConfiguration config
protected ConfigurationService configurationService
protected EmailService emailService
protected MailFolderService mailFolderService
protected ClientService clientService
protected DecoratorService decoratorService
public void execute(org.quartz.JobExecutionContext jobExecutionContext)
throws org.quartz.JobExecutionException
org.quartz.JobExecutionExceptionpublic void checkEmails(EmailAccount account)
account - protected void close(javax.mail.Folder folder)
protected void checkEmailsOfFolder(EmailAccount emailAccount, javax.mail.Folder folder)
emailAccount - email account currently checkedfolder - the folder to checkprotected void deleteMail(javax.mail.Message message)
throws javax.mail.MessagingException
message - message to deletejavax.mail.MessagingExceptionprotected String decomposeMultipartEmail(List<Attachment> attachments, javax.mail.Part part, Email email, EmailService emailService) throws Exception
part - the part to decomposeemail - the email object to fill with the attachments or contentemailService - email serviceExceptionprotected Attachment convertIfNecessary(Attachment attachment) throws IOException
attachment - to convertIOExceptionprotected Attachment convertToPdf(Attachment attachment, ExtensionCommand extensionCommand) throws IOException
attachment - attachment to convertextensionCommand - commandIOExceptionprotected Attachment convertTextToPdf(String content, String name) throws IOException, com.itextpdf.text.DocumentException
IOExceptioncom.itextpdf.text.DocumentExceptionprotected Attachment convertHTMLToPdf(List<Attachment> attachments, String content, String name) throws IOException
attachments - attachment content to link content tocontent - html contentname - result attachment namenull if content can't be convertedIOExceptionCopyright © 2014 CodeLutin. All rights reserved.