incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1365498 - in /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource: JcrModifiablePropertyMap.java internal/helper/jcr/JcrResourceProvider.java
Date Wed, 25 Jul 2012 09:14:22 GMT
Author: cziegeler
Date: Wed Jul 25 09:14:21 2012
New Revision: 1365498

URL: http://svn.apache.org/viewvc?rev=1365498&view=rev
Log:
SLING-2530 : Implement CRUD based on resources

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrModifiablePropertyMap.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrModifiablePropertyMap.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrModifiablePropertyMap.java?rev=1365498&r1=1365497&r2=1365498&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrModifiablePropertyMap.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrModifiablePropertyMap.java
Wed Jul 25 09:14:21 2012
@@ -229,7 +229,7 @@ public final class JcrModifiableProperty
             }
             this.reset();
         } catch (final RepositoryException re) {
-            throw new PersistenceException("Unable to persist changes.", re);
+            throw new PersistenceException("Unable to persist changes.", re, getPath(), null);
         }
     }
 

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java?rev=1365498&r1=1365497&r2=1365498&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
Wed Jul 25 09:14:21 2012
@@ -402,7 +402,7 @@ public class JcrResourceProvider
 
             return new JcrNodeResource(resolver, node, this.dynamicClassLoader);
         } catch (final RepositoryException e) {
-            throw new PersistenceException("Unable to create node at " + path, e);
+            throw new PersistenceException("Unable to create node at " + path, e, path, null);
         }
     }
 
@@ -415,20 +415,20 @@ public class JcrResourceProvider
             if ( session.itemExists(path) ) {
                 session.getItem(path).remove();
             }
-            throw new PersistenceException("Unable to delete item at " + path);
+            throw new PersistenceException("Unable to delete item at " + path, null, path,
null);
         } catch (final RepositoryException e) {
-            throw new PersistenceException("Unable to delete item at " + path, e);
+            throw new PersistenceException("Unable to delete item at " + path, e, path, null);
         }
     }
 
     /**
      * @see org.apache.sling.api.resource.ModifyingResourceProvider#revert()
      */
-    public void revert() throws PersistenceException {
+    public void revert() {
         try {
             this.session.refresh(false);
-        } catch (final RepositoryException e) {
-            throw new PersistenceException("Unable to refresh session.", e);
+        } catch (final RepositoryException ignore) {
+            log.warn("Unable to revert pending changes.", ignore);
         }
     }
 



Mime
View raw message