Author: cziegeler Date: Wed Oct 12 09:07:01 2016 New Revision: 1764409 URL: http://svn.apache.org/viewvc?rev=1764409&view=rev Log: SLING-6138 : Use JcrResourceListener for observation. Deprecate attribute methods
Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChange.java Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChange.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChange.java?rev=1764409&r1=1764408&r2=1764409&view=diff ============================================================================== --- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChange.java (original) +++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChange.java Wed Oct 12 09:07:01 2016 @@ -84,22 +84,17 @@ public class ResourceChange { * @param changeType The change type * @param path The resource path * @param isExternal {code true} if the change happened on another node - * @param addedPropertyNames set of added property names, if provided must be immutable - * @param changedPropertyNames set of added property names, if provided must be immutable - * @param removedPropertyNames set of added property names, if provided must be immutable + * @since 1.2.0 (Sling API Bundle 2.15.0) */ public ResourceChange(final @Nonnull ChangeType changeType, final @Nonnull String path, - final boolean isExternal, - final Set<String> addedPropertyNames, - final Set<String> changedPropertyNames, - final Set<String> removedPropertyNames) { + final boolean isExternal) { this.path = path; this.changeType = changeType; this.isExternal = isExternal; - this.addedPropertyNames = addedPropertyNames; - this.changedPropertyNames = changedPropertyNames; - this.removedPropertyNames = removedPropertyNames; + this.addedPropertyNames = null; + this.changedPropertyNames = null; + this.removedPropertyNames = null; } /** @@ -108,17 +103,24 @@ public class ResourceChange { * @param changeType The change type * @param path The resource path * @param isExternal {code true} if the change happened on another node - * @since 1.2.0 (Sling API Bundle 2.15.0) + * @param addedPropertyNames set of added property names, if provided must be immutable + * @param changedPropertyNames set of added property names, if provided must be immutable + * @param removedPropertyNames set of added property names, if provided must be immutable + * @deprecated The sets of property names are not supported anymore. */ + @Deprecated public ResourceChange(final @Nonnull ChangeType changeType, final @Nonnull String path, - final boolean isExternal) { + final boolean isExternal, + final Set<String> addedPropertyNames, + final Set<String> changedPropertyNames, + final Set<String> removedPropertyNames) { this.path = path; this.changeType = changeType; this.isExternal = isExternal; - this.addedPropertyNames = null; - this.changedPropertyNames = null; - this.removedPropertyNames = null; + this.addedPropertyNames = addedPropertyNames; + this.changedPropertyNames = changedPropertyNames; + this.removedPropertyNames = removedPropertyNames; } /**