Ok great, I added it to http://jira.xwiki.org/browse/XCOMMONS-1027 so
that we don't forget.

On Tue, Jul 26, 2016 at 6:47 PM, Claude Brisson <[email protected]> wrote:
> Thanks for your votes.
>
> Regarding your suggestions:
>
>  - velocity 2.0 will also go a little bit further than string -> enum, as it
> will try to convert method arguments between all basic Java data types
> (boolean, number, string).
>  - it does this via a pluggable ConversionHandler that can easily be
> extended, see [1]
>  - I've added a public VelMethod.getMethod() getter, so it should be easier
> to access methods
>
> [1]
> http://velocity.apache.org/engine/devel/developer-guide.html#method-arguments-conversions
>
>
>   Claude
>
>
> On 22/07/2016 09:52, Thomas Mortagne wrote:
>>
>> On Thu, Jul 21, 2016 at 5:26 PM, Claude Brisson <[email protected]>
>> wrote:
>>>
>>> Hi.
>>>
>>> I'm currently working on Velocity 2.0 packaging.
>>
>> Great news :)
>>
>>> If that's OK with you, I would like to incorporate
>>> DeprecatedCheckUberspector.java into Velocity, but I need a statement
>>> from
>>> your part to be able to change its licence to Apache 2.0 (LGPL and Apache
>>> 2.0 licences aren't compatible).
>>
>> +1 for me
>>
>>> By the way, I take this opportunity to tell you that if there is another
>>> specific part of xwiki-commons-velocity that you think should be
>>> integrated
>>> on our side, or an important missing feature you'd like to insist on,
>>> don't
>>> hesitate. I already integrated VELOCITY-825, for instance, so
>>> String->Enum
>>> constant conversions are now handled by Velocity. There may be other
>>> important conversion cases you'd like to see handled.
>>
>> Note that XWiki goes far beyond String->Enum. When the signature of a
>> method cannot be found it search for method with similar number of
>> arguments and use xwiki-commons-properties module (similar to apache
>> beanutils) to try to convert the parameter it gets into the types of
>> the method parameters. We are using this a lot so it would probably be
>> a nice to have in Velocity (probably something based on beanutils that
>> could be extended on our side to use all xwiki-commons-properties
>> supported types). See
>>
>> https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/MethodArgumentsUberspector.java.
>>
>> Maybe it's not the case in Velocity 2.0 anymore, but restriction on
>> Class methods access is way too strong in 1.7 so we overwritten secure
>> introspector to accept more calls. See
>>
>> https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/SecureIntrospector.java.
>>
>> We implemented a directives based try/catch support for Velocity
>> recently. We don't use it much yet (too young) but we probably will.
>> Could be interesting on Velocity side. See
>>
>> https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/introspection/TryCatchDirective.java.
>>
>>> Regards,
>>>
>>>    Claude
>>>
>>> _______________________________________________
>>> devs mailing list
>>> [email protected]
>>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>>
>>
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to