Author: rombert
Date: Thu Jan 28 14:12:10 2016
New Revision: 1727356
URL: http://svn.apache.org/viewvc?rev=1727356&view=rev
Log:
SLING-5169 - Deprecate OSGi events for Sling resource changes
Deprecated SlingConstants.TOPIC_RESOURCE_* constants and added
instructions to use a ResourceChangeListener instead.
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/SlingConstants.java
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/SlingConstants.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/SlingConstants.java?rev=1727356&r1=1727355&r2=1727356&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/SlingConstants.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/SlingConstants.java
Thu Jan 28 14:12:10 2016
@@ -18,6 +18,8 @@
*/
package org.apache.sling.api;
+import org.apache.sling.api.resource.observation.ResourceChangeListener;
+
/**
* The <code>SlingConstants</code> interface provides some symbolic constants
* for well known constant strings in Sling. Even though these constants will
@@ -266,7 +268,10 @@ public class SlingConstants {
* The event contains at least the {@link #PROPERTY_PATH}, {@link
#PROPERTY_RESOURCE_SUPER_TYPE}
* and {@link #PROPERTY_RESOURCE_TYPE} properties.
* @since 2.0.6 (Sling API Bundle 2.0.6)
+ *
+ * @deprecated Register a {@link ResourceChangeListener} instead
*/
+ @Deprecated
public static final String TOPIC_RESOURCE_ADDED =
"org/apache/sling/api/resource/Resource/ADDED";
/**
@@ -275,7 +280,10 @@ public class SlingConstants {
* The event contains at least the {@link #PROPERTY_PATH}. As the resource
has already been removed
* no further information like resource type etc. might be available.
* @since 2.0.6 (Sling API Bundle 2.0.6)
+ *
+ * @deprecated Register a {@link ResourceChangeListener} instead
*/
+ @Deprecated
public static final String TOPIC_RESOURCE_REMOVED =
"org/apache/sling/api/resource/Resource/REMOVED";
/**
@@ -287,7 +295,10 @@ public class SlingConstants {
* {@link #PROPERTY_REMOVED_ATTRIBUTES}, {@link
#PROPERTY_CHANGED_ATTRIBUTES}. All of them are
* optional.
* @since 2.0.6 (Sling API Bundle 2.0.6)
+ *
+ * @deprecated Register a {@link ResourceChangeListener} instead
*/
+ @Deprecated
public static final String TOPIC_RESOURCE_CHANGED =
"org/apache/sling/api/resource/Resource/CHANGED";
/**