Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java
 Mon Mar 24 16:33:01 2014
@@ -70,7 +70,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public Node getParent() throws RepositoryException {
-        return perform(new PropertyOperation<Node>(dlg) {
+        return perform(new PropertyOperation<Node>(dlg, "getParent") {
             @Override
             public Node perform() throws RepositoryException {
                 NodeDelegate parent = property.getParent();
@@ -85,7 +85,7 @@ public class PropertyImpl extends ItemIm
 
     @Override
     public boolean isNew() {
-        return safePerform(new PropertyOperation<Boolean>(dlg) {
+        return safePerform(new PropertyOperation<Boolean>(dlg, "isNew") {
             @Override
             public Boolean perform() {
                 return property.getStatus() == Status.NEW;
@@ -95,7 +95,7 @@ public class PropertyImpl extends ItemIm
 
     @Override
     public boolean isModified() {
-        return safePerform(new PropertyOperation<Boolean>(dlg) {
+        return safePerform(new PropertyOperation<Boolean>(dlg, "isModified") {
             @Override
             public Boolean perform() {
                 return property.getStatus() == Status.MODIFIED;
@@ -105,16 +105,16 @@ public class PropertyImpl extends ItemIm
 
     @Override
     public void remove() throws RepositoryException {
-        perform(new ItemWriteOperation<Void>() {
+        perform(new ItemWriteOperation<Void>("remove") {
             @Override
-            public Void perform() throws RepositoryException {
+            public Void perform() {
                 dlg.remove();
                 return null;
             }
 
             @Override
-            public String description() throws RepositoryException {
-                return String.format("Removing property [%s/%s] 
",dlg.getPath(),dlg.getName());
+            public String toString() {
+                return String.format("Removing property [%s/%s] ", 
dlg.getPath(), dlg.getName());
             }
         });
     }
@@ -232,7 +232,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public Value getValue() throws RepositoryException {
-        return perform(new PropertyOperation<Value>(dlg) {
+        return perform(new PropertyOperation<Value>(dlg, "getValue") {
             @Override
             public Value perform() throws RepositoryException {
                 return ValueFactoryImpl.createValue(
@@ -244,7 +244,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public Value[] getValues() throws RepositoryException {
-        return perform(new PropertyOperation<List<Value>>(dlg) {
+        return perform(new PropertyOperation<List<Value>>(dlg, "getValues") {
             @Override
             public List<Value> perform() throws RepositoryException {
                 return ValueFactoryImpl.createValues(
@@ -302,7 +302,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public Node getNode() throws RepositoryException {
-        return perform(new PropertyOperation<Node>(dlg) {
+        return perform(new PropertyOperation<Node>(dlg, "getNode") {
             @Override
             public Node perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -355,7 +355,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public Property getProperty() throws RepositoryException {
-        return perform(new PropertyOperation<Property>(dlg) {
+        return perform(new PropertyOperation<Property>(dlg, "getProperty") {
             @Override
             public Property perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -391,7 +391,7 @@ public class PropertyImpl extends ItemIm
     @Override
     @Nonnull
     public PropertyDefinition getDefinition() throws RepositoryException {
-        return perform(new PropertyOperation<PropertyDefinition>(dlg) {
+        return perform(new PropertyOperation<PropertyDefinition>(dlg, 
"getDefinition") {
             @Override
             public PropertyDefinition perform() throws RepositoryException {
                 return getNodeTypeManager().getDefinition(
@@ -403,7 +403,7 @@ public class PropertyImpl extends ItemIm
 
     @Override
     public int getType() throws RepositoryException {
-        return perform(new PropertyOperation<Integer>(dlg) {
+        return perform(new PropertyOperation<Integer>(dlg, "getType") {
             @Override
             public Integer perform() throws RepositoryException {
                 return property.getPropertyState().getType().tag();
@@ -413,7 +413,7 @@ public class PropertyImpl extends ItemIm
 
     @Override
     public boolean isMultiple() throws RepositoryException {
-        return perform(new PropertyOperation<Boolean>(dlg) {
+        return perform(new PropertyOperation<Boolean>(dlg, "isMultiple") {
             @Override
             public Boolean perform() throws RepositoryException {
                 return property.getPropertyState().isArray();
@@ -438,9 +438,9 @@ public class PropertyImpl extends ItemIm
         }
     }
 
-    private void internalSetValue(final @Nonnull Value value)
+    private void internalSetValue(@Nonnull final Value value)
             throws RepositoryException {
-        perform(new ItemWriteOperation<Void>() {
+        perform(new ItemWriteOperation<Void>("internalSetValue") {
             @Override
             public Void perform() throws RepositoryException {
                 Type<?> type = dlg.getPropertyState().getType();
@@ -456,8 +456,8 @@ public class PropertyImpl extends ItemIm
             }
 
             @Override
-            public String description() throws RepositoryException {
-                return String.format("Setting property 
[%s/%s]",dlg.getPath(),dlg.getName());
+            public String toString() {
+                return String.format("Setting property [%s/%s]", 
dlg.getPath(), dlg.getName());
             }
         });
     }
@@ -468,7 +468,7 @@ public class PropertyImpl extends ItemIm
             LOG.warn("Large multi valued property detected ({} values).", 
values.length);
         }
 
-        perform(new ItemWriteOperation<Void>() {
+        perform(new ItemWriteOperation<Void>("internalSetValue") {
             @Override
             public Void perform() throws RepositoryException {
                 Type<?> type = dlg.getPropertyState().getType();
@@ -479,10 +479,10 @@ public class PropertyImpl extends ItemIm
 
                 List<Value> converted = 
newArrayListWithCapacity(values.length);
                 ValueFactory factory = getValueFactory();
-                for (int i = 0; i < values.length; i++) {
-                    if (values[i] != null) {
+                for (Value value : values) {
+                    if (value != null) {
                         converted.add(ValueHelper.convert(
-                                values[i], type.tag(), factory));
+                                value, type.tag(), factory));
                     }
                 }
                 dlg.setState(createMultiState(dlg.getName(), converted, type));
@@ -490,8 +490,8 @@ public class PropertyImpl extends ItemIm
             }
 
             @Override
-            public String description() throws RepositoryException {
-                return String.format("Setting property 
[%s/%s]",dlg.getPath(),dlg.getName());
+            public String toString() {
+                return String.format("Setting property [%s/%s]", 
dlg.getPath(), dlg.getName());
             }
         });
     }

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java
 Mon Mar 24 16:33:01 2014
@@ -397,9 +397,9 @@ public class SessionContext implements N
      */
     // TODO: should this be in SessionImpl?
     private void unlockAllSessionScopedLocks() throws RepositoryException {
-        delegate.perform(new SessionOperation<Void>() {
+        delegate.perform(new 
SessionOperation<Void>("unlockAllSessionScopedLocks") {
             @Override
-            public Void perform() throws RepositoryException {
+            public Void perform() {
                 Iterator<String> iterator = sessionScopedLocks.iterator();
                 while (iterator.hasNext()) {
                     NodeDelegate node = delegate.getNode(iterator.next());

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionImpl.java
 Mon Mar 24 16:33:01 2014
@@ -101,6 +101,10 @@ public class SessionImpl implements Jack
     }
 
     private abstract class ReadOperation<T> extends SessionOperation<T> {
+        protected ReadOperation(String name) {
+            super(name);
+        }
+
         @Override
         public void checkPreconditions() throws RepositoryException {
             sd.checkAlive();
@@ -108,14 +112,13 @@ public class SessionImpl implements Jack
     }
 
     private abstract class WriteOperation<T> extends SessionOperation<T> {
-        @Override
-        public void checkPreconditions() throws RepositoryException {
-            sd.checkAlive();
+        protected WriteOperation(String name) {
+            super(name, true);
         }
 
         @Override
-        public boolean isUpdate() {
-            return true;
+        public void checkPreconditions() throws RepositoryException {
+            sd.checkAlive();
         }
     }
 
@@ -166,7 +169,7 @@ public class SessionImpl implements Jack
      */
     @CheckForNull
     public Node getNodeOrNull(final String absPath) throws RepositoryException 
{
-        return perform(new ReadOperation<Node>() {
+        return perform(new ReadOperation<Node>("getNodeOrNull") {
             @Override
             public Node perform() throws RepositoryException {
                 try {
@@ -197,7 +200,7 @@ public class SessionImpl implements Jack
             } catch (PathNotFoundException e) {
                 return null;
             }
-            return perform(new ReadOperation<Property>() {
+            return perform(new ReadOperation<Property>("getPropertyOrNull") {
                 @Override
                 public Property perform() throws RepositoryException {
                     PropertyDelegate pd = sd.getProperty(oakPath);
@@ -222,7 +225,7 @@ public class SessionImpl implements Jack
      */
     @CheckForNull
     public Item getItemOrNull(final String absPath) throws RepositoryException 
{
-        return perform(new ReadOperation<Item>() {
+        return perform(new ReadOperation<Item>("getItemOrNull") {
             @Override
             public Item perform() throws RepositoryException {
                 return getItemInternal(getOakPathOrThrow(absPath));
@@ -283,7 +286,7 @@ public class SessionImpl implements Jack
     @Override
     @Nonnull
     public Node getRootNode() throws RepositoryException {
-        return perform(new ReadOperation<Node>() {
+        return perform(new ReadOperation<Node>("getRootNode") {
             @Override
             public Node perform() throws RepositoryException {
                 NodeDelegate nd = sd.getRootNode();
@@ -311,7 +314,7 @@ public class SessionImpl implements Jack
 
     @Nonnull
     private Node getNodeById(final String id) throws RepositoryException {
-        return perform(new ReadOperation<Node>() {
+        return perform(new ReadOperation<Node>("getNodeById") {
             @Override
             public Node perform() throws RepositoryException {
                 NodeDelegate nd = sd.getNodeByIdentifier(id);
@@ -368,7 +371,7 @@ public class SessionImpl implements Jack
         checkIndexOnName(sessionContext, destAbsPath);
         final String srcOakPath = getOakPathOrThrowNotFound(srcAbsPath);
         final String destOakPath = getOakPathOrThrowNotFound(destAbsPath);
-        sd.perform(new WriteOperation<Void>() {
+        sd.perform(new WriteOperation<Void>("move") {
             @Override
             public void checkPreconditions() throws RepositoryException {
                 super.checkPreconditions();
@@ -387,7 +390,7 @@ public class SessionImpl implements Jack
     @Override
     public void removeItem(final String absPath) throws RepositoryException {
         final String oakPath = getOakPathOrThrowNotFound(absPath);
-        perform(new WriteOperation<Void>() {
+        perform(new WriteOperation<Void>("removeItem") {
             @Override
             public Void perform() throws RepositoryException {
                 ItemDelegate item = sd.getItem(oakPath);
@@ -408,7 +411,7 @@ public class SessionImpl implements Jack
 
     @Override
     public void save() throws RepositoryException {
-        perform(new WriteOperation<Void>() {
+        perform(new WriteOperation<Void>("save") {
             @Override
             public Void perform() throws RepositoryException {
                 sd.save(null);
@@ -421,7 +424,7 @@ public class SessionImpl implements Jack
             }
 
             @Override
-            public String description() {
+            public String toString() {
                 return "Session saved";
             }
         });
@@ -429,7 +432,7 @@ public class SessionImpl implements Jack
 
     @Override
     public void refresh(final boolean keepChanges) throws RepositoryException {
-        perform(new WriteOperation<Void>() {
+        perform(new WriteOperation<Void>("refresh") {
             @Override
             public Void perform() {
                 sd.refresh(keepChanges);
@@ -459,7 +462,7 @@ public class SessionImpl implements Jack
     public void logout() {
         if (sd.isAlive()) {
             sessionCounter.decrementAndGet();
-            safePerform(new SessionOperation<Void>() {
+            safePerform(new SessionOperation<Void>("logout") {
                 @Override
                 public Void perform() {
                     sessionContext.dispose();
@@ -605,7 +608,7 @@ public class SessionImpl implements Jack
     @Override
     public boolean hasPermission(String absPath, final String actions) throws 
RepositoryException {
         final String oakPath = getOakPathOrThrow(absPath);
-        return perform(new ReadOperation<Boolean>() {
+        return perform(new ReadOperation<Boolean>("hasPermission") {
             @Override
             public Boolean perform() throws RepositoryException {
                 return 
sessionContext.getAccessManager().hasPermissions(oakPath, actions);

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/WorkspaceImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/WorkspaceImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/WorkspaceImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/WorkspaceImpl.java
 Mon Mar 24 16:33:01 2014
@@ -16,8 +16,12 @@
  */
 package org.apache.jackrabbit.oak.jcr.session;
 
+import static org.apache.jackrabbit.oak.commons.PathUtils.getParentPath;
+import static 
org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
+
 import java.io.IOException;
 import java.io.InputStream;
+
 import javax.annotation.Nonnull;
 import javax.jcr.InvalidSerializedDataException;
 import javax.jcr.NamespaceRegistry;
@@ -52,9 +56,6 @@ import org.xml.sax.ContentHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-import static org.apache.jackrabbit.oak.commons.PathUtils.getParentPath;
-import static 
org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
-
 /**
  * TODO document
  */
@@ -136,7 +137,7 @@ public class WorkspaceImpl implements Ja
             throw new UnsupportedRepositoryOperationException("Not 
implemented.");
         }
 
-        sessionDelegate.perform(new SessionOperation<Object>(true) {
+        sessionDelegate.perform(new SessionOperation<Object>("copy", true) {
             @Override
             public void checkPreconditions() throws RepositoryException {
                 super.checkPreconditions();
@@ -162,7 +163,7 @@ public class WorkspaceImpl implements Ja
         final String srcOakPath = getOakPathOrThrowNotFound(srcAbsPath);
         final String destOakPath = getOakPathOrThrowNotFound(destAbsPath);
 
-        sessionDelegate.perform(new SessionOperation<Object>(true) {
+        sessionDelegate.perform(new SessionOperation<Object>("clone", true) {
 
             @Override
             public void checkPreconditions() throws RepositoryException {

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/ItemOperation.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/ItemOperation.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/ItemOperation.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/ItemOperation.java
 Mon Mar 24 16:33:01 2014
@@ -24,7 +24,8 @@ public abstract class ItemOperation<U> e
 
     protected final ItemDelegate item;
 
-    protected ItemOperation(ItemDelegate item) {
+    protected ItemOperation(ItemDelegate item, String name) {
+        super(name);
         this.item = item;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/NodeOperation.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/NodeOperation.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/NodeOperation.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/NodeOperation.java
 Mon Mar 24 16:33:01 2014
@@ -22,8 +22,8 @@ public abstract class NodeOperation<U> e
 
     protected final NodeDelegate node;
 
-    protected NodeOperation(NodeDelegate node) {
-        super(node);
+    protected NodeOperation(NodeDelegate node, String name) {
+        super(node, name);
         this.node = node;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/PropertyOperation.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/PropertyOperation.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/PropertyOperation.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/PropertyOperation.java
 Mon Mar 24 16:33:01 2014
@@ -22,8 +22,8 @@ public abstract class PropertyOperation<
 
     protected final PropertyDelegate property;
 
-    protected PropertyOperation(PropertyDelegate property) {
-        super(property);
+    protected PropertyOperation(PropertyDelegate property, String name) {
+        super(property, name);
         this.property = property;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/SessionOperation.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/SessionOperation.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/SessionOperation.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/SessionOperation.java
 Mon Mar 24 16:33:01 2014
@@ -25,15 +25,16 @@ import javax.jcr.RepositoryException;
  * @see 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate#perform(SessionOperation)
  */
 public abstract class SessionOperation<T> {
-
+    private final String name;
     private final boolean update;
 
-    protected SessionOperation(boolean update) {
+    protected SessionOperation(String name, boolean update) {
+        this.name = name;
         this.update = update;
     }
 
-    protected SessionOperation() {
-        this(false);
+    protected SessionOperation(String name) {
+        this(name, false);
     }
 
     /**
@@ -66,13 +67,13 @@ public abstract class SessionOperation<T
     public abstract T perform() throws RepositoryException;
 
     /**
-     * Provide details about the operation being performed
-     *
-     * @return operation description. Would return {@code null}
-     * if no description provided
+     * Provide details about the operation being performed.
+     * This default implementation just returns the
+     * name passed to the constructor.
      */
-    public String description() throws RepositoryException{
-        return null;
+    @Override
+    public String toString() {
+        return name;
     }
 
 }

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/UserManagerOperation.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/UserManagerOperation.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/UserManagerOperation.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/operation/UserManagerOperation.java
 Mon Mar 24 16:33:01 2014
@@ -26,7 +26,8 @@ import org.apache.jackrabbit.oak.jcr.del
 public abstract class UserManagerOperation<T> extends SessionOperation<T> {
     private final SessionDelegate delegate;
 
-    protected UserManagerOperation(SessionDelegate delegate) {
+    protected UserManagerOperation(SessionDelegate delegate, String name) {
+        super(name);
         this.delegate = delegate;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionHistoryImpl.java
 Mon Mar 24 16:33:01 2014
@@ -16,10 +16,13 @@
  */
 package org.apache.jackrabbit.oak.jcr.version;
 
+import static com.google.common.collect.Iterators.transform;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
+
 import javax.jcr.AccessDeniedException;
 import javax.jcr.NodeIterator;
 import javax.jcr.ReferentialIntegrityException;
@@ -40,8 +43,6 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.session.SessionContext;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
 
-import static com.google.common.collect.Iterators.transform;
-
 /**
  * {@code VersionHistoryImpl}...
  */
@@ -59,7 +60,7 @@ public class VersionHistoryImpl extends 
 
     @Override
     public String getVersionableIdentifier() throws RepositoryException {
-        return perform(new SessionOperation<String>() {
+        return perform(new 
SessionOperation<String>("getVersionableIdentifier") {
             @Override
             public String perform() throws RepositoryException {
                 return dlg.getVersionableIdentifier();
@@ -69,7 +70,7 @@ public class VersionHistoryImpl extends 
 
     @Override
     public Version getRootVersion() throws RepositoryException {
-        return perform(new SessionOperation<Version>() {
+        return perform(new SessionOperation<Version>("getRootVersion") {
             @Override
             public Version perform() throws RepositoryException {
                 return new VersionImpl(dlg.getRootVersion(), sessionContext);
@@ -79,7 +80,7 @@ public class VersionHistoryImpl extends 
 
     @Override
     public VersionIterator getAllLinearVersions() throws RepositoryException {
-        return perform(new SessionOperation<VersionIterator>() {
+        return perform(new 
SessionOperation<VersionIterator>("getAllLinearVersions") {
             @Override
             public VersionIterator perform() throws RepositoryException {
                 Iterator<Version> versions = 
transform(dlg.getAllLinearVersions(),
@@ -96,7 +97,7 @@ public class VersionHistoryImpl extends 
 
     @Override
     public VersionIterator getAllVersions() throws RepositoryException {
-        return perform(new SessionOperation<VersionIterator>() {
+        return perform(new SessionOperation<VersionIterator>("getAllVersions") 
{
             @Override
             public VersionIterator perform() throws RepositoryException {
                 Iterator<Version> versions = transform(dlg.getAllVersions(),
@@ -124,7 +125,7 @@ public class VersionHistoryImpl extends 
     @Override
     public Version getVersion(final String versionName)
             throws VersionException, RepositoryException {
-        return perform(new SessionOperation<Version>() {
+        return perform(new SessionOperation<Version>("getVersion") {
             @Override
             public Version perform() throws RepositoryException {
                 return new VersionImpl(dlg.getVersion(versionName), 
sessionContext);
@@ -135,7 +136,7 @@ public class VersionHistoryImpl extends 
     @Override
     public Version getVersionByLabel(final String label)
             throws VersionException, RepositoryException {
-        return perform(new SessionOperation<Version>() {
+        return perform(new SessionOperation<Version>("getVersionByLabel") {
             @Override
             public Version perform() throws RepositoryException {
                 String oakLabel = sessionContext.getOakName(label);
@@ -150,7 +151,7 @@ public class VersionHistoryImpl extends 
                                 final boolean moveLabel)
             throws LabelExistsVersionException, VersionException,
             RepositoryException {
-        perform(new SessionOperation<Void>(true) {
+        perform(new SessionOperation<Void>("addVersionLabel", true) {
             @Override
             public Void perform() throws RepositoryException {
                 String oakLabel = sessionContext.getOakName(label);
@@ -165,7 +166,7 @@ public class VersionHistoryImpl extends 
     @Override
     public void removeVersionLabel(final String label)
             throws VersionException, RepositoryException {
-        perform(new SessionOperation<Void>(true) {
+        perform(new SessionOperation<Void>("removeVersionLabel", true) {
             @Override
             public Void perform() throws RepositoryException {
                 String oakLabel = sessionContext.getOakName(label);
@@ -188,7 +189,7 @@ public class VersionHistoryImpl extends 
 
     @Override
     public String[] getVersionLabels() throws RepositoryException {
-        return perform(new SessionOperation<String[]>() {
+        return perform(new SessionOperation<String[]>("getVersionLabels") {
             @Override
             public String[] perform() throws RepositoryException {
                 List<String> labels = new ArrayList<String>();
@@ -207,7 +208,7 @@ public class VersionHistoryImpl extends 
             throw new VersionException("Version is not contained in this " +
                     "VersionHistory");
         }
-        return perform(new SessionOperation<String[]>() {
+        return perform(new SessionOperation<String[]>("getVersionLabels") {
             @Override
             public String[] perform() throws RepositoryException {
                 List<String> labels = new ArrayList<String>();
@@ -225,7 +226,7 @@ public class VersionHistoryImpl extends 
             UnsupportedRepositoryOperationException, VersionException,
             RepositoryException {
 
-        perform(new SessionOperation<Void>(true) {
+        perform(new SessionOperation<Void>("removeVersion", true) {
             @Override
             public Void perform() throws RepositoryException {
                 String oakName = sessionContext.getOakName(versionName);

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionImpl.java
 Mon Mar 24 16:33:01 2014
@@ -51,7 +51,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public VersionHistory getContainingHistory() throws RepositoryException {
-        return perform(new SessionOperation<VersionHistory>() {
+        return perform(new 
SessionOperation<VersionHistory>("getContainingHistory") {
             @Override
             public VersionHistory perform() throws RepositoryException {
                 return new VersionHistoryImpl(
@@ -63,7 +63,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Calendar getCreated() throws RepositoryException {
-        return sessionDelegate.perform(new SessionOperation<Calendar>() {
+        return sessionDelegate.perform(new 
SessionOperation<Calendar>("getCreated") {
             @Override
             public Calendar perform() throws RepositoryException {
                 PropertyDelegate dlg = 
getPropertyOrThrow(JcrConstants.JCR_CREATED);
@@ -74,7 +74,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Version getLinearPredecessor() throws RepositoryException {
-        return perform(new SessionOperation<Version>() {
+        return perform(new SessionOperation<Version>("getLinearPredecessor") {
             @Override
             public Version perform() throws RepositoryException {
                 VersionDelegate predecessor = dlg.getLinearPredecessor();
@@ -89,7 +89,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Version getLinearSuccessor() throws RepositoryException {
-        return perform(new SessionOperation<Version>() {
+        return perform(new SessionOperation<Version>("getLinearSuccessor") {
             @Override
             public Version perform() throws RepositoryException {
                 VersionHistoryDelegate vHistory = getVersionManagerDelegate()
@@ -116,7 +116,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Version[] getPredecessors() throws RepositoryException {
-        return perform(new SessionOperation<Version[]>() {
+        return perform(new SessionOperation<Version[]>("getPredecessors") {
             @Override
             public Version[] perform() throws RepositoryException {
                 List<Version> predecessors = new ArrayList<Version>();
@@ -130,7 +130,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Version[] getSuccessors() throws RepositoryException {
-        return perform(new SessionOperation<Version[]>() {
+        return perform(new SessionOperation<Version[]>("getSuccessors") {
             @Override
             public Version[] perform() throws RepositoryException {
                 PropertyDelegate p = 
getPropertyOrThrow(VersionConstants.JCR_SUCCESSORS);
@@ -147,7 +147,7 @@ public class VersionImpl extends NodeImp
 
     @Override
     public Node getFrozenNode() throws RepositoryException {
-        return perform(new SessionOperation<Node>() {
+        return perform(new SessionOperation<Node>("getFrozenNode") {
             @Override
             public Node perform() throws RepositoryException {
                 return NodeImpl.createNodeOrNull(

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java?rev=1580906&r1=1580905&r2=1580906&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java
 Mon Mar 24 16:33:01 2014
@@ -78,7 +78,7 @@ public class VersionManagerImpl implemen
                         final boolean removeExisting)
             throws RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        sessionDelegate.perform(new SessionOperation<Void>(true) {
+        sessionDelegate.perform(new SessionOperation<Void>("restore", true) {
             @Override
             public Void perform() throws RepositoryException {
                 String oakPath = getOakPathOrThrowNotFound(absPath);
@@ -165,7 +165,7 @@ public class VersionManagerImpl implemen
             throw new VersionException("Restore of root version not possible");
         }
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        sessionDelegate.perform(new SessionOperation<Void>(true) {
+        sessionDelegate.perform(new SessionOperation<Void>("restore", true) {
             @Override
             public Void perform() throws RepositoryException {
                 // check for pending changes
@@ -251,7 +251,7 @@ public class VersionManagerImpl implemen
     @Override
     public boolean isCheckedOut(final String absPath) throws 
RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        return sessionDelegate.perform(new SessionOperation<Boolean>() {
+        return sessionDelegate.perform(new 
SessionOperation<Boolean>("isCheckoutOut") {
             @Override
             public Boolean perform() throws RepositoryException {
                 String oakPath = getOakPathOrThrowNotFound(absPath);
@@ -268,7 +268,7 @@ public class VersionManagerImpl implemen
     public VersionHistory getVersionHistory(final String absPath)
             throws RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        return sessionDelegate.perform(new SessionOperation<VersionHistory>() {
+        return sessionDelegate.perform(new 
SessionOperation<VersionHistory>("getVersionHistory") {
             @Override
             public VersionHistory perform() throws RepositoryException {
                 return new VersionHistoryImpl(
@@ -280,7 +280,7 @@ public class VersionManagerImpl implemen
     @Override
     public Version getBaseVersion(final String absPath) throws 
RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        return sessionDelegate.perform(new SessionOperation<Version>() {
+        return sessionDelegate.perform(new 
SessionOperation<Version>("getBaseVersion") {
             @Override
             public Version perform() throws RepositoryException {
                 String oakPath = getOakPathOrThrowNotFound(absPath);
@@ -326,7 +326,7 @@ public class VersionManagerImpl implemen
     @Override
     public void checkout(final String absPath) throws RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        sessionDelegate.perform(new SessionOperation<Void>(true) {
+        sessionDelegate.perform(new SessionOperation<Void>("checkout", true) {
             @Override
             public Void perform() throws RepositoryException {
                 String oakPath = getOakPathOrThrowNotFound(absPath);
@@ -344,7 +344,7 @@ public class VersionManagerImpl implemen
     @Override
     public Version checkin(final String absPath) throws RepositoryException {
         final SessionDelegate sessionDelegate = 
sessionContext.getSessionDelegate();
-        return sessionDelegate.perform(new SessionOperation<Version>(true) {
+        return sessionDelegate.perform(new 
SessionOperation<Version>("checkin", true) {
             @Override
             public Version perform() throws RepositoryException {
                 String oakPath = getOakPathOrThrowNotFound(absPath);


Reply via email to