Author: cziegeler
Date: Sat Oct 8 13:32:52 2016
New Revision: 1763898
URL: http://svn.apache.org/viewvc?rev=1763898&view=rev
Log:
SLING-6123 : Pass additional information like the search path to the listeners
Added:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
(with props)
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/package-info.java
Added:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java?rev=1763898&view=auto
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
(added)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
Sat Oct 8 13:32:52 2016
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.resource.observation;
+
+import java.util.List;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * An instance of {@code ResourceChangeList} is passed to {@link
ResourceChangeListener#onChange(List)}
+ * to pass in addtional information like the search path.
+ *
+ * @since 1.2.0 (Sling API Bundle 2.15.0)
+ */
+@ProviderType
+public interface ResourceChangeList extends List<ResourceChange> {
+
+ /**
+ * Returns the search path used by the resource resolving.
+ * <p>
+ * Each entry in the array is an absolute path terminated with a slash
+ * character. Thus to create an absolute path from a search path entry and
a
+ * relative path, the search path entry and relative path may just be
+ * concatenated.
+ *
+ * @return The array of search paths
+ * @see org.apache.sling.api.resource.ResourceResolver#getSearchPath()
+ */
+ String[] getSearchPath();
+}
Propchange:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeList.java
------------------------------------------------------------------------------
svn:keywords = author date id revision rev url
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java?rev=1763898&r1=1763897&r2=1763898&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java
Sat Oct 8 13:32:52 2016
@@ -94,7 +94,11 @@ public interface ResourceChangeListener
/**
* Report resource changes based on the filter properties of this listener.
- * @param changes The changes.
+ * <p>
+ * Starting with version 1.2 of this API, an instance of {@code
ResoureChangeList} is passed
+ * as the parameter to allow passing additional information.
+ *
+ * @param changes The changes list. This list is immutable.
*/
void onChange(@Nonnull List<ResourceChange> changes);
}
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/package-info.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/package-info.java?rev=1763898&r1=1763897&r2=1763898&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/package-info.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/observation/package-info.java
Sat Oct 8 13:32:52 2016
@@ -17,7 +17,7 @@
* under the License.
*/
-@Version("1.1.1")
+@Version("1.2.0")
package org.apache.sling.api.resource.observation;
import org.osgi.annotation.versioning.Version;