SLING-7537 : Provide a way to get the search paths without login into a resource resolver
diff --git a/src/main/java/org/apache/sling/api/request/package-info.java b/src/main/java/org/apache/sling/api/request/package-info.java
index 06b789b..c31532f 100644
--- a/src/main/java/org/apache/sling/api/request/package-info.java
+++ b/src/main/java/org/apache/sling/api/request/package-info.java
@@ -17,7 +17,7 @@
* under the License.
*/
-@Version("2.4.2")
+@Version("2.5.0")
package org.apache.sling.api.request;
import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/resource/ResourceResolverFactory.java b/src/main/java/org/apache/sling/api/resource/ResourceResolverFactory.java
index 12880fb..5bccf77 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceResolverFactory.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceResolverFactory.java
@@ -18,6 +18,7 @@
*/
package org.apache.sling.api.resource;
+import java.util.List;
import java.util.Map;
import javax.annotation.CheckForNull;
@@ -204,4 +205,19 @@
* @since 2.6 (Sling API Bundle 2.8.0)
*/
@CheckForNull ResourceResolver getThreadResourceResolver();
+
+ /**
+ * Returns the search path used by the resource resolvers to search for
+ * resources by relative path. If no search path is set an empty list
+ * is returned.
+ * <p>
+ * Each entry in the list 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 An immutable list containing the search path
+ * @since 2.11 (Sling API Bundle 2.17.0)
+ */
+ @Nonnull List<String> getSearchPath();
}
diff --git a/src/main/java/org/apache/sling/api/resource/package-info.java b/src/main/java/org/apache/sling/api/resource/package-info.java
index 2928554..1ac279f 100644
--- a/src/main/java/org/apache/sling/api/resource/package-info.java
+++ b/src/main/java/org/apache/sling/api/resource/package-info.java
@@ -17,7 +17,7 @@
* under the License.
*/
-@Version("2.10.1")
+@Version("2.11")
package org.apache.sling.api.resource;
import org.osgi.annotation.versioning.Version;