continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin van den Bemt <mll...@mvdb.net>
Subject Mail notification templates override
Date Fri, 13 Jun 2008 13:57:09 GMT
Hi everyone,

Before I start sending patches that get rejected, I thought it was best to discuss this on
the list
first.
The mail template are in continuum-core, which means that if you want to customize continuum,
you
need to start maintaining a separate patch / source tree for this specifically or perform
some
really nasty magic to override them.

Currently in MailContinuumNotifier.java the location is constructed based on these commands
:

String packageName = getClass().getPackage().getName().replace( '.', '/' );
String templateName = packageName + "/templates/" + project.getExecutorId() + "/" + source
+ ".vm";

The simplest solution is to first check if there is a custom template eg
String templateName = "custom/" + packageName + "/templates/" + project.getExecutorId() +
"/" +
source + ".vm";

if that exists use that, if not, use the default.. Maybe not the best solution (like make
it
configurable through the webinterface), but it is simple and low cost and just makes it possible
to
override without touching any continuum modules.

Thoughts ?

Mvgr,
Martin

Mime
View raw message