Steve Cohen wrote:

Antoine: OK, I've taken a look. Here is the problem, or maybe I don't understand EnumeratedAttribute fully.

In response to a suggestion of Steve Loughran the other day, I've implemented all of my new attributes with the convention that a value of "" means "Don't set the attribute - leave the default value in place". This was to accomodate Steve's suggestion of wanting property-file driven scripts.

Such a script would define
<property name="timestampGranularity" value=""/>
An optional property file could define

timestampGranularity=MINUTE

or

timestampGranularity=NONE.

If neither specified, the default to be used (whose value varies depending on the chosen action).

I'm having difficulty understanding how this convention would fit into the pattern of EnumeratedAttribute. There may be such a way that I'm just not understanding. I'm still open to whatever suggestions you might have on this score or alternative ideas to improve this code.

Hello Steve,

in this case, you can say that "" == TIMESTAMPGRANULARITY_DEFAULT
and document that DEFAULT is different depending upon the action put or get ?


Cheers,

Antoine


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to