admin@glassfish.java.net

Re: camelCaseName

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Tue, 18 May 2010 20:03:27 -0700

On 5/18/10 7:49 PM, Bill Shannon wrote:
> Jason Lee wrote on 05/18/2010 06:49 PM:
>> On 5/18/10 2:23 PM, Bill Shannon wrote:
>>> camelCaseName attribute? Looking forward to your writeup of the issues
>>> and decision after our last meeting on this subject...
>> Ask and ye shall receive:
>> http://wiki.glassfish.java.net/Wiki.jsp?page=3.1RestApiCamelCaseNames :)
>
> Thank you!
>
> 95% of the time, aren't we going to see things like
>
> @Param(name="optionname", camelCaseName="optionName")
>
> Wouldn't it be better and simpler to have the command processing
> code just convert all the names to all lower case, or just ignore
> case when matching option names?
See below
>
> You have an example in 3.2 where the name and the camelCaseName
> aren't the same (ignoring case). Is that really important?
yes, if you want the REST POST (delegated to a create command) method to
pass a param name which is the same as in the PUT (update configbeans)
method.
The other option is to rename the configbeans attr name, but I guess
this would cause more trouble down the line, no?

>
> A feature I intend to add for other reasons is an "alias" for
> an option, e.g.,
>
> @Param(name="node", alias="nodeagent")
>
> Would that be sufficient for the few cases where more than one
> name is needed for an option?
yes, if the alias is case sensitive (and good case is entered) and we
can get camelcase.
If not, how an algorithm can compute nodeAgent from "node" or "nodeagent"?
I can have such algo from "node-agent", but not from lower case names...
Ludo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>