You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Justin Edelson <ju...@justinedelson.com> on 2012/05/15 18:23:20 UTC

Resource events using parent path for paths ending in /jcr:content

In JcrResourceListener, there's some code which strips off the
"jcr:content" path segment. This results in two events being produced with
the same path event property, but with different attributes, when, for
example, a file is uploaded. It seems like we should have some way (another
event property?) to differentiate between these two events. WDYT?

Justin

Re: Resource events using parent path for paths ending in /jcr:content

Posted by Justin Edelson <ju...@justinedelson.com>.
On Wed, May 16, 2012 at 2:44 AM, Carsten Ziegeler <cz...@apache.org>wrote:

> Hi,
>
> yes, this stripping is really annoying but required - otherwise
> downstream users would have to deal with the details of JCR. Are these
> two events triggered by the same observation call, so maybe we could
> combine them into a single event?
>

That's a good idea. I'd also like to see the jcr:content attribute names
prefixed with jcr:content in the event properties.

You can't not deal with the details of JCR sometimes :)

Justin


> Regards
> Carsten
>
> 2012/5/15 Justin Edelson <ju...@justinedelson.com>:
> > In JcrResourceListener, there's some code which strips off the
> > "jcr:content" path segment. This results in two events being produced
> with
> > the same path event property, but with different attributes, when, for
> > example, a file is uploaded. It seems like we should have some way
> (another
> > event property?) to differentiate between these two events. WDYT?
> >
> > Justin
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>

Re: Resource events using parent path for paths ending in /jcr:content

Posted by Carsten Ziegeler <cz...@apache.org>.
2012/5/16 Felix Meschberger <fm...@adobe.com>:
> Hi,
>
> Am 16.05.2012 um 08:44 schrieb Carsten Ziegeler:
>
>> Hi,
>>
>> yes, this stripping is really annoying but required - otherwise
>> downstream users would have to deal with the details of JCR. Are these
>> two events triggered by the same observation call, so maybe we could
>> combine them into a single event?
>
> Aren't they combined already ? If not, we should try to do it.
>
> On a related note: I wonder, whether we should not split the JcrResourceListener into a separate JCR2OSGi Event bridge bundle ?

As we're splitting the resource resolver/factory from the jcr bundle,
I think we can leave it in the pure jcr resource bundle then.

Carsten
>
> Regards
> Felix
>
>>
>> Regards
>> Carsten
>>
>> 2012/5/15 Justin Edelson <ju...@justinedelson.com>:
>>> In JcrResourceListener, there's some code which strips off the
>>> "jcr:content" path segment. This results in two events being produced with
>>> the same path event property, but with different attributes, when, for
>>> example, a file is uploaded. It seems like we should have some way (another
>>> event property?) to differentiate between these two events. WDYT?
>>>
>>> Justin
>>
>>
>>
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Resource events using parent path for paths ending in /jcr:content

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 16.05.2012 um 08:44 schrieb Carsten Ziegeler:

> Hi,
> 
> yes, this stripping is really annoying but required - otherwise
> downstream users would have to deal with the details of JCR. Are these
> two events triggered by the same observation call, so maybe we could
> combine them into a single event?

Aren't they combined already ? If not, we should try to do it.

On a related note: I wonder, whether we should not split the JcrResourceListener into a separate JCR2OSGi Event bridge bundle ?

Regards
Felix

> 
> Regards
> Carsten
> 
> 2012/5/15 Justin Edelson <ju...@justinedelson.com>:
>> In JcrResourceListener, there's some code which strips off the
>> "jcr:content" path segment. This results in two events being produced with
>> the same path event property, but with different attributes, when, for
>> example, a file is uploaded. It seems like we should have some way (another
>> event property?) to differentiate between these two events. WDYT?
>> 
>> Justin
> 
> 
> 
> -- 
> Carsten Ziegeler
> cziegeler@apache.org


Re: Resource events using parent path for paths ending in /jcr:content

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,

yes, this stripping is really annoying but required - otherwise
downstream users would have to deal with the details of JCR. Are these
two events triggered by the same observation call, so maybe we could
combine them into a single event?

Regards
Carsten

2012/5/15 Justin Edelson <ju...@justinedelson.com>:
> In JcrResourceListener, there's some code which strips off the
> "jcr:content" path segment. This results in two events being produced with
> the same path event property, but with different attributes, when, for
> example, a file is uploaded. It seems like we should have some way (another
> event property?) to differentiate between these two events. WDYT?
>
> Justin



-- 
Carsten Ziegeler
cziegeler@apache.org