samedi 5 août 2017

which design pattern to implement

I am trying to build a standalone application which will send different types of reports via emails. I am not sure which design pattern I should be using, I can discuss about my usecase.

I will have N number of jobs running via a scheduler. Each job corresponds/maps to/would have

  1. one velocity template
  2. A set of email attributes (to, subject, from, body ( which is the velocity template)

Based on the job which is executing,

    1. I need to pick up a velocity template 
    2. Pass it to the velocity engine to populate the corresponding values needed for reporting.
    3. Identify the correct set of email attributes from the different list of attributes in my properties file

Currently i have this

validation.template.to=abc@xyz.com
validation.template.to.from=webmaster@xyz.com
validation.template.to.subject=Validation Report
validation.template.to.templateName=validation.vm


notification.template.to=abc123@xyz.com
notification.template.to.from=webmaster@xyz.com
notification.template.to.subject=Notification Report
notification.template.to.templateName=notification.vm

Aucun commentaire:

Enregistrer un commentaire