Hello Robert, I finally have time this week to work on those enhancements, required on our project. How does it work, should I create tickets in Sling Jira and put a comment saying that i'm trying to fix this?
I have a question regarding your previous answer: how will this work for new properties? For instance, if I want to import some JSON for new nodes containing a "jcr:created" property, those new nodes will not contain any property and therefore I won't be able to check if "jcr:created" is protected or not, am I right? I have started to look at the DefaultContentCreator class in the jcr contentloader, but any help would be useful. Best regards, Guillaume On Wed, Dec 21, 2016 at 1:08 PM, Robert Munteanu <[email protected]> wrote: > On Wed, 2016-12-21 at 12:30 +0100, Guillaume Lucazeau wrote: > > Hello Robert, > > > > Is it something that would be valuable to Sling itself, or should I > > try to > > do it just for my project? > > Enhancements to the content loader are more than welcome in Sling :-) > > > I couldn't find a list of all protected properties in Jackrabbit, do > > you > > know if there is one? Or maybe there is a way to dynamically know if > > a > > property is protected > > javax.jcr.Node#getProperties() will get you a list of properties > defined on a node, and then you can use > javax.jcr.Property#getDefinition() to retrieve its definition. Finally, > javax.jcr.nodetype.PropertyDefinition#isProtected() will let you know > if the property is protected. > > Robert > > > > > Thank you > > > > Regards, > > Guillaume > > > > On Sat, Dec 17, 2016 at 9:18 PM, Robert Munteanu <[email protected]> > > wrote: > > > > > Hi Guillaume, > > > > > > On Tue, 2016-11-29 at 18:36 +0100, Guillaume Lucazeau wrote: > > > > Hello, > > > > > > > > Currently when you get content through the json extension, it > > > > contains > > > > protected properties ("jcr:created", "jcr:createdBy") and > > > > permissions > > > > nodes. > > > > > > > > The protected properties prevent the JSON to be immediately > > > > reimported in > > > > another repository, and for what I see here [1] permissions are > > > > not > > > > handled > > > > by the content loader. > > > > > > > > Is there an easy way to configure the JSON servlet to return only > > > > content > > > > that can be imported again? Or do I have to override this servlet > > > > and > > > > filter/remove those properties myself? > > > > > > Maybe a better idea would be to enhance the content loader to skip > > > protected properties. Not sure about ACLs though, it seems like > > > they > > > should be handled by the content importer. > > > > > > Robert > > > > > > > > > > > Thank you, > > > > Guillaume > > > > > > > > [1] http://stackoverflow.com/a/21406709/1987781 > > > > > > > >
