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

Bertrand Delacretaz commented on SLING-9171:
--------------------------------------------

Thank you for this! 

Trying to find a syntax that's close to what we already have, for example this:

{code}
set ACL on /libs,/apps
  allow jcr:read for user1,u-ser_2
  deny jcr:write for u-ser_2
end
{code}

I suggest the following for properties:

{code}
set properties on /pathA, /path/B
  set sling:ResourceType to /x/y/z
  set cq:allowedTemplates to /d/e/f/*, m/n/*
  set someInteger{Integer} to 42
  set someFlag{Boolean} to true
  set customSingleValueStringProp to test
  set customMultiValueStringProp to test1, test2
end
{code}

Using String as the default type, I think it's the most common.

I think the data types must be part of the grammar with a new 
propertyDataType() production, in order to fail early on invalid types. Looking 
at the JCR property types we might start with just {{String, Integer, Float, 
Boolean, Date}} with String as the default and a strict ISO format [1] for 
dates.

WDYT?

[1] 
https://jackrabbit.apache.org/api/trunk/org/apache/jackrabbit/util/ISO8601.html



> Support for settings properties on paths created via repoinit create path
> -------------------------------------------------------------------------
>
>                 Key: SLING-9171
>                 URL: https://issues.apache.org/jira/browse/SLING-9171
>             Project: Sling
>          Issue Type: Improvement
>          Components: Repoinit
>            Reporter: Nitin Gupta
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Apart from jcr:primaryType and mixin, there is a requirement to add custom 
> properties to the nodes valuemap via repoinit. This is a gap currently.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to