"alex.guizar(a)jboss.com" wrote : Examples cannot be produced at this point
because the syntax and the design have not been agreed upon.
|
i'm pushing for examples in the example test code exactly because that improves the
discussion on the syntax. you work out examples from simple to complex. then we can
review.
"alex.guizar(a)jboss.com" wrote : Unlike other activities email has more complex
setup and more moving parts. Let us focus on making the design decisions first.
|
ok. but i think that should be trivial :-)
"alex.guizar(a)jboss.com" wrote : There are two concepts in play.
| * mail template describes the contents of an email
| * mail producer takes a template as input and produces a template as output
|
i think that is already too complex. this is splitting up our implementation to introduce
some kind of user pluggability in the middle of our implementation.
check out my alternative MailSession:
interface MailSession {
| Mail createMail();
| Mail createMail(String templateName);
| }
|
| interface Mail {
| Mail setTo(String to);
| Mail setCC(String cc);
| Mail setBCC(String bcc);
| Mail setSubject(String subject);
| Mail setBody(String subject);
| Mail addAttachment(String name, InputStream attachment, String mimeType);
|
| void send();
| }
building that implementation should be the basis. this exposes all the functionality that
we want to build on top of JavaMail. this implementation can be leveraged by 1) our mail
activity and event-listener 2) task notify and reminder 3) users that want to build custom
mail activities programatically.
i don't think it needs to be more complex then that.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225802#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...