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 2015/05/26 16:57:29 UTC

svn commit: r1681769 - /sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java

Author: cziegeler
Date: Tue May 26 14:57:29 2015
New Revision: 1681769

URL: http://svn.apache.org/r1681769
Log:
Update API based on feedback

Modified:
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java?rev=1681769&r1=1681768&r2=1681769&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java Tue May 26 14:57:29 2015
@@ -229,7 +229,7 @@ public abstract class ResourceProvider<T
         if (parentPath == null) {
             return null;
         }
-        return this.getResource(ctx, parentPath);
+        return this.getResource(ctx, parentPath, null);
     }
 
     /**
@@ -246,12 +246,15 @@ public abstract class ResourceProvider<T
      * @param resourceResolver
      *            The {@link ResourceResolver} to which the returned {@link Resource} is attached.
      * @param path The full path of the resource.
+     * @param parent Optional parent resource
      * @return <code>null</code> If this provider does not have a resource for
      *         the path.
      * @throws org.apache.sling.api.SlingException
      *             may be thrown in case of any problem creating the <code>Resource</code> instance.
      */
-    public abstract @CheckForNull Resource getResource(final @Nonnull ResolveContext<T> ctx, final @Nonnull String path);
+    public abstract @CheckForNull Resource getResource(@Nonnull final ResolveContext<T> ctx,
+            @Nonnull final String path,
+            @CheckForNull final Resource parent);
 
     /**
      * Returns an <code>Iterator</code> of {@link Resource} objects loaded from