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 <romb...@apache.org>
> 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
> > 
> > 

Reply via email to