sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1525343 - in /sling/trunk/contrib/extensions/mongodb: pom.xml src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java
Date Sun, 22 Sep 2013 10:38:08 GMT
Author: cziegeler
Date: Sun Sep 22 10:38:08 2013
New Revision: 1525343

URL: http://svn.apache.org/r1525343
Log:
Use latest mongo driver

Modified:
    sling/trunk/contrib/extensions/mongodb/pom.xml
    sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java
    sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java

Modified: sling/trunk/contrib/extensions/mongodb/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/mongodb/pom.xml?rev=1525343&r1=1525342&r2=1525343&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/mongodb/pom.xml (original)
+++ sling/trunk/contrib/extensions/mongodb/pom.xml Sun Sep 22 10:38:08 2013
@@ -76,7 +76,7 @@
         <dependency>
         	<groupId>org.mongodb</groupId>
         	<artifactId>mongo-java-driver</artifactId>
-        	<version>2.9.1</version>
+        	<version>2.11.3</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java?rev=1525343&r1=1525342&r2=1525343&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java
(original)
+++ sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResource.java
Sun Sep 22 10:38:08 2013
@@ -58,6 +58,13 @@ public class MongoDBResource extends Abs
         this.provider = provider;
     }
 
+    public MongoDBResource(final MongoDBResource source) {
+        this.resourceResolver = source.resourceResolver;
+        this.resourcePath = source.resourcePath;
+        this.collection = source.collection;
+        this.dbObject = source.dbObject;
+        this.provider = source.provider;
+    }
     /**
      * @see org.apache.sling.api.resource.Resource#getPath()
      */

Modified: sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java?rev=1525343&r1=1525342&r2=1525343&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java
(original)
+++ sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/MongoDBResourceProvider.java
Sun Sep 22 10:38:08 2013
@@ -230,7 +230,7 @@ public class MongoDBResourceProvider imp
             return null;
         }
         if ( this.changedResources.containsKey(path) ) {
-            return this.changedResources.get(path);
+            return new MongoDBResource(this.changedResources.get(path));
         }
         final String[] info = this.extractResourceInfo(path);
         if ( info != null ) {
@@ -366,12 +366,12 @@ public class MongoDBResourceProvider imp
         return names.contains(name) && !this.context.isFilterCollectionName(name);
     }
 
-    
+
     /**
      * Check if a collection with a given name exists and return it
      */
     protected DBCollection getCollection(final String name) {
-        if ( this.hasCollection(name) ) {            
+        if ( this.hasCollection(name) ) {
             return this.context.getDatabase().getCollection(name);
         }
         return null;
@@ -418,19 +418,19 @@ public class MongoDBResourceProvider imp
         }
         return dbObj;
     }
-    
+
     protected Set<String> getDeletedResources() {
         return this.deletedResources;
     }
-    
+
     protected Map<String, MongoDBResource> getChangedResources() {
         return this.changedResources;
     }
-    
+
     protected MongoDBContext getContext() {
         return this.context;
     }
-    
+
     protected String getPROP_PATH() {
         return PROP_PATH;
     }



Mime
View raw message