Details
Description
Add a way to add builders to the BuilderDirector so that users can make their own builders.
From the users list:
It's the GOF's Builder pattern http://en.wikipedia.org/wiki/Builder_pattern
First you need to implement this interface: org.trails.builder.Builder
It should as simple as:
public class InvoiceBuilder implements Builder<Invoice>
{
public Invoice build()
{ Invoice invoice = new Invoice(); // modify your invoice here return invoice; }}
Then (this is the part that's missing in Trails 1.2) add your builder
to the BuilderDirector.
builderDirector.add(org.trails.demo.Invoice.class, new
InvoiceBuilder()); or something like this but using spring.
fixed for both versions 1.2.2 and 2.0 in rev 1071 and 1072 respectively