+1 to pipeline.add(Project.class)

On Thu, Nov 1, 2012 at 9:03 AM, Bruno Oliveira <bruno@abstractj.org> wrote:
Good morning everyone! Lay out your costumes from halloween and let's talk about this jira (https://issues.jboss.org/browse/AEROGEAR-593).

Passos did a great work creating a builder for Pipes and of course we can improve it more and more, it's all about software. Currently to create a Pipe we must do it:

Pipeline pipeline  = new Pipeline(ROOT_URL);
pipeline.pipe().name("tasks").useClass(Task.class).buildAndAdd();
pipeline.pipe().name("tags").useClass(Tag.class).buildAndAdd();

Chatting with Matthias we agreed that would be better 2 alternatives:

Pipeline pipeline  = new Pipeline(ROOT_URL);
pipeline.add(Project.class).build();

Doing just this implicitly means that the name of the pipe will be "Project" and if you need 'extras':

Pipeline pipeline  = new Pipeline(ROOT_URL);
pipeline.add(Project.class).endpoint("foo").name("bar").auth(myAuthMod).build();

What do you guys think?


-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev