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 15:48:22 UTC

svn commit: r1681757 - in /sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling: api/resource/ api/resource/provider/ api/resource/query/ spi/ spi/resource/ spi/resource/provider/

Author: cziegeler
Date: Tue May 26 13:48:20 2015
New Revision: 1681757

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

Added:
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java   (with props)
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/
      - copied from r1677773, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationReporter.java
      - copied, changed from r1679504, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ObservationReporter.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java
      - copied, changed from r1679504, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/QueryProvider.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
      - copied, changed from r1679940, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ResourceProvider.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/package-info.java
      - copied, changed from r1678749, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/package-info.java
Removed:
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/AbstractResourceProvider.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationHandler.java
Modified:
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/Query.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryBuilder.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructions.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryManager.java
    sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/ResourceResolver.java?rev=1681757&r1=1681756&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/ResourceResolver.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/ResourceResolver.java Tue May 26 13:48:20 2015
@@ -25,6 +25,7 @@ import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.sling.api.SlingException;
 import org.apache.sling.api.adapter.Adaptable;
 
 import aQute.bnd.annotation.ProviderType;
@@ -686,4 +687,49 @@ public interface ResourceResolver extend
      */
     void refresh();
 
+    /**
+     * This method copies the subgraph rooted at, and including, the resource at
+     * <code>srcAbsPath</code> to the new location at <code>destAbsPath</code>.
+     * <p>
+     * TODO - clarify whether destAbsPath is the parent of the new tree or the root
+     *
+     * If the copy operation is within a single resource provider, the resource provider
+     * can use an optimized copy operation. Otherwise the resource resolver copies resources
+     * from one provider to another.
+     *
+     * @param srcAbsPath  the path of the resource to be copied.
+     * @param destAbsPath the location to which the resource at
+     *                    <code>srcAbsPath</code> is to be copied.
+     * @throws PersistenceException
+     * @throws SlingException
+     * @throws IllegalStateException if this resource resolver has already been
+     *             {@link #close() closed}.
+     * @since 2.9 (Sling API Bundle 2.10.0)
+     */
+    void copy(final String srcAbsPath,
+              final String destAbsPath,
+              final boolean persistImmediately) throws PersistenceException;
+
+    /**
+     * This method moves the subgraph rooted at, and including, the resource at
+     * <code>srcAbsPath</code> to the new location at <code>destAbsPath</code>.
+     * <p>
+     * TODO - clarify whether destAbsPath is the parent of the new tree or the root
+     *
+     * If the move operation is within a single resource provider, the resource provider
+     * can use an optimized move operation. Otherwise the resource resolver moves resources
+     * from one provider to another.
+     *
+     * @param srcAbsPath  the path of the resource to be copied.
+     * @param destAbsPath the location to which the resource at
+     *                    <code>srcAbsPath</code> is to be copied.
+     * @throws PersistenceException
+     * @throws SlingException
+     * @throws IllegalStateException if this resource resolver has already been
+     *             {@link #close() closed}.
+     * @since 2.9 (Sling API Bundle 2.10.0)
+     */
+    void move(final String srcAbsPath,
+              final String destAbsPath,
+              final boolean persistImmediately) throws PersistenceException;
 }

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/Query.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/Query.java?rev=1681757&r1=1681756&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/Query.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/Query.java Tue May 26 13:48:20 2015
@@ -18,6 +18,8 @@
  */
 package org.apache.sling.api.resource.query;
 
