hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject Re: Changes in 2.0 branch
Date Tue, 07 Nov 2006 14:49:44 GMT
Well, how about this for the configuration/contribution stuff?  We
introduce the concept of a ContributionTransformer (to borrow a term
from commons collections):

public interface ContributionTransformer
  public Object transform( List contributions );

Each configuration point can have a ContributionTransformer assigned
to it.  It uses this to transform its contributed objects into the
desired type.  The default one would just return the list of original
objects, but you can assign your own like this:

<configuration-point id="blah"

We could provide a couple of useful helper classes like
SingleContributionTransformer which merely returns the first item in
the list.  Also, we could do a MappedContributionTransformer which
transforms a list of MappedContribution objects (name/value pair
essentially) into a HashMap (or you can specify another Map subclass
if you like).  This would allow us to support single-value
configurations easier, because they wouldn't have a "container class."

On 11/7/06, Achim Hügen <> wrote:
> Hi,
> I've finished a short overview of the changes in the annotation branch:
> Have fun
> Achim

View raw message