[Hippo-cms7-user] listing plugins attribute modifiers

Ard Schrijvers a.schrijvers at onehippo.com
Tue Sep 21 11:46:57 CEST 2010


On Tue, Sep 21, 2010 at 11:32 AM, Frank van Lankvelt
<f.vanlankvelt at onehippo.com> wrote:
>> > in the process of adding translation support to the CMS, I've found that
>> > the
>> > list attribute modifiers have been constructed somewhat unlucky.
>> > The method IListAttributeModifier#getColumnAttributeModifiers takes a
>> > model
>> > as it's argument, but this does not make sense for a column modifier.
>> > Indeed, in none of the implementations in the CMS is this argument taken
>> > into account.  So, I would like to remove it.
>> Why not deprecate it first, or is this what you are planning to do so?
>
> this concerns an SPI instead of an API.  So it is an interface that should
> be implemented by clients of listcolumn & friends.  As such, it doesn't make
> a lot of sense to deprecate a method and add a new one; clients will have to
> modify their implementation anyway.

Indeed in case of an interface deprecating is not an option, what was
I thinking :)

> So probably the better solution is to depend on a base class instead of an
> interface.  Then it _is_ possible to deprecate methods in the base class and
> retain backwards compatibility (for some time).
> Shall I simply deprecate the IListAttributeModifier, keeping it unchanged,
> and introduce a new AbstractListAttributeModifier?  The listcolumn can then
> invoke the methods on the abstract base class when it is used and fall back
> to the old interface when dealing with old clients.

Custom code implementing the IListAttributeModifier then still needs
modifications. I am not sure what is the best option.

Regards Ard

> thanks, Frank
>>
>> Regards Ard
>>
>> > Many of the modifiers actually descend from the
>> > AbstractNodeAttributeModifier, and it is possible to modify that in such
>> > a
>> > way that subclasses that override either the getColumnAttributeModifiers
>> > method or the getColumnAttributeModifier method will still be
>> > compatible.
>> > Any comments?
>> > cheesr, Frank
>> >
>> > --
>> > Hippo
>> > Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
>> > 522
>> > 4466
>> > USA  • San Fransisco  185 H Street Suite B  •  Petaluma CA 94952-5100 •
>> >  +1
>> > (707) 773 4646
>> > Canada    •   Montréal  5369 Boulevard St-Laurent  •  Montréal QC H2T
>> > 1S5  •
>> >  +1 (514) 316 8966
>> > www.onehippo.com  •  www.onehippo.org  •  info at onehippo.com
>> >
>> >
>> >
>> > _______________________________________________
>> > Hippo-cms7-user mailing list and forums
>> > http://www.onehippo.org/cms7/support/forums.html
>> >
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
> --
> Hippo
> Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20 522
> 4466
> USA  • San Fransisco  185 H Street Suite B  •  Petaluma CA 94952-5100 •  +1
> (707) 773 4646
> Canada    •   Montréal  5369 Boulevard St-Laurent  •  Montréal QC H2T 1S5  •
>  +1 (514) 316 8966
> www.onehippo.com  •  www.onehippo.org  •  info at onehippo.com
>
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
>



More information about the Hippo-cms7-user mailing list