You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2018/03/08 12:51:10 UTC

[sling-org-apache-sling-api] branch master updated: SLING-7537 : Provide a way to get the search paths without login into a resource resolver

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 495e4bf  SLING-7537 : Provide a way to get the search paths without login into a resource resolver
495e4bf is described below

commit 495e4bfd3b6e34b3b63d78a317e3359849240526
Author: Carsten Ziegeler <cz...@adobe.com>
AuthorDate: Thu Mar 8 13:51:01 2018 +0100

    SLING-7537 : Provide a way to get the search paths without login into a resource resolver
---
 .../java/org/apache/sling/api/request/package-info.java  |  2 +-
 .../sling/api/resource/ResourceResolverFactory.java      | 16 ++++++++++++++++
 .../java/org/apache/sling/api/resource/package-info.java |  2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)

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 @@ public interface ResourceResolverFactory {
      * @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;

-- 
To stop receiving notification emails like this one, please contact
cziegeler@apache.org.