+import java.util.List;
+
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
@@ -26,6 +28,10 @@ import aQute.bnd.annotation.ProviderType
 @ProviderType
 public interface Query {
 
+    /**
+     * Enumeration defining whether the query is consisting of different
+     * queries which are combined based on this operator.
+     */
     public enum PartOperatorType {
         NONE,
         AND,
@@ -36,9 +42,9 @@ public interface Query {
         EXISTS,
         EQ,
         GT,
-        GT_EG,
+        GT_OR_EQ,
         LT,
-        LT_EG,
+        LT_OR_EQ,
         APPROX
     };
 
@@ -59,15 +65,25 @@ public interface Query {
      */
     @Nonnull String getId();
 
-    @CheckForNull String[] getPaths();
+    @CheckForNull List<String> getPaths();
 
-    @CheckForNull String getIsA();
+    @CheckForNull List<String> getResourceNames();
 
-    boolean isNegative();
+    @CheckForNull List<String> getIsA();
 
-    @CheckForNull Query[] getParts();
+    /**
+     * Returns the queries if {@link #getPartOperatorType()} does not
+     * return {@link PartOperatorType#NONE}.
+     * @return The parts or {@code null} if this query is not an operation
+     *         on other queries.
+     */
+    @CheckForNull List<Query> getParts();
 
+    /**
+     * Return the part operator type.
+     * @return
+     */
     @Nonnull PartOperatorType getPartOperatorType();
 
-    @CheckForNull PropertyConstraint[] getPropertyConstraints();
+    @CheckForNull List<PropertyConstraint> getPropertyConstraints();
 }
\ No newline at end of file

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryBuilder.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryBuilder.java?rev=1681757&r1=1681756&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryBuilder.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryBuilder.java Tue May 26 13:48:20 2015
@@ -20,6 +20,8 @@ package org.apache.sling.api.resource.qu
 
 import javax.annotation.Nonnull;
 
+import org.apache.sling.api.resource.Resource;
+
 import aQute.bnd.annotation.ProviderType;
 
 /**
@@ -55,8 +57,8 @@ public interface QueryBuilder {
      * Add a condition to check whether the resource is of a specific resource type.
      * If more than one resource type is specified, the conditions are handled with
      * an or operation.
-     *
-     * @param resourceType The resource type to check
+     * The operation is similar to {@link Resource#isResourceType(String)}
+     * @param resourceType The resource type to check.
      * @return The query builder to construct the query.
      *
      * @throws IllegalArgumentException If the argument is not valid.
@@ -64,11 +66,27 @@ public interface QueryBuilder {
     @Nonnull QueryBuilder isA(@Nonnull String resourceType);
 
     /**
+     * Add a condition to check whether the resource has a specific name.
+     * If more than one resource name is specified, the conditions are handled with
+     * an or operation.
+     * @param name The name to check.
+     * @return The query builder to construct the query.
+     *
+     * @throws IllegalArgumentException If the argument is not valid.
+     */
+    @Nonnull QueryBuilder name(@Nonnull String resourceName);
+
+    /**
      * Add a property condition for the resources.
      * If more than one property condition is specified, the conditions are
      * handled with an and operation.
-     *
-     * @param name The name of the property to check.
+     * The property might be a relative path pointing to a property of a child
+     * resource. In this case the child resource must be provided by the same
+     * resource provider. A relative path pointing to a parent resource or
+     * any resource which is not a child resource is not valid.
+     * The special name {@code *} can be used to mean any property of the current resource.
+     * @param name The name of the property to check. The name can be a path specifying
+     *        a property of a known child resource of the returned resource.
      * @return A property builder to specify the operation on the property value.
      *
      * @throws IllegalArgumentException If the argument is not valid.
@@ -94,35 +112,4 @@ public interface QueryBuilder {
      * @throws IllegalArgumentException If the argument is not valid.
      */
     @Nonnull Query or(@Nonnull Query q1, @Nonnull Query... q2);
-
-    /**
-     * Create a new query by negating a query.
-     * @param q The query to negate.
-     * @return A new query
-     *
-     * @throws IllegalArgumentException If the argument is not valid.
-     */
-    @Nonnull Query not(@Nonnull Query q);
-
-    /**
-     * Sort the result in ascending order by this property.
-     * If more than one sort criteria is specified, the result is sorted first by the
-     * first criteria, within that sorting the second criteria is applied and so on.
-     * @param propName The name of the property
-     * @return The query builder to construct the query.
-     *
-     * @throws IllegalArgumentException If the argument is not valid.
-     */
-    @Nonnull QueryBuilder sortAscendingBy(@Nonnull String propName);
-
-    /**
-     * Sort the result in descending order by this property.
-     * If more than one sort criteria is specified, the result is sorted first by the
-     * first criteria, within that sorting the second criteria is applied and so on.
-     * @param propName The name of the property
-     * @return The query builder to construct the query.
-     *
-     * @throws IllegalArgumentException If the argument is not valid.
-     */
-    @Nonnull QueryBuilder sortDescendingBy(@Nonnull String propName);
 }
\ No newline at end of file

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructions.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructions.java?rev=1681757&r1=1681756&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructions.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructions.java Tue May 26 13:48:20 2015
@@ -18,6 +18,12 @@
  */
 package org.apache.sling.api.resource.query;
 
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import org.apache.sling.api.resource.Resource;
+
 import aQute.bnd.annotation.ProviderType;
 
 /**
@@ -25,45 +31,41 @@ import aQute.bnd.annotation.ProviderType
  * instructions for a query.
  */
 @ProviderType
-public class QueryInstructions {
-
-    private int limit = -1;
-
-    private int startAt = -1;
+public interface QueryInstructions {
 
+    public static interface SortCriteria {
+        String getPropertyName();
+        boolean isAscending();
+    }
     /**
-     * Specify the limit of the query. By default the query is unlimited.
-     * @param limit The new limit. If a negative value is used, there is no limit.
-     * @return The query instructions.
+     * Unique global id.
+     * The id can be used by implementations to cache the parsed query.
+     * The id is ensured to be the same for two identical query instructions.
+     * The only variable is the continuation key.
+     * @return A unique global id.
      */
-    public QueryInstructions limit(final int limit) {
-        this.limit = limit;
-        return this;
-    }
+    @Nonnull String getId();
 
     /**
      * Get the limit of the query. By default the query is unlimited.
      * @return The limit. If a negative value is returned, there is no limit.
      */
-    public int getLimit() {
-        return this.limit;
-    }
+    int getLimit();
 
     /**
-     * Specify the start index for the query.
-     * @param start The new start index. If the value is less than 1, it starts at 0.
-     * @return The query instructions.
+     * Generate a continuation key to be used with {@link QueryInstructionsBuilder#continueAt(String)}.
+     * The continuation can be used for paging: the last resource of a page is feed into this
+     * method to get a key to be used to get the start for the next page.
+     * A continuation key can only be generated of the result is sorted.
+     * @param resource The last resource of a page
+     * @return A continuation key for the next resource after this one, according to the sorting.
+     * @throws IllegalArgumentException if the resource is {@code null}
      */
-    public QueryInstructions startAt(final int start) {
-        this.startAt = start;
-        return this;
-    }
+    @Nonnull String getContinuationKey(@Nonnull final Resource resource);
 
     /**
-     * Get the start index for the query.
-     * @return The start index. If the value is less than 1, the index is 0.
+     * Unmodifiable list with the sort criteria.
+     * @return The sort criteria, the list might be empty.
      */
-    public int getStartAt() {
-        return this.startAt;
-    }
+    @Nonnull List<SortCriteria> getSortCriteria();
 }
\ No newline at end of file

Added: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java?rev=1681757&view=auto
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java (added)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java Tue May 26 13:48:20 2015
@@ -0,0 +1,67 @@
+/*
+ * 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.query;
+
+import javax.annotation.Nonnull;
+
+import aQute.bnd.annotation.ProviderType;
+
+/**
+ * Query instructions are used to further specify runtime specific
+ * instructions for a query.
+ */
+@ProviderType
+public interface QueryInstructionsBuilder {
+
+    /**
+     * Specify the limit of the query. By default the query is unlimited.
+     * @param limit The new limit. If a value less than 1 is used, there is no limit.
+     * @return The query instructions.
+     */
+    @Nonnull QueryInstructionsBuilder limit(final int limit);
+
+    /**
+     *
+     */
+    @Nonnull QueryInstructionsBuilder continueAt(final String continuationKey);
+
+    /**
+     * Sort the result in ascending order by this property.
+     * If more than one sort criteria is specified, the result is sorted first by the
+     * first criteria, within that sorting the second criteria is applied and so on.
+     * @param propName The name of the property
+     * @return The query builder to construct the query.
+     *
+     * @throws IllegalArgumentException If the argument is {@code null}.
+     */
+    @Nonnull QueryInstructionsBuilder sortAscendingBy(@Nonnull String propName);
+
+    /**
+     * Sort the result in descending order by this property.
+     * If more than one sort criteria is specified, the result is sorted first by the
+     * first criteria, within that sorting the second criteria is applied and so on.
+     * @param propName The name of the property
+     * @return The query builder to construct the query.
+     *
+     * @throws IllegalArgumentException If the argument is {@code null}.
+     */
+    @Nonnull QueryInstructionsBuilder sortDescendingBy(@Nonnull String propName);
+
+    @Nonnull QueryInstructions build();
+}
\ No newline at end of file

Propchange: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryInstructionsBuilder.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryManager.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryManager.java?rev=1681757&r1=1681756&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryManager.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/QueryManager.java Tue May 26 13:48:20 2015
@@ -33,7 +33,7 @@ import aQute.bnd.annotation.ProviderType
  * of a resource resolver.
  */
 @ProviderType
-public interface QueryManager extends QueryBuilder {
+public interface QueryManager {
 
     /**
      * Execute the given query in the context of the resource resolver.
@@ -47,4 +47,7 @@ public interface QueryManager extends Qu
                                      @Nonnull Query q,
                                      @CheckForNull QueryInstructions qi);
 
+    @Nonnull QueryBuilder query();
+
+    @Nonnull QueryInstructionsBuilder instructions();
 }

Copied: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationReporter.java (from r1679504, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ObservationReporter.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationReporter.java?p2=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationReporter.java&p1=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ObservationReporter.java&r1=1679504&r2=1681757&rev=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ObservationReporter.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ObservationReporter.java Tue May 26 13:48:20 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.api.resource.provider;
+package org.apache.sling.spi.resource.provider;
 
 import java.util.List;
 

Copied: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java (from r1679504, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/QueryProvider.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java?p2=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java&p1=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/QueryProvider.java&r1=1679504&r2=1681757&rev=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/QueryProvider.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java Tue May 26 13:48:20 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.api.resource.provider;
+package org.apache.sling.spi.resource.provider;
 
 import java.util.Iterator;
 

Modified: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java?rev=1681757&r1=1677773&r2=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java Tue May 26 13:48:20 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.api.resource.provider;
+package org.apache.sling.spi.resource.provider;
 
 import java.util.Map;
 
@@ -34,7 +34,19 @@ public interface ResolveContext<T> {
 
     @Nonnull ResourceResolver getResourceResolver();
 
-    @CheckForNull Map<String, String> getParameters();
-
+    /**
+     * Return optional parameters for resolving the resource
+     * @return A non empty map with parameters or {@code null}.
+     */
+    @CheckForNull Map<String, String> getResolveParameters();
+
+    /**
+     * This is the object returned by {@link ResourceProvider#authenticate(Map)}
+     * @return The data object or {@code null}
+     */
     @CheckForNull T getProviderState();
+
+    @CheckForNull ResolveContext<?> getParentResolveContext();
+
+    @CheckForNull ResourceProvider<?> getParentResourceProvider();
 }

Copied: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java (from r1679940, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/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?p2=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java&p1=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ResourceProvider.java&r1=1679940&r2=1681757&rev=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/ResourceProvider.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java Tue May 26 13:48:20 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.api.resource.provider;
+package org.apache.sling.spi.resource.provider;
 
 import java.util.Collection;
 import java.util.Iterator;
@@ -399,4 +399,25 @@ public abstract class ResourceProvider<T
     public @CheckForNull <AdapterType> AdapterType adaptTo(final  @Nonnull ResolveContext<T> ctx, final @Nonnull Class<AdapterType> type) {
         return null;
     }
+
+    /**
+     * TODO
+     * @return {@code true} if the provider can perform the copy
+     */
+    public boolean copy(final String srcAbsPath,
+              final String destAbsPath,
+              final boolean persistImmediately) throws PersistenceException {
+        return false;
+    }
+
+    /**
+     * TODO
+     * @return {@code true} if the provider can perform the move
+     */
+
+    public boolean move(final String srcAbsPath,
+              final String destAbsPath,
+              final boolean persistImmediately) throws PersistenceException {
+        return false;
+    }
 }

Copied: sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/package-info.java (from r1678749, sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/package-info.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/package-info.java?p2=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/package-info.java&p1=sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/package-info.java&r1=1678749&r2=1681757&rev=1681757&view=diff
==============================================================================
--- sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/provider/package-info.java (original)
+++ sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/spi/resource/provider/package-info.java Tue May 26 13:48:20 2015
@@ -18,7 +18,7 @@
  */
 
 @Version("1.0.0")
-package org.apache.sling.api.resource.provider;
+package org.apache.sling.spi.resource.provider;
 
 import aQute.bnd.annotation.Version;