On Mar 28, 2006, at 9:47 AM, Antonio Petrelli wrote:
Actually Dimensions chooses from name, user role and channel, or
only name and user role,
Yes, I forgot about user role :-)
But what about adding an API that requires a generic Object key
parameter to support the 3rd dimension?
That would be fine! But to support also the 4th, the 5th... ;-)
Well, it can get pretty crazy. I think we should *at most* provide
support for the 3rd with an extensible object. If someone wants the
object to provide support for multiple dimensions then that's their
prerogative.
I'm not sure if the use case is common enough to make it part of
the core API. If not, could it be added to an extension?
I am wondering where it can be put... What do you think of that
"key provider" I wrote about in my last mail? You can change the
name if you like :-P
I like that in concept. I'm a big fan of plugin APIs that allow you
to do pretty much anything you want. I'm not sure what it would look
like in practice though. My thoughts, using the DefinitionsFactory
class as an example would be to add a method as such:
getDefinition(String name, Locale locale, Object key);
The "key" could be a KeyProvider interface or something like that,
depending on how it gets fleshed out. Now... if the use case of a
3rd or nth dimension is not common enough to include in the core API,
I wonder how hard it would be for you to extend DefinitionsFactory
with a KeyedDefinitionsFactory that provided the same method.
Ok, anyway "request.getLocale" is not enough...
I totally agree here. But remember our next milestone is to remove
the Servlet API dependencies anyway, so this will definitely be
changing one way or another.
Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]