commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [id] Review before 1.0 (Summary)
Date Mon, 16 Jan 2006 08:40:57 GMT
Hi Phil,

Phil Steitz wrote on Monday, January 16, 2006 1:31 AM:

> On 1/15/06, Jörg Schaible <joerg.schaible@gmx.de> wrote:
>> Phil Steitz wrote:
>> 
>>> On 1/14/06, Michael Heuer <heuermh@acm.org> wrote:
>>>> 
>>>> Jörg Schaible wrote:
>>>> 
>>>>> 8/ Prefix generators
>>>>> 
>>>>> We have 3 generators, that add a prefix to the generated id. All 3
>>>>> classes to mainly the same for 3 different
>>>>> StringIdentifierGenerators. 
>>>>> 
>>>>> Proposal: Since we have a lot more
> StringIdentifierGenrators (e.g. the
>>>>> UUIDIdentifierGenerators a StringIdentifiers too), I would
>>>>> refactore this 3 classes into a wrapper in a separate package
>>>>> o.a.c.id.wrapper and delegate
>>> 
>>>>> to an arbitrary StringIdentifierGenerator implementation:
>>>>> 
>>>>> class PrefixStringIdentifierGenerator implements
>>>>> StringIdentifierGenerator {
>>>>> 
> PrefixStringIdentifierGenerator(StringIdentifierGenerator
>>>>>         delegee) {
>>>>>                 this.delegee = delegee;
>>>>>         }
>>>>>         ...
>>>>> }
>>>> 
>>>> How about a single class
> CompoundStringIdentifierGenerator that can use
>>>> the delegate as any one of prefix, middle, postfix?
>>>> 
>>> 
>>> +1 - I think we discussed something like this before. More
>>> generally, we could support arbitrary concatenations using an API
>>> like o.a.c.Collections.ChainedTransformer
>>> 
>> 
> <http://jakarta.apache.org/commons/collections/api-release/org
/apache/commons/collections/functors/ChainedTransformer.html>
>> 
>> OK, I'll have a look.
> 
> Assuming you and others are OK with this approach, I will pick up the
> implementation and test cases, or review / commit patches.

OK. I push this to the end of my TODO list and we'll see who has first more time ...

>>>> And may I add
>>>> 
>>>> 10/ Serial generators implement Serializable?
>>> 
>>> +1
>> 
>> Good idea. Most of the generators could implement it.
> 
> I will handle this as well, or review / commit patches as
> they come in.

Since this is quite trivial, I would commit directly if you don't mind. A unit test ensuring
the serialisation capability will exist though.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message