OK. Just to be sure, the only function of the interface would be: List<Locale> getLocales()
The element instance should be given to the ctor or the factory.

I think this method is better:

public List<Locale> getLocales(ElementSupport element)

Since it should not store the element instance in the LocaleProvider instance. The instance will be constructor through IoC and the element instance is not known in that context. It's also much more appropriate since the element instance changes at each request, and otherwise you'd have to create a new LocaleProvider instance for each request.

What about no interface but an abstract class?

Why? Abstract classes should only be used if interfaces are not sufficient and some important common logic should be enforced or be available. It's much better to code against interfaces.

Best regards,

Geert

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to