SLING-6164 : Introduce support for an optional property names hint to ResourceChangeListener

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1765246 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java b/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
index 5ab487c..5580666 100644
--- a/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
+++ b/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
@@ -93,6 +93,16 @@
      * {@link ResourceChange.ChangeType}.
      */
     String CHANGES = "resource.change.types";
+    
+    /**
+     * An optional hint indicating to the underlying that for
+     * changes regarding properties (added/removed/changed) the listener
+     * is only interested in those property names listed inhere.
+     * If the underlying supports this, events for property names that
+     * are not enlisted here will not be delivered, however events
+     * concerning nodes are not affected by this hint.
+     */
+    String PROPERTY_NAMES_HINT = "resource.property.names.hint";
 
     /**
      * Report resource changes based on the filter properties of this listener.
diff --git a/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java b/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
index 7b45b3e..0aa4c71 100644
--- a/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
+++ b/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
@@ -61,6 +61,15 @@
     @Nonnull Set<ResourceChange.ChangeType> 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<String> getPropertyNamesHint();
+    
+    /**
      * Checks whether a path matches one of the paths of this configuration
      * but is not in the excluded paths set.
      * @param path The path to check