[ https://issues.apache.org/jira/browse/SLING-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615130#comment-13615130 ]
Alexander Klimetschek commented on SLING-2477: ---------------------------------------------- We are discussion a JCR optimized, user front-end format here, so I think there is no special reason why one should use the internal Felix Configuration Admin format as basis (which for sure is optimized for a) being a text file format and b) short value strings). Nobody on the Sling/JCR stack is supposed to look at those internal felix config files and convert them back and forth against the repository format... so these are two completely separate topics. The initial sling:OsgiConfig node type was designed completely separate from whatever the OSGi implementation would do and for a good reason. The property{int} style is not coming anywhere specific I think. There are three factors that make it up: * put type into property name so the value is not forced to be a string * this allows to use jcr LONG for integer, DOUBLE for float etc. and give better input editors in e.g. JCR browsers or when writing those values programmatically using the JCR API (*) * then use a readable & rememberable type name such as "byte", "int", "float" instead of X, I, F * as uncommon delimiter use curly braces {...} (we might want to add escaping in the form of "\{" and "\\" to be 100% safe) (*) before someone mentions that one could break the limits of those smaller types: the config node parser has to take care of those type checks anyway - in case of the string formats it has to do that as well, someone could exceed the limits of this data type there and additionally write garbage such as I"12this_is_not_a_number". > 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