kwin commented on issue #2: SLING-8375 - Allow import if data contains 
protected properties
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-contentloader/pull/2#issuecomment-493159539
 
 
   @ncautotest IIUC at the point where you try to set properties the node(and 
by that also the underlying node definition) is already there, so you can check 
if a property can be set via 
[`NodeType.canSetProperty()`](https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/nodetype/NodeType.html#canSetProperty(java.lang.String,%20javax.jcr.Value)).
 That way you prevent relying on an exception. Unfortunately the return value 
doesn't say anything about they why (i.e. property is protected or nodetype 
just allows certain property names). I am wondering if the 
`ConstraintViolatinException` is already thrown when you try to set the 
property or only once you save the session?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to