incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1339051 - in /sling/whiteboard/SLING-2396: jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/ resourceresolver/ resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/ resourceresolver/src/main/java/org/apach...
Date Wed, 16 May 2012 08:14:06 GMT
Author: cziegeler
Date: Wed May 16 08:14:06 2012
New Revision: 1339051

URL: http://svn.apache.org/viewvc?rev=1339051&view=rev
Log:
SLING-2396 : Some refactoring

Added:
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
  (contents, props changed)
      - copied, changed from r1338778, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java
  (contents, props changed)
      - copied, changed from r1338778, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
Removed:
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
Modified:
    sling/whiteboard/SLING-2396/jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
    sling/whiteboard/SLING-2396/resourceresolver/pom.xml
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrItemAdapterFactory.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
    sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/Mapping.java

Modified: sling/whiteboard/SLING-2396/jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
(original)
+++ sling/whiteboard/SLING-2396/jcr.resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
Wed May 16 08:14:06 2012
@@ -41,6 +41,7 @@ import org.apache.sling.jcr.resource.int
 import org.apache.sling.jcr.resource.internal.helper.MapEntry;
 import org.apache.sling.jcr.resource.internal.helper.URI;
 import org.apache.sling.jcr.resource.internal.helper.URIException;
+import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -57,12 +58,12 @@ public class JcrResourceResolverWebConso
     private static final String PAR_MSG = "msg";
     private static final String PAR_TEST = "test";
 
