[
https://issues.apache.org/jira/browse/SLING-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13581851#comment-13581851
]
Ian Boston commented on SLING-2477:
-----------------------------------
Either approach is possible. As you say {.*} has the advantage of being safer
from a migration pov, assuming {.*} is not confused somewhere in jcr for a
namespace. (I checked with curl and no problems seen)
Putting the information in the property name has the drawback that multiple
properties can exist with different types, and there is potential to confuse a
novice configurer who might think they are 3 properties rather than one, not
realising the significance of the {.*}
eg
service.ranking
service.ranking{int}
service.ranking{long}
Would need to know which one to use and what to do. Options include:
a) If more than one exists, throw an exception of some form.
b) use the most specific, in the example above that might be {long}.
> 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
>
> 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