incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r883717 - in /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal: ./ helper/ helper/jcr/
Date Tue, 24 Nov 2009 14:57:40 GMT
Author: cziegeler
Date: Tue Nov 24 14:57:39 2009
New Revision: 883717

URL: http://svn.apache.org/viewvc?rev=883717&view=rev
Log:
Remove "2" from class names.

Added:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
  (contents, props changed)
      - copied, changed from r881350, sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
  (contents, props changed)
      - copied, changed from r883715, sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry2.java
Removed:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry2.java
Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProviderEntry.java

Copied: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
(from r881350, sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java)
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?p2=sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java&p1=sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java&r1=881350&r2=883717&rev=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Tue Nov 24 14:57:39 2009
@@ -56,7 +56,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class JcrResourceResolver2 extends SlingAdaptable implements
+public class JcrResourceResolver extends SlingAdaptable implements
         ResourceResolver {
 
     private static final String MANGLE_NAMESPACE_IN_SUFFIX = "_";
@@ -90,7 +90,7 @@
 
     private final MapEntries resourceMapper;
 
-    public JcrResourceResolver2(JcrResourceProviderEntry rootProvider,
+    public JcrResourceResolver(JcrResourceProviderEntry rootProvider,
             JcrResourceResolverFactoryImpl factory, MapEntries resourceMapper) {
         this.rootProvider = rootProvider;
         this.factory = factory;

Propchange: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=883717&r1=883716&r2=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Tue Nov 24 14:57:39 2009
@@ -42,7 +42,7 @@
 import org.apache.sling.jcr.resource.JcrResourceTypeProvider;
 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.ResourceProviderEntry2;
+import org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderEntry;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -193,7 +193,7 @@
     // the search path for ResourceResolver.getResource(String)
     private String[] searchPath;
 
-    private ResourceProviderEntry2 rootProviderEntry;
+    private ResourceProviderEntry rootProviderEntry;
 
     // whether to mangle paths with namespaces or not
     private boolean mangleNamespacePrefixes;
@@ -210,7 +210,7 @@
     private DynamicClassLoaderManager dynamicClassLoaderManager;
 
     public JcrResourceResolverFactoryImpl() {
-        this.rootProviderEntry = new ResourceProviderEntry2("/", null);
+        this.rootProviderEntry = new ResourceProviderEntry("/", null);
 
     }
 
@@ -225,7 +225,7 @@
             session, rootProviderEntry, getJcrResourceTypeProviders(),
             this.getDynamicClassLoader());        
 
-        return new JcrResourceResolver2(sessionRoot, this, mapEntries);
+        return new JcrResourceResolver(sessionRoot, this, mapEntries);
     }
 
     protected JcrResourceTypeProvider[] getJcrResourceTypeProviders() {
@@ -288,7 +288,7 @@
      *
      * @return Our rootProviderEntry
      */
-    protected ResourceProviderEntry2 getRootProviderEntry() {
+    protected ResourceProviderEntry getRootProviderEntry() {
         return rootProviderEntry;
     }
 

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java?rev=883717&r1=883716&r2=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java
Tue Nov 24 14:57:39 2009
@@ -42,7 +42,7 @@
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.jcr.api.SlingRepository;
-import org.apache.sling.jcr.resource.internal.JcrResourceResolver2;
+import org.apache.sling.jcr.resource.internal.JcrResourceResolver;
 import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -62,7 +62,7 @@
 
     private JcrResourceResolverFactoryImpl factory;
 
-    private JcrResourceResolver2 resolver;
+    private JcrResourceResolver resolver;
 
     private Session session;
 
@@ -85,7 +85,7 @@
             SlingRepository repository) throws RepositoryException {
         this.factory = factory;
         this.session = repository.loginAdministrative(null);
-        this.resolver = (JcrResourceResolver2) factory.getResourceResolver(session);
+        this.resolver = (JcrResourceResolver) factory.getResourceResolver(session);
 
         init();
 
@@ -227,7 +227,7 @@
 
     // ---------- internal
 
-    private void loadResolverMap(JcrResourceResolver2 resolver,
+    private void loadResolverMap(JcrResourceResolver resolver,
             Collection<MapEntry> resolveEntries,
             Map<String, MapEntry> mapEntries) {
         // the standard map configuration
@@ -237,7 +237,7 @@
         }
     }
 
-    private void gather(JcrResourceResolver2 resolver,
+    private void gather(JcrResourceResolver resolver,
             Collection<MapEntry> resolveEntries,
             Map<String, MapEntry> mapEntries, Resource parent, String parentPath) {
         // scheme list
@@ -246,7 +246,7 @@
             Resource child = children.next();
 
             String name = resolver.getProperty(child,
-                JcrResourceResolver2.PROP_REG_EXP);
+                JcrResourceResolver.PROP_REG_EXP);
             boolean trailingSlash = false;
             if (name == null) {
                 name = ResourceUtil.getName(child).concat("/");
@@ -287,7 +287,7 @@
         }
     }
 
-    private void loadVanityPaths(JcrResourceResolver2 resolver,
+    private void loadVanityPaths(JcrResourceResolver resolver,
             List<MapEntry> entries) {
         // sling:VanityPath (uppercase V) is the mixin name
         // sling:vanityPath (lowercase) is the property name

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java?rev=883717&r1=883716&r2=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
Tue Nov 24 14:57:39 2009
@@ -28,7 +28,7 @@
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.jcr.resource.internal.JcrResourceResolver2;
+import org.apache.sling.jcr.resource.internal.JcrResourceResolver;
 
 /**
  * The <code>MapEntry</code> class represents a mapping entry in the mapping
@@ -130,15 +130,15 @@
             url = fixUriPath(url);
 
             String redirect = props.get(
-                JcrResourceResolver2.PROP_REDIRECT_EXTERNAL, String.class);
+                JcrResourceResolver.PROP_REDIRECT_EXTERNAL, String.class);
             if (redirect != null) {
                 int status = props.get(
-                    JcrResourceResolver2.PROP_REDIRECT_EXTERNAL_STATUS, 302);
+                    JcrResourceResolver.PROP_REDIRECT_EXTERNAL_STATUS, 302);
                 return new MapEntry(url, status, trailingSlash, redirect);
             }
 
             String[] internalRedirect = props.get(
-                JcrResourceResolver2.PROP_REDIRECT_INTERNAL, String[].class);
+                JcrResourceResolver.PROP_REDIRECT_INTERNAL, String[].class);
             if (internalRedirect != null) {
                 return new MapEntry(url, -1, trailingSlash, internalRedirect);
             }
@@ -152,7 +152,7 @@
         ValueMap props = resource.adaptTo(ValueMap.class);
         if (props != null) {
             String redirect = props.get(
-                JcrResourceResolver2.PROP_REDIRECT_EXTERNAL, String.class);
+                JcrResourceResolver.PROP_REDIRECT_EXTERNAL, String.class);
             if (redirect != null) {
                 // ignoring external redirects for mapping
                 return null;
@@ -166,7 +166,7 @@
             }
 
             String[] internalRedirect = props.get(
-                JcrResourceResolver2.PROP_REDIRECT_INTERNAL, String[].class);
+                JcrResourceResolver.PROP_REDIRECT_INTERNAL, String[].class);
             if (internalRedirect != null) {
 
                 int status = -1;

Copied: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
(from r883715, sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry2.java)
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java?p2=sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java&p1=sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry2.java&r1=883715&r2=883717&rev=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry2.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
Tue Nov 24 14:57:39 2009
@@ -47,15 +47,15 @@
  * This class is comparable to itself to help keep the child entries list sorted
  * by their prefix.
  */
-public class ResourceProviderEntry2 implements
-        Comparable<ResourceProviderEntry2> {
+public class ResourceProviderEntry implements
+        Comparable<ResourceProviderEntry> {
 
     /**
      *
      */
     private static final long serialVersionUID = 7420631325909144862L;
 
-    private static Logger LOGGER = LoggerFactory.getLogger(ResourceProviderEntry2.class);
+    private static Logger LOGGER = LoggerFactory.getLogger(ResourceProviderEntry.class);
 
     // the path to resources provided by the resource provider of this
     // entry. this path is relative to the path of the parent resource
@@ -91,7 +91,7 @@
      * @param providerList
      *            The resource provider to encapsulate by this entry.
      */
-    public ResourceProviderEntry2(String path, ResourceProvider[] providerList) {
+    public ResourceProviderEntry(String path, ResourceProvider[] providerList) {
         if (path.endsWith("/")) {
             this.path = path.substring(0, path.length() - 1);
             this.prefix = path;
@@ -264,12 +264,12 @@
     public boolean addResourceProvider(String prefix, ResourceProvider provider, Comparable<?>
comparable) {
         synchronized (this) {
             String[] elements = split(prefix, '/');
-            List<ResourceProviderEntry2> entryPath = new ArrayList<ResourceProviderEntry2>();
+            List<ResourceProviderEntry> entryPath = new ArrayList<ResourceProviderEntry>();
             entryPath.add(this); // add this the start so if the list is empty we have a
position to add to
             populateProviderPath(entryPath, elements);
             for (int i = entryPath.size() - 1; i < elements.length; i++) {
                 String stubPrefix = elements[i];
-                ResourceProviderEntry2 rpe2 = new ResourceProviderEntry2(
+                ResourceProviderEntry rpe2 = new ResourceProviderEntry(
                         stubPrefix, new ResourceProvider[0]);
                 entryPath.get(i).put(elements[i], rpe2);
                 entryPath.add(rpe2);
@@ -281,7 +281,7 @@
 
 
     //------------------ Map methods, here so that we can delegate 2 maps together
-    public void put(String key, ResourceProviderEntry2 value) {
+    public void put(String key, ResourceProviderEntry value) {
         storageMap.put(key,value);
     }
 
@@ -289,12 +289,12 @@
         return storageMap.containsKey(key);
     }
 
-    public ResourceProviderEntry2 get(String key) {
-        return (ResourceProviderEntry2) storageMap.get(key);
+    public ResourceProviderEntry get(String key) {
+        return (ResourceProviderEntry) storageMap.get(key);
     }
 
     @SuppressWarnings("unchecked")
-    public Collection<ResourceProviderEntry2> values() {
+    public Collection<ResourceProviderEntry> values() {
         return storageMap.values();
     }
 
@@ -302,7 +302,7 @@
             ResourceProvider resourceProvider, Comparable<?> comparable) {
         synchronized (this) {
             String[] elements = split(prefix, '/');
-            List<ResourceProviderEntry2> entryPath = new ArrayList<ResourceProviderEntry2>();
+            List<ResourceProviderEntry> entryPath = new ArrayList<ResourceProviderEntry>();
             populateProviderPath(entryPath, elements);
             if (entryPath.size() > 0 && entryPath.size() == elements.length) {
                 // the last element is a perfect match;
@@ -314,7 +314,7 @@
 
     // ---------- Comparable<ResourceProviderEntry> interface ------------------
 
-    public int compareTo(ResourceProviderEntry2 o) {
+    public int compareTo(ResourceProviderEntry o) {
         return prefix.compareTo(o.prefix);
     }
 
@@ -396,8 +396,8 @@
      *            the full path
      */
     private void populateProviderPath(
-        List<ResourceProviderEntry2> providerEntryPath, String[] elements) {
-        ResourceProviderEntry2 base = this;
+        List<ResourceProviderEntry> providerEntryPath, String[] elements) {
+        ResourceProviderEntry base = this;
         if (elements != null) {
             for (String element : elements) {
                 if (element != null) {
@@ -435,7 +435,7 @@
             }
             String[] elements = split(fullPath, '/');
 
-            List<ResourceProviderEntry2> list = new ArrayList<ResourceProviderEntry2>();
+            List<ResourceProviderEntry> list = new ArrayList<ResourceProviderEntry>();
             populateProviderPath(list, elements);
             // the path is in reverse order end first
 
@@ -506,7 +506,7 @@
     private void getResourceProviders(String path,
             Set<ResourceProvider> providers) {
         String[] elements = split(path, '/');
-        ResourceProviderEntry2 base = this;
+        ResourceProviderEntry base = this;
         for (String element : elements ) {
             if ( base.containsKey(element)) {
                 base = base.get(element);
@@ -540,11 +540,11 @@
      * @param base
      * @param providers2
      */
-    private void getResourceProviders(ResourceProviderEntry2 entry,
+    private void getResourceProviders(ResourceProviderEntry entry,
             Set<ResourceProvider> providers) {
         // recurse down the tree
         LOGGER.debug(" Gathering For {} ",entry.prefix);
-        for ( ResourceProviderEntry2 e : entry.values() ) {
+        for ( ResourceProviderEntry e : entry.values() ) {
             getResourceProviders(e, providers);
         }
         // add in providers at this node in the tree.

Propchange: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProviderEntry.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProviderEntry.java?rev=883717&r1=883716&r2=883717&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProviderEntry.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProviderEntry.java
Tue Nov 24 14:57:39 2009
@@ -26,23 +26,23 @@
 
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.jcr.resource.JcrResourceTypeProvider;
-import org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2;
+import org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry;
 
-public class JcrResourceProviderEntry extends ResourceProviderEntry2 {
+public class JcrResourceProviderEntry extends ResourceProviderEntry {
 
     /**
      *
      */
     private static final long serialVersionUID = 5672648586247261128L;
 
-    private final ResourceProviderEntry2 delegatee;
+    private final ResourceProviderEntry delegatee;
 
     private final Session session;
 
     private final JcrResourceTypeProvider[] resourceTypeProviders;
 
     public JcrResourceProviderEntry(Session session,
-            ResourceProviderEntry2 delegatee,
+            ResourceProviderEntry delegatee,
             JcrResourceTypeProvider[] resourceTypeProviders,
             final ClassLoader dynamicClassLoader) {
         super("/", new ResourceProvider[] { new JcrResourceProvider(session,
@@ -82,11 +82,11 @@
     /**
      * {@inheritDoc}
      *
-     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2#get(java.lang.String)
+     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry#get(java.lang.String)
      */
     @Override
-    public ResourceProviderEntry2 get(String key) {
-        ResourceProviderEntry2 rpe = super.get(key);
+    public ResourceProviderEntry get(String key) {
+        ResourceProviderEntry rpe = super.get(key);
         if (rpe == null) {
             rpe = delegatee.get(key);
         }
@@ -96,11 +96,11 @@
     /**
      * {@inheritDoc}
      *
-     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2#values()
+     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry#values()
      */
     @Override
-    public Collection<ResourceProviderEntry2> values() {
-        List<ResourceProviderEntry2> list = new ArrayList<ResourceProviderEntry2>(
+    public Collection<ResourceProviderEntry> values() {
+        List<ResourceProviderEntry> list = new ArrayList<ResourceProviderEntry>(
                 super.values());
         list.addAll(delegatee.values());
         return list;
@@ -109,7 +109,7 @@
     /**
      * {@inheritDoc}
      *
-     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2#containsKey(java.lang.String)
+     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry#containsKey(java.lang.String)
      */
     @Override
     public boolean containsKey(String key) {
@@ -119,7 +119,7 @@
     /**
      * {@inheritDoc}
      *
-     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2#getResourceProviders()
+     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry#getResourceProviders()
      */
     @Override
     public ResourceProvider[] getResourceProviders() {
@@ -150,7 +150,7 @@
     /**
      * {@inheritDoc}
      *
-     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry2#toString()
+     * @see org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry#toString()
      */
     @Override
     public String toString() {



Mime
View raw message