incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1346312 - in /sling/whiteboard/SLING-2396/resourceresolver: ./ src/main/java/org/apache/sling/resourceresolver/impl/ src/main/java/org/apache/sling/resourceresolver/impl/console/ src/main/java/org/apache/sling/resourceresolver/impl/helper/...
Date Tue, 05 Jun 2012 09:29:31 GMT
Author: cziegeler
Date: Tue Jun  5 09:29:30 2012
New Revision: 1346312

URL: http://svn.apache.org/viewvc?rev=1346312&view=rev
Log:
SLING-2396 : Add new resource provider interfaces (WiP)

Added:
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
  (contents, props changed)
      - copied, changed from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceDecoratorTracker.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
  (contents, props changed)
      - copied, changed from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceIteratorDecorator.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
  (contents, props changed)
      - copied, changed from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntries.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
  (contents, props changed)
      - copied, changed from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntry.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java
  (contents, props changed)
      - copied, changed from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/Mapping.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
  (contents, props changed)
      - copied, changed from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ProviderHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
  (contents, props changed)
      - copied, changed from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntry.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
  (contents, props changed)
      - copied, changed from r1346020, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderFactoryHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java
  (contents, props changed)
      - copied, changed from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
  (contents, props changed)
      - copied, changed from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/RootResourceProviderEntry.java
Removed:
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceDecoratorTracker.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceIteratorDecorator.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntries.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntry.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/Mapping.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ProviderHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntry.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderFactoryHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderHandler.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/RootResourceProviderEntry.java
Modified:
    sling/whiteboard/SLING-2396/resourceresolver/pom.xml
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/ResourceResolverWebConsolePlugin.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIterator.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/SortedProviderList.java
    sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/MapEntryTest.java
    sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntryTest.java

Modified: sling/whiteboard/SLING-2396/resourceresolver/pom.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/pom.xml?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/pom.xml (original)
+++ sling/whiteboard/SLING-2396/resourceresolver/pom.xml Tue Jun  5 09:29:30 2012
@@ -30,20 +30,20 @@
     <version>0.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
-    <name>Apache Sling JCR Resource Resolver</name>
+    <name>Apache Sling Resource Resolver</name>
     <description>
-        This bundle provides the JCR based ResourceResolver.
+        This bundle provides the Resource Resolver and the Resource Resolver Factory.
     </description>
 
     <scm>
         <connection>
-            scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource
+            scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver
         </connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource
+            scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver
         </developerConnection>
         <url>
-            http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource
+            http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver
         </url>
     </scm>
 

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
Tue Jun  5 09:29:30 2012
@@ -45,10 +45,11 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.resourceresolver.impl.console.ResourceResolverWebConsolePlugin;
-import org.apache.sling.resourceresolver.impl.helper.MapEntries;
-import org.apache.sling.resourceresolver.impl.helper.Mapping;
+import org.apache.sling.resourceresolver.impl.helper.ResourceDecoratorTracker;
 import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
-import org.apache.sling.resourceresolver.impl.helper.RootResourceProviderEntry;
+import org.apache.sling.resourceresolver.impl.mapping.MapEntries;
+import org.apache.sling.resourceresolver.impl.mapping.Mapping;
+import org.apache.sling.resourceresolver.impl.tree.RootResourceProviderEntry;
 import org.osgi.framework.Constants;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.event.EventAdmin;

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
Tue Jun  5 09:29:30 2012
@@ -45,14 +45,15 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ResourceWrapper;
 import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.resourceresolver.impl.helper.MapEntry;
 import org.apache.sling.resourceresolver.impl.helper.RedirectResource;
 import org.apache.sling.resourceresolver.impl.helper.ResourceIterator;
+import org.apache.sling.resourceresolver.impl.helper.ResourceIteratorDecorator;
 import org.apache.sling.resourceresolver.impl.helper.ResourcePathIterator;
 import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
 import org.apache.sling.resourceresolver.impl.helper.StarResource;
 import org.apache.sling.resourceresolver.impl.helper.URI;
 import org.apache.sling.resourceresolver.impl.helper.URIException;
+import org.apache.sling.resourceresolver.impl.mapping.MapEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/ResourceResolverWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/ResourceResolverWebConsolePlugin.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/ResourceResolverWebConsolePlugin.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/ResourceResolverWebConsolePlugin.java
Tue Jun  5 09:29:30 2012
@@ -37,10 +37,10 @@ import javax.servlet.http.HttpServletRes
 import org.apache.sling.api.request.ResponseUtil;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
-import org.apache.sling.resourceresolver.impl.helper.MapEntries;
-import org.apache.sling.resourceresolver.impl.helper.MapEntry;
 import org.apache.sling.resourceresolver.impl.helper.URI;
 import org.apache.sling.resourceresolver.impl.helper.URIException;
+import org.apache.sling.resourceresolver.impl.mapping.MapEntries;
+import org.apache.sling.resourceresolver.impl.mapping.MapEntry;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
(from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceDecoratorTracker.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceDecoratorTracker.java&r1=1345530&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceDecoratorTracker.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl;
+package org.apache.sling.resourceresolver.impl.helper;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -73,7 +73,7 @@ public class ResourceDecoratorTracker {
     /**
      * Bind a resouce decorator.
      */
-    protected void bindResourceDecorator(final ResourceDecorator decorator,
+    public void bindResourceDecorator(final ResourceDecorator decorator,
             final Map<String, Object> props) {
         synchronized (this.resourceDecorators) {
             this.resourceDecorators.add(new ResourceDecoratorEntry(decorator,
@@ -86,7 +86,7 @@ public class ResourceDecoratorTracker {
     /**
      * Unbind a resouce decorator.
      */
-    protected void unbindResourceDecorator(final ResourceDecorator decorator,
+    public void unbindResourceDecorator(final ResourceDecorator decorator,
             final Map<String, Object> props) {
         synchronized (this.resourceDecorators) {
             final Iterator<ResourceDecoratorEntry> i = this.resourceDecorators

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceDecoratorTracker.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIterator.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIterator.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIterator.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIterator.java
Tue Jun  5 09:29:30 2012
@@ -31,6 +31,9 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.SyntheticResource;
+import org.apache.sling.resourceresolver.impl.tree.ProviderHandler;
+import org.apache.sling.resourceresolver.impl.tree.ResourceProviderEntry;
+import org.apache.sling.resourceresolver.impl.tree.RootResourceProviderEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
(from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceIteratorDecorator.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceIteratorDecorator.java&r1=1345530&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceIteratorDecorator.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl;
+package org.apache.sling.resourceresolver.impl.helper;
 
 import java.util.Iterator;
 

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceIteratorDecorator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/SortedProviderList.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/SortedProviderList.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/SortedProviderList.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/SortedProviderList.java
Tue Jun  5 09:29:30 2012
@@ -24,11 +24,19 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-// TODO - Implement sorting
+import org.apache.sling.resourceresolver.impl.tree.ResourceProviderFactoryHandler;
+
+/**
+ * Helper class to get a sorted list of resource providers which implement
+ * a specific feature interface.
+ */
+//TODO - Implement sorting
 public class SortedProviderList<T> {
 
+    /** The feature interface class. */
     private final Class<T> genericClass;
 
+    /** Sorted list of providers and factories. */
     private Object[] sortedList = new Object[0];
 
     /**
@@ -39,6 +47,10 @@ public class SortedProviderList<T> {
         this.genericClass = genericClass;
     }
 
+    /**
+     * Return an iterator for the current sorted list of providers
+     * implementing the feature interface.
+     */
     public Iterator<T> getProviders(final ResourceResolverContext ctx) {
         return new Iterator<T>() {
 
@@ -97,39 +109,53 @@ public class SortedProviderList<T> {
         };
     }
 
+    /**
+     * Add an object to the list
+     */
+    private synchronized void addToList(final Object obj) {
+        final List<Object> list = new LinkedList<Object>();
+        list.addAll(Arrays.asList(this.sortedList));
+        list.add(obj);
+        this.sortedList = list.toArray(new Object[list.size()]);
+    }
+
+    /**
+     * Remove an object from the list
+     */
+    private synchronized void removeFromList(final Object obj) {
+        final List<Object> list = new LinkedList<Object>();
+        list.addAll(Arrays.asList(this.sortedList));
+        list.remove(obj);
+        this.sortedList = list.toArray(new Object[list.size()]);
+    }
+
+    /**
+     * Add a resource provider implementing the feature interface.
+     */
     public void add(final T provider) {
-        synchronized ( this ) {
-            final List<Object> list = new LinkedList<Object>();
-            list.addAll(Arrays.asList(this.sortedList));
-            list.add(provider);
-            this.sortedList = list.toArray(new Object[list.size()]);
-        }
+        this.addToList(provider);
     }
 
+    /**
+     * Add a resource provider factory. We don't know yet if the
+     * resource provider implements the feature interface.
+     * This will be checked on demand.
+     */
     public void add(final ResourceProviderFactoryHandler factory) {
-        synchronized ( this ) {
-            final List<Object> list = new LinkedList<Object>();
-            list.addAll(Arrays.asList(this.sortedList));
-            list.add(factory);
-            this.sortedList = list.toArray(new Object[list.size()]);
-        }
+        this.addToList(factory);
     }
 
+    /**
+     * Remove a resource provider implementing the feature interface.
+     */
     public void remove(final T provider) {
-        synchronized ( this ) {
-            final List<Object> list = new LinkedList<Object>();
-            list.addAll(Arrays.asList(this.sortedList));
-            list.remove(provider);
-            this.sortedList = list.toArray(new Object[list.size()]);
-        }
+        this.removeFromList(provider);
     }
 
+    /**
+     * Remove a resource provider factory.
+     */
     public void remove(final ResourceProviderFactoryHandler factory) {
-        synchronized ( this ) {
-            final List<Object> list = new LinkedList<Object>();
-            list.addAll(Arrays.asList(this.sortedList));
-            list.remove(factory);
-            this.sortedList = list.toArray(new Object[list.size()]);
-        }
+        this.removeFromList(factory);
     }
 }

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
(from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntries.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntries.java&r1=1345530&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntries.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.mapping;
 
 import java.net.MalformedURLException;
 import java.net.URL;

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
(from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntry.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntry.java&r1=1345530&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/MapEntry.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.mapping;
 
 import java.net.URI;
 import java.net.URISyntaxException;

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java
(from r1345530, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/Mapping.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/Mapping.java&r1=1345530&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/Mapping.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.mapping;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/Mapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
(from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ProviderHandler.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ProviderHandler.java&r1=1345668&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ProviderHandler.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
Tue Jun  5 09:29:30 2012
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.tree;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -23,6 +23,7 @@ import java.util.Map;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
 import org.osgi.framework.Constants;
 
 /**

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ProviderHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
(from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntry.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntry.java&r1=1345668&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntry.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.tree;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -31,6 +31,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.SyntheticResource;
+import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -100,7 +101,7 @@ public class ResourceProviderEntry imple
 
     }
 
-    String getPath() {
+    public String getPath() {
         return path;
     }
 
@@ -324,7 +325,7 @@ public class ResourceProviderEntry imple
         }
     }
 
-    Resource getResourceFromProviders(final ResourceResolverContext ctx, final ResourceResolver
resourceResolver, final String fullPath) {
+    public Resource getResourceFromProviders(final ResourceResolverContext ctx, final ResourceResolver
resourceResolver, final String fullPath) {
         final ProviderHandler[] rps = getResourceProviders();
         for (final ProviderHandler rp : rps) {
             final Resource resource = rp.getResource(ctx, resourceResolver, fullPath);
@@ -342,7 +343,7 @@ public class ResourceProviderEntry imple
      * @param sep
      * @return an array of the strings between the separator
      */
-    static String[] split(final String st, final char sep) {
+    public static String[] split(final String st, final char sep) {
 
         if (st == null) {
             return new String[0];

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
(from r1346020, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderFactoryHandler.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderFactoryHandler.java&r1=1346020&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderFactoryHandler.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
Tue Jun  5 09:29:30 2012
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.tree;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -27,6 +27,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceProviderFactory;
 import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderFactoryHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java
(from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderHandler.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderHandler.java&r1=1345668&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderHandler.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java
Tue Jun  5 09:29:30 2012
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.tree;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -23,6 +23,7 @@ import java.util.Map;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
 
 /**
  * The resource provider handler handles access to

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
(from r1345668, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/RootResourceProviderEntry.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/RootResourceProviderEntry.java&r1=1345668&r2=1346312&rev=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/RootResourceProviderEntry.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
Tue Jun  5 09:29:30 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.resourceresolver.impl.helper;
+package org.apache.sling.resourceresolver.impl.tree;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -41,6 +41,8 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.osgi.PropertiesUtil;
+import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext;
+import org.apache.sling.resourceresolver.impl.helper.SortedProviderList;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
 import org.slf4j.Logger;

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/RootResourceProviderEntry.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/MapEntryTest.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/MapEntryTest.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/MapEntryTest.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/MapEntryTest.java
Tue Jun  5 09:29:30 2012
@@ -21,6 +21,8 @@ package org.apache.sling.resourceresolve
 import java.lang.reflect.Method;
 import java.net.URI;
 
+import org.apache.sling.resourceresolver.impl.mapping.MapEntry;
+
 import junit.framework.TestCase;
 
 public class MapEntryTest extends TestCase {

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntryTest.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntryTest.java?rev=1346312&r1=1346311&r2=1346312&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntryTest.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/helper/ResourceProviderEntryTest.java
Tue Jun  5 09:29:30 2012
@@ -33,6 +33,9 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceMetadata;
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.resourceresolver.impl.tree.ProviderHandler;
+import org.apache.sling.resourceresolver.impl.tree.ResourceProviderEntry;
+import org.apache.sling.resourceresolver.impl.tree.ResourceProviderHandler;
 import org.osgi.framework.Constants;
 
 public class ResourceProviderEntryTest extends TestCase {



Mime
View raw message