com.jurismarches.vradi.services
Class MailingServiceImpl

java.lang.Object
  extended by com.jurismarches.vradi.services.MailingServiceImpl
All Implemented Interfaces:
MailingService

public class MailingServiceImpl
extends Object
implements MailingService

Author:
morin

Field Summary
protected  ClientManager clientManager
           
protected  FormManager formManager
           
protected  FormTypeManager formTypeManager
           
protected  Timer mailCronTask
          Mail cron task to check mails every 10 minutes.
protected  MailingManager mailingManager
           
protected  org.sharengo.wikitty.WikittyProxy proxy
           
protected  SearchManager searchManager
           
protected  ThesaurusManager thesaurusManager
           
 
Constructor Summary
MailingServiceImpl()
           
 
Method Summary
 List<File> generateFilledDocumentInPDF(File template, List<Form> forms, Map<String,String> fieldBindings)
          Generate offer PDF form given forms with specified template.
 List<File> generateFilledDocumentInPDF(File template, List<Form> forms, Map<String,String> fieldBindings, boolean replace)
          Generate offer PDF form given forms with specified template.
protected  File generateFilledDocumentInPDF(TemplateManager templateManager, Form form, Map<String,String[]> fieldBindings, boolean replace)
          Generate a single pdf file for specified form.
 String[] getDocumentFields(File template)
          Get template document fields names.
 void receiveMessages()
           
 Sending sendMessage(Sending sending, String sessionParagraph)
           
 Sending sendMessage(Sending sending, String sessionParagraph, String email)
           
 Session sendMessages(Session session, List<Sending> sendings)
           
 Session stopSentMail(Session session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

protected org.sharengo.wikitty.WikittyProxy proxy

thesaurusManager

protected ThesaurusManager thesaurusManager

formManager

protected FormManager formManager

formTypeManager

protected FormTypeManager formTypeManager

clientManager

protected ClientManager clientManager

searchManager

protected SearchManager searchManager

mailingManager

protected MailingManager mailingManager

mailCronTask

protected Timer mailCronTask
Mail cron task to check mails every 10 minutes.

Constructor Detail

MailingServiceImpl

public MailingServiceImpl()
Method Detail

getDocumentFields

public String[] getDocumentFields(File template)
                           throws VradiException
Description copied from interface: MailingService
Get template document fields names.

Specified by:
getDocumentFields in interface MailingService
Parameters:
template - template file
Returns:
field names
Throws:
VradiException

generateFilledDocumentInPDF

public List<File> generateFilledDocumentInPDF(File template,
                                              List<Form> forms,
                                              Map<String,String> fieldBindings)
                                       throws VradiException
Description copied from interface: MailingService
Generate offer PDF form given forms with specified template.

Specified by:
generateFilledDocumentInPDF in interface MailingService
Parameters:
template - template to use to generate PDF
forms - to to generate
fieldBindings - map between template field name and form fields names
Returns:
generated pdf files
Throws:
VradiException

generateFilledDocumentInPDF

public List<File> generateFilledDocumentInPDF(File template,
                                              List<Form> forms,
                                              Map<String,String> fieldBindings,
                                              boolean replace)
                                       throws VradiException
Description copied from interface: MailingService
Generate offer PDF form given forms with specified template.

Specified by:
generateFilledDocumentInPDF in interface MailingService
Parameters:
template - template to use to generate PDF
forms - to to generate
fieldBindings - map between template field name and form fields names
replace - replace already existing generated forms
Returns:
generated pdf files
Throws:
VradiException

generateFilledDocumentInPDF

protected File generateFilledDocumentInPDF(TemplateManager templateManager,
                                           Form form,
                                           Map<String,String[]> fieldBindings,
                                           boolean replace)
                                    throws VradiException
Generate a single pdf file for specified form.

Parameters:
templateManager - pdf template manager
form - form to get pdf
fieldBindings - association between field name and form fields (couple extension name, extenstion field)
replace - replace already existing pdf
Returns:
the pdf file associated with pdf
Throws:
VradiException

sendMessages

public Session sendMessages(Session session,
                            List<Sending> sendings)
                     throws VradiException
Specified by:
sendMessages in interface MailingService
Throws:
VradiException

sendMessage

public Sending sendMessage(Sending sending,
                           String sessionParagraph)
                    throws VradiException
Specified by:
sendMessage in interface MailingService
Throws:
VradiException

sendMessage

public Sending sendMessage(Sending sending,
                           String sessionParagraph,
                           String email)
                    throws VradiException
Specified by:
sendMessage in interface MailingService
Throws:
VradiException

receiveMessages

public void receiveMessages()
                     throws VradiException
Specified by:
receiveMessages in interface MailingService
Throws:
VradiException

stopSentMail

public Session stopSentMail(Session session)
                     throws VradiException
Specified by:
stopSentMail in interface MailingService
Throws:
VradiException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.