You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@gmail.com> on 2015/10/15 11:15:25 UTC

NoSQL generic adapter - why is it disallowed to change the root resource?

Hi,

Playing around with the nosql launchpad + MongoDB I noticed that I
can't change the root resource:

- the properties value map for the root resource is an immutable one [0]
- the commit method denies access to the root path [1]

Why is this done? I would imagine that mounting the NoSQL resource
provider at the root would make changing the root resource quite
useful.

Thanks,

Robert

[0]: https://github.com/apache/sling/blob/fc72646c764099570162573afe0192f9aa4837d2/contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/resource/impl/NoSqlResourceProvider.java#L56
[1]: https://github.com/apache/sling/blob/fc72646c764099570162573afe0192f9aa4837d2/contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/resource/impl/NoSqlResourceProvider.java#L199-L200

-- 
http://robert.muntea.nu/

Re: NoSQL generic adapter - why is it disallowed to change the root resource?

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, 2015-10-15 at 12:08 +0200, Stefan Seifert wrote:
> hello robert.
> 
> i thought it would be never useful to write data into the root
> resource itself, but this is perhaps a misunderstanding or just not
> correct.
> if this is feasible and supported in JCR as well we should create an
> issue for it and change it.

It is indeed possible with JCR to modify properties on the root node.

SLING-5151: NoSQL: allow modifying the root resource
https://issues.apache.org/jira/browse/SLING-5151

Robert


> 
> stefan
> 
> 
> > -----Original Message-----
> > From: Robert Munteanu [mailto:robert.munteanu@gmail.com]
> > Sent: Thursday, October 15, 2015 11:15 AM
> > To: dev@sling.apache.org
> > Subject: NoSQL generic adapter - why is it disallowed to change the
> > root
> > resource?
> > 
> > Hi,
> > 
> > Playing around with the nosql launchpad + MongoDB I noticed that I
> > can't change the root resource:
> > 
> > - the properties value map for the root resource is an immutable
> > one [0]
> > - the commit method denies access to the root path [1]
> > 
> > Why is this done? I would imagine that mounting the NoSQL resource
> > provider at the root would make changing the root resource quite
> > useful.
> > 
> > Thanks,
> > 
> > Robert
> > 
> > [0]:
> > https://github.com/apache/sling/blob/fc72646c764099570162573afe0192
> > f9aa4837d2/
> > contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/
> > resource/im
> > pl/NoSqlResourceProvider.java#L56
> > [1]:
> > https://github.com/apache/sling/blob/fc72646c764099570162573afe0192
> > f9aa4837d2/
> > contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/
> > resource/im
> > pl/NoSqlResourceProvider.java#L199-L200
> > 
> > --
> > http://robert.muntea.nu/


RE: NoSQL generic adapter - why is it disallowed to change the root resource?

Posted by Stefan Seifert <ss...@pro-vision.de>.
hello robert.

i thought it would be never useful to write data into the root resource itself, but this is perhaps a misunderstanding or just not correct.
if this is feasible and supported in JCR as well we should create an issue for it and change it.

stefan


>-----Original Message-----
>From: Robert Munteanu [mailto:robert.munteanu@gmail.com]
>Sent: Thursday, October 15, 2015 11:15 AM
>To: dev@sling.apache.org
>Subject: NoSQL generic adapter - why is it disallowed to change the root
>resource?
>
>Hi,
>
>Playing around with the nosql launchpad + MongoDB I noticed that I
>can't change the root resource:
>
>- the properties value map for the root resource is an immutable one [0]
>- the commit method denies access to the root path [1]
>
>Why is this done? I would imagine that mounting the NoSQL resource
>provider at the root would make changing the root resource quite
>useful.
>
>Thanks,
>
>Robert
>
>[0]:
>https://github.com/apache/sling/blob/fc72646c764099570162573afe0192f9aa4837d2/
>contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/resource/im
>pl/NoSqlResourceProvider.java#L56
>[1]:
>https://github.com/apache/sling/blob/fc72646c764099570162573afe0192f9aa4837d2/
>contrib/nosql/generic/src/main/java/org/apache/sling/nosql/generic/resource/im
>pl/NoSqlResourceProvider.java#L199-L200
>
>--
>http://robert.muntea.nu/