[ 
https://issues.apache.org/jira/browse/SLING-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13587091#comment-13587091
 ] 

Justin Edelson commented on SLING-2477:
---------------------------------------

I completely agree with Alex and I really don't understand the rationale for 
*not* using the name{type} notation.

@Felix - Do you really think that anyone is going to think that foo{short} is 
somehow saying that the name "foo" is a short.

@Carsten - While writeback is a useful tool, we also need to recognize that 
sling:OsgiConfig nodes are frequently edited by hand in an offline form, not 
via writeback. This is especially true in complex environments with multiple 
runmodes where clarity is especially important.

The file format used by Felix's ConfigAdmin is a (AFAIK undocumented) 
implementation detail of Felix's ConfigAdmin and IMHO exposing it in SLING-1971 
was a mistake (but a necessary mistake given that writeback was already a work 
in progress). It would be a shame to continue down that path for the sake of 
consistency.

We should implement the approach originally suggested by Alex then deprecate 
and eventually remove support for .config files.
                
> Configuration via sling:OsgiConfig nodes does not support all types
> -------------------------------------------------------------------
>
>                 Key: SLING-2477
>                 URL: https://issues.apache.org/jira/browse/SLING-2477
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: JCR Installer 3.1.2
>            Reporter: Alexander Klimetschek
>            Assignee: Ian Boston
>         Attachments: SLING-2477.patch
>
>
> Most notably, the common "service.ranking" needs to be an Integer, while the 
> jcr property mapping only allows for "Long" types at the moment. The problem 
> is that JCR has a smaller set of property types than the OSGi config admin 
> (JCR: String, Boolean, Long, Double, Decimal; OSGi: String, Boolean, Long, 
> Integer, Float, Double, and probably more differences...).
> Similarly to properties files (which do it in the value like 
> 'service.ranking=I"-10000"' with I=Integer), there must be a way to 
> explicitly specify the type regardless of the JCR type. For example, encoding 
> it in the property name like "service.ranking{int}".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to