-    private final transient JcrResourceResolverFactoryImpl resolverFactory;
+    private final transient ResourceResolverFactoryImpl resolverFactory;
 
     private transient ServiceRegistration service;
 
     JcrResourceResolverWebConsolePlugin(BundleContext context,
-            JcrResourceResolverFactoryImpl resolverFactory) {
+            ResourceResolverFactoryImpl resolverFactory) {
         this.resolverFactory = resolverFactory;
 
         Dictionary<String, Object> props = new Hashtable<String, Object>();

Modified: sling/whiteboard/SLING-2396/resourceresolver/pom.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/pom.xml?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/pom.xml (original)
+++ sling/whiteboard/SLING-2396/resourceresolver/pom.xml Wed May 16 08:14:06 2012
@@ -26,8 +26,8 @@
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.sling.jcr.resource</artifactId>
-    <version>2.1.1-SNAPSHOT</version>
+    <artifactId>org.apache.sling.resourceresolver</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling JCR Resource Resolver</name>

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrItemAdapterFactory.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrItemAdapterFactory.java?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrItemAdapterFactory.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrItemAdapterFactory.java
Wed May 16 08:14:06 2012
@@ -30,6 +30,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResource;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrPropertyResource;
+import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -43,11 +44,11 @@ class JcrItemAdapterFactory implements A
 
     private final Logger logger = LoggerFactory.getLogger(JcrItemAdapterFactory.class);
 
-    private final JcrResourceResolverFactoryImpl resourceResolverFactory;
+    private final ResourceResolverFactoryImpl resourceResolverFactory;
 
     private ServiceRegistration serviceRegsitration;
 
-    public JcrItemAdapterFactory(BundleContext ctx, JcrResourceResolverFactoryImpl resourceResolverFactory)
{
+    public JcrItemAdapterFactory(BundleContext ctx, ResourceResolverFactoryImpl resourceResolverFactory)
{
         this.resourceResolverFactory = resourceResolverFactory;
         Dictionary<Object, Object> properties = new Hashtable<Object, Object>();
         properties.put(ADAPTABLE_CLASSES, new String[] { Node.class.getName(), Property.class.getName()
});

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Wed May 16 08:14:06 2012
@@ -66,6 +66,7 @@ import org.apache.sling.jcr.resource.int
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderEntry;
 import org.apache.sling.jcr.resource.internal.helper.starresource.StarResource;
+import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -119,7 +120,7 @@ public class JcrResourceResolver
     private final JcrResourceProviderEntry rootProvider;
 
     /** The factory which created this resource resolver. */
-    private final JcrResourceResolverFactoryImpl factory;
+    private final ResourceResolverFactoryImpl factory;
 
     /** Is this a resource resolver for an admin? */
     private final boolean isAdmin;
@@ -139,7 +140,7 @@ public class JcrResourceResolver
     private final boolean useMultiWorkspaces;
 
     public JcrResourceResolver(final JcrResourceProviderEntry rootProvider,
-                               final JcrResourceResolverFactoryImpl factory,
+                               final ResourceResolverFactoryImpl factory,
                                final boolean isAdmin,
                                final Map<String, Object> originalAuthInfo,
                                boolean useMultiWorkspaces) {
@@ -278,7 +279,7 @@ public class JcrResourceResolver
             private String seek() {
                 while (keys.hasNext()) {
                     final String key = keys.next();
-                    if (JcrResourceResolverFactoryImpl.isAttributeVisible(key)) {
+                    if (ResourceResolverFactoryImpl.isAttributeVisible(key)) {
                         return key;
                     }
                 }
@@ -312,7 +313,7 @@ public class JcrResourceResolver
             throw new NullPointerException("name");
         }
 
-        if (JcrResourceResolverFactoryImpl.isAttributeVisible(name)) {
+        if (ResourceResolverFactoryImpl.isAttributeVisible(name)) {
             final Object sessionAttr = getSession().getAttribute(name);
             if (sessionAttr != null) {
                 return sessionAttr;

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
Wed May 16 08:14:06 2012
@@ -49,7 +49,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.jcr.resource.internal.JcrResourceResolver;
-import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
+import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -77,7 +77,7 @@ public class MapEntries implements Event
     /** default log */
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private JcrResourceResolverFactoryImpl factory;
+    private ResourceResolverFactoryImpl factory;
 
     private volatile ResourceResolver resolver;
 
@@ -109,7 +109,7 @@ public class MapEntries implements Event
         this.eventAdminTracker = null;
     }
 
-    public MapEntries(final JcrResourceResolverFactoryImpl factory,
+    public MapEntries(final ResourceResolverFactoryImpl factory,
                       final BundleContext bundleContext,
                       final ServiceTracker eventAdminTracker)
     throws LoginException {
@@ -178,7 +178,7 @@ public class MapEntries implements Event
         this.initializing.lock();
         try {
             final ResourceResolver resolver = this.resolver;
-            final JcrResourceResolverFactoryImpl factory = this.factory;
+            final ResourceResolverFactoryImpl factory = this.factory;
             if (resolver == null || factory == null) {
                 return;
             }
@@ -313,7 +313,7 @@ public class MapEntries implements Event
     /**
      * Handles the change to any of the node properties relevant for vanity URL
      * mappings. The
-     * {@link #MapEntries(JcrResourceResolverFactoryImpl, BundleContext, ServiceTracker)}
+     * {@link #MapEntries(ResourceResolverFactoryImpl, BundleContext, ServiceTracker)}
      * constructor makes sure the event listener is registered to only get
      * appropriate events.
      */
@@ -557,7 +557,7 @@ public class MapEntries implements Event
         return result;
     }
 
-    private void loadConfiguration(final JcrResourceResolverFactoryImpl factory,
+    private void loadConfiguration(final ResourceResolverFactoryImpl factory,
             final List<MapEntry> entries) {
         // virtual uris
         final Map<?, ?> virtuals = factory.getVirtualURLMap();
@@ -600,7 +600,7 @@ public class MapEntries implements Event
         }
     }
 
-    private void loadMapConfiguration(JcrResourceResolverFactoryImpl factory,
+    private void loadMapConfiguration(ResourceResolverFactoryImpl factory,
             Map<String, MapEntry> entries) {
         // URL Mappings
         Mapping[] mappings = factory.getMappings();

Modified: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/Mapping.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/Mapping.java?rev=1339051&r1=1339050&r2=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/Mapping.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/helper/Mapping.java
Wed May 16 08:14:06 2012
@@ -24,7 +24,7 @@ import java.util.regex.Pattern;
 /**
  * The <code>Mapping</code> class conveys the mapping configuration used by
  * the
- * {@link org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl}.
+ * {@link org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl}.
  */
 public class Mapping {
 

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
(from r1338778, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java&r1=1338778&r2=1339051&rev=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryImpl.java
Wed May 16 08:14:06 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.jcr.resource.internal;
+package org.apache.sling.resourceresolver.impl;
 
 import java.util.ArrayList;
 import java.util.Dictionary;
@@ -54,11 +54,16 @@ import org.apache.sling.commons.osgi.Osg
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.resource.JcrResourceConstants;
 import org.apache.sling.jcr.resource.JcrResourceResolverFactory;
+import org.apache.sling.jcr.resource.internal.JcrItemAdapterFactory;
+import org.apache.sling.jcr.resource.internal.JcrResourceListener;
+import org.apache.sling.jcr.resource.internal.JcrResourceResolver;
+import org.apache.sling.jcr.resource.internal.ResourceDecoratorTracker;
 import org.apache.sling.jcr.resource.internal.helper.MapEntries;
 import org.apache.sling.jcr.resource.internal.helper.Mapping;
 import org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry;
 import org.apache.sling.jcr.resource.internal.helper.RootResourceProviderEntry;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderEntry;
+import org.apache.sling.resourceresolver.impl.console.JcrResourceResolverWebConsolePlugin;
 import org.osgi.framework.Constants;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.event.EventAdmin;
@@ -91,7 +96,7 @@ import org.slf4j.LoggerFactory;
     @Reference(name="ResourceProvider", referenceInterface=ResourceProvider.class, cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
policy=ReferencePolicy.DYNAMIC),
     @Reference(name="ResourceDecorator", referenceInterface=ResourceDecorator.class, cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
policy=ReferencePolicy.DYNAMIC)    
 })
-public class JcrResourceResolverFactoryImpl implements
+public class ResourceResolverFactoryImpl implements
         JcrResourceResolverFactory, ResourceResolverFactory {
 
     public final static class ResourcePattern {
@@ -209,7 +214,7 @@ public class JcrResourceResolverFactoryI
 
     private JcrItemAdapterFactory jcrItemAdapterFactory;
 
-    public JcrResourceResolverFactoryImpl() {
+    public ResourceResolverFactoryImpl() {
         this.rootProviderEntry = new RootResourceProviderEntry();
 
     }

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

Copied: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java
(from r1338778, sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java)
URL: http://svn.apache.org/viewvc/sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java?p2=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java&p1=sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java&r1=1338778&r2=1339051&rev=1339051&view=diff
==============================================================================
--- sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java
(original)
+++ sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java
Wed May 16 08:14:06 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.jcr.resource.internal;
+package org.apache.sling.resourceresolver.impl.console;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -41,6 +41,7 @@ import org.apache.sling.jcr.resource.int
 import org.apache.sling.jcr.resource.internal.helper.MapEntry;
 import org.apache.sling.jcr.resource.internal.helper.URI;
 import org.apache.sling.jcr.resource.internal.helper.URIException;
+import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -57,12 +58,12 @@ public class JcrResourceResolverWebConso
     private static final String PAR_MSG = "msg";
     private static final String PAR_TEST = "test";
 
-    private final transient JcrResourceResolverFactoryImpl resolverFactory;
+    private final transient ResourceResolverFactoryImpl resolverFactory;
 
     private transient ServiceRegistration service;
 
     JcrResourceResolverWebConsolePlugin(BundleContext context,
-            JcrResourceResolverFactoryImpl resolverFactory) {
+            ResourceResolverFactoryImpl resolverFactory) {
         this.resolverFactory = resolverFactory;
 
         Dictionary<String, Object> props = new Hashtable<String, Object>();

Propchange: sling/whiteboard/SLING-2396/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/console/JcrResourceResolverWebConsolePlugin.java
------------------------------------------------------------------------------
    svn:mergeinfo = 



Mime
View raw message