> We already have code for doing that "our" way. Currently that code is
> embedded within the XMLResources and SQLResources classes (the latter will
> likely become a subclass of the former at some point). You can find usage
> examples in Mark Imel's mailing list manager.
Where can I find XMLResources and Mark Imel's mlm?
> What I would suggest is that
> the replacement code be refactoed into a more generic utility class.
Awesome, what do you think about the following classes for
org.apache.james.util:
ParameterParser - actually does the variable substitution based on the context
ParameterContext - interface, implementers provide specific lookup of parameters
MailParameterContext - implementer, matches parameters from Mail objects
Code in mailet would look like:
ParameterParser p = new ParameterParser(new MailParameterContext(mail));
p.parse("Message contains the virus(es) ${attribute.viruses}.");
Josh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]