[jira] [Commented] (SLING-6164) Introduce optional property names hint to ResourceChangeListener

2016-10-17 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581930#comment-15581930
 ] 

Chetan Mehrotra commented on SLING-6164:


bq.  the ObserverConfiguration is a ProviderType

I got confused assuming that ObserverConfiguration is to be implemented by all 
resource providers. So changing that would lead to release of all providers. I 
was mistaken there. Makes sense to not add such an enum

> Introduce optional property names hint to ResourceChangeListener
> 
>
> Key: SLING-6164
> URL: https://issues.apache.org/jira/browse/SLING-6164
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR
>Affects Versions: JCR Resource 2.8.0, API 2.14.2
>Reporter: Stefan Egli
> Fix For: JCR Resource 2.9.0, API 2.15.0
>
> Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6164) Introduce optional property names hint to ResourceChangeListener

2016-10-17 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581911#comment-15581911
 ] 

Carsten Ziegeler commented on SLING-6164:
-

+1 in general

> Introduce optional property names hint to ResourceChangeListener
> 
>
> Key: SLING-6164
> URL: https://issues.apache.org/jira/browse/SLING-6164
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR
>Affects Versions: JCR Resource 2.8.0, API 2.14.2
>Reporter: Stefan Egli
> Fix For: JCR Resource 2.9.0, API 2.15.0
>
> Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6164) Introduce optional property names hint to ResourceChangeListener

2016-10-17 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581910#comment-15581910
 ] 

Carsten Ziegeler commented on SLING-6164:
-

-1 for the enum :) we don't need that, the ObserverConfiguration is a 
ProviderType, so we can add as many methods as we want in the future, clients 
will still work, only resource resolver needs to be updated, but that's where 
the impl is anyway

> Introduce optional property names hint to ResourceChangeListener
> 
>
> Key: SLING-6164
> URL: https://issues.apache.org/jira/browse/SLING-6164
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR
>Affects Versions: JCR Resource 2.8.0, API 2.14.2
>Reporter: Stefan Egli
> Fix For: JCR Resource 2.9.0, API 2.15.0
>
> Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6164) Introduce optional property names hint to ResourceChangeListener

2016-10-17 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581789#comment-15581789
 ] 

Stefan Egli commented on SLING-6164:


+1

> Introduce optional property names hint to ResourceChangeListener
> 
>
> Key: SLING-6164
> URL: https://issues.apache.org/jira/browse/SLING-6164
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR
>Affects Versions: JCR Resource 2.8.0, API 2.14.2
>Reporter: Stefan Egli
> Fix For: JCR Resource 2.9.0, API 2.15.0
>
> Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6164) Introduce optional property names hint to ResourceChangeListener

2016-10-17 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581760#comment-15581760
 ] 

Chetan Mehrotra commented on SLING-6164:


Looks fine

{code}
+++ 
bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
 (working copy)
@@ -61,6 +61,15 @@
 @Nonnull Set getChangeTypes();
 
 /**
+ * Set containing the set of property names which
+ * serves as an optional hint for the underlying to 
+ * only report property changes enlisted, ie the
+ * underlying might ignore this.
+ * @return set containing the set of property names
+ */
+@Nonnull Set getPropertyNamesHint();
{code}

In future we might add support for more hints and in such a case adding new 
methods here would lead to compatibility issue. Specially when this is an 
optional feature. May be we make it bit generic

{code}
 enum ObservationHint {PropertyName}

@Nonnull Set getHint(ObservationHint hint);
{code}

wdyt?

> Introduce optional property names hint to ResourceChangeListener
> 
>
> Key: SLING-6164
> URL: https://issues.apache.org/jira/browse/SLING-6164
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR
>Affects Versions: JCR Resource 2.8.0, API 2.14.2
>Reporter: Stefan Egli
> Fix For: JCR Resource 2.9.0, API 2.15.0
>
> Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)