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

Eric Norman commented on SLING-10740:
-------------------------------------

PR #27 contains the proposed changes to the JCR repoinit implementation for 
review and feedback

NOTE: These changes also require the changes from 
[apache/sling-org-apache-sling-repoinit-parser#19|https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/19]
 before it can be compiled and tested.
 

> Repoinit create path statement fails for node types with a mandatory property
> -----------------------------------------------------------------------------
>
>                 Key: SLING-10740
>                 URL: https://issues.apache.org/jira/browse/SLING-10740
>             Project: Sling
>          Issue Type: Bug
>          Components: Repoinit
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>            Priority: Major
>             Fix For: Repoinit Parser 1.6.16, Repoinit JCR 1.1.40
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The processing of the "create path" statement calls save() at the end which 
> will cause a constraint violation if the nodetype of the created path 
> contains any properties that are declared as mandatory (and not autocreated). 
>  No processing of "set properties" statements happens before the save() call 
> in AclVisitor#visitCreatePath so it does not seem to be possible to define 
> any mandatory properties using the current repoinit grammar.
> I could see this solved in a couple ways:
>  # The AclVisitor#visitCreatePath could possibly pre-process any "set 
> properties" statements that are applicable to the created path before calling 
> save and then skip those same items when NodePropertiesVisitor visits the 
> same.
>  # Or, the "create path" grammar could be extended to allow defining 
> properties to be set at the same time as the create (with a syntax that is 
> similar to the "set properties" statement?)
>  # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary?  
> I'm not sure of the historical reasons why save() is done there.
>  # Or, maybe something else I haven't thought of
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to