jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r994954 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ./ security/user/ session/
Date Wed, 08 Sep 2010 09:56:05 GMT
Author: jukka
Date: Wed Sep  8 09:56:05 2010
New Revision: 994954

URL: http://svn.apache.org/viewvc?rev=994954&view=rev
Log:
JCR-2741: Improved logging for session operations

Add a marker interface for write operations

Added:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java
  (with props)
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/AddMixinOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemRemoveOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemSaveOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RemoveMixinOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/VersionManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/AddNodeOperation.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/AddMixinOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/AddMixinOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/AddMixinOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/AddMixinOperation.java
Wed Sep  8 09:56:05 2010
@@ -38,7 +38,7 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
@@ -47,7 +47,7 @@ import org.apache.jackrabbit.spi.commons
 /**
  * Session operation for adding a mixin type to a node.
  */
-class AddMixinOperation implements SessionOperation<Object> {
+class AddMixinOperation implements SessionWriteOperation<Object> {
 
     private final NodeImpl node;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemRemoveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemRemoveOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemRemoveOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemRemoveOperation.java
Wed Sep  8 09:56:05 2010
@@ -27,14 +27,14 @@ import javax.jcr.RepositoryException;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.spi.Path;
 
 /**
  * Session operation for removing a given item, optionally with constraint
  * checks enabled.
  */
-class ItemRemoveOperation implements SessionOperation<Object> {
+class ItemRemoveOperation implements SessionWriteOperation<Object> {
 
     /**
      * The item to be removed.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemSaveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemSaveOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemSaveOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemSaveOperation.java
Wed Sep  8 09:56:05 2010
@@ -49,7 +49,7 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.security.AccessManager;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.ItemStateException;
@@ -66,13 +66,13 @@ import org.apache.jackrabbit.spi.QItemDe
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.util.Text;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The session operation triggered by {@link Item#save()}.
  */
-class ItemSaveOperation implements SessionOperation<Object> {
+class ItemSaveOperation implements SessionWriteOperation<Object> {
 
     /**
      * Logger instance.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Wed Sep  8 09:56:05 2010
@@ -16,6 +16,13 @@
  */
 package org.apache.jackrabbit.core;
 
+import static javax.jcr.PropertyType.STRING;
+import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_CURRENT_LIFECYCLE_STATE;
+import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_ISCHECKEDOUT;
+import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_LIFECYCLE_POLICY;
+import static org.apache.jackrabbit.spi.commons.name.NameConstants.MIX_LIFECYCLE;
+import static org.apache.jackrabbit.spi.commons.name.NameConstants.MIX_REFERENCEABLE;
+
 import java.io.InputStream;
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -82,6 +89,7 @@ import org.apache.jackrabbit.core.securi
 import org.apache.jackrabbit.core.session.AddNodeOperation;
 import org.apache.jackrabbit.core.session.SessionContext;
 import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.ItemStateException;
@@ -97,9 +105,6 @@ import org.apache.jackrabbit.spi.QProper
 import org.apache.jackrabbit.spi.commons.conversion.MalformedPathException;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-
-import static javax.jcr.PropertyType.STRING;
-import static org.apache.jackrabbit.spi.commons.name.NameConstants.*;
 import org.apache.jackrabbit.spi.commons.name.PathBuilder;
 import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
 import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
@@ -1913,7 +1918,7 @@ public class NodeImpl extends ItemImpl i
      * definition and the implementation tries to convert the passed value to
      * that type. If that fails, then a {@link ValueFormatException} is thrown.
      */
-    private class SetPropertyOperation implements SessionOperation<PropertyImpl> {
+    private class SetPropertyOperation implements SessionWriteOperation<PropertyImpl>
{
 
         private final Name name;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RemoveMixinOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RemoveMixinOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RemoveMixinOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RemoveMixinOperation.java
Wed Sep  8 09:56:05 2010
@@ -45,7 +45,7 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.NodeState;
@@ -60,7 +60,7 @@ import org.apache.jackrabbit.value.Value
 /**
  * Session operation for removing a mixin type from a node.
  */
-class RemoveMixinOperation implements SessionOperation<Object> {
+class RemoveMixinOperation implements SessionWriteOperation<Object> {
 
     private final NodeImpl node;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
Wed Sep  8 09:56:05 2010
@@ -28,7 +28,7 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.security.AccessManager;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
@@ -36,7 +36,7 @@ import org.apache.jackrabbit.spi.commons
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class SessionMoveOperation implements SessionOperation<Object> {
+public class SessionMoveOperation implements SessionWriteOperation<Object> {
 
     private final Logger log =
         LoggerFactory.getLogger(SessionMoveOperation.class);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/VersionManagerImpl.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/VersionManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/VersionManagerImpl.java
Wed Sep  8 09:56:05 2010
@@ -44,17 +44,18 @@ import org.apache.jackrabbit.core.id.Nod
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.session.SessionContext;
 import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.UpdatableItemStateManager;
 import org.apache.jackrabbit.core.version.InternalActivity;
+import org.apache.jackrabbit.core.version.InternalBaseline;
 import org.apache.jackrabbit.core.version.InternalVersion;
 import org.apache.jackrabbit.core.version.InternalVersionHistory;
 import org.apache.jackrabbit.core.version.NodeStateEx;
 import org.apache.jackrabbit.core.version.VersionImpl;
 import org.apache.jackrabbit.core.version.VersionManagerImplConfig;
 import org.apache.jackrabbit.core.version.VersionSet;
-import org.apache.jackrabbit.core.version.InternalBaseline;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
@@ -110,7 +111,7 @@ public class VersionManagerImpl extends 
      */
     public Version checkin(final String absPath, final Calendar created)
             throws RepositoryException {
-        return perform(new SessionOperation<Version> () {
+        return perform(new SessionWriteOperation<Version> () {
             public Version perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(
@@ -127,7 +128,7 @@ public class VersionManagerImpl extends 
      * {@inheritDoc}
      */
     public void checkout(final String absPath) throws RepositoryException {
-        perform(new SessionOperation<NodeId> () {
+        perform(new SessionWriteOperation<NodeId> () {
             public NodeId perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(
@@ -143,7 +144,7 @@ public class VersionManagerImpl extends 
      * {@inheritDoc}
      */
     public Version checkpoint(final String absPath) throws RepositoryException {
-        return perform(new SessionOperation<Version> () {
+        return perform(new SessionWriteOperation<Version> () {
             public Version perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(
@@ -202,7 +203,7 @@ public class VersionManagerImpl extends 
      */
     public void restore(final Version[] versions, final boolean removeExisting)
             throws RepositoryException {
-        perform(new SessionOperation<Object> () {
+        perform(new SessionWriteOperation<Object> () {
             public Object perform(SessionContext context)
                     throws RepositoryException {
                 // check for pending changes
@@ -248,7 +249,7 @@ public class VersionManagerImpl extends 
     public void restore(
             final String absPath, final String versionName,
             final boolean removeExisting) throws RepositoryException {
-        perform(new SessionOperation<Object> () {
+        perform(new SessionWriteOperation<Object> () {
             public Object perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(
@@ -267,7 +268,7 @@ public class VersionManagerImpl extends 
     public void restore(
             final String absPath, final Version version, final boolean removeExisting)
             throws RepositoryException {
-        perform(new SessionOperation<Object> () {
+        perform(new SessionWriteOperation<Object> () {
             public Object perform(SessionContext context)
                     throws RepositoryException {
                 // first check if node exists
@@ -327,7 +328,7 @@ public class VersionManagerImpl extends 
     public void restoreByLabel(
             final String absPath, final String versionLabel,
             final boolean removeExisting) throws RepositoryException {
-        perform(new SessionOperation<Object> () {
+        perform(new SessionWriteOperation<Object> () {
             public Object perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(
@@ -371,7 +372,7 @@ public class VersionManagerImpl extends 
             final String absPath, final String srcWorkspaceName,
             final boolean bestEffort, final boolean isShallow)
             throws RepositoryException {
-        return perform(new SessionOperation<NodeIterator> () {
+        return perform(new SessionWriteOperation<NodeIterator> () {
             public NodeIterator perform(SessionContext context)
                     throws RepositoryException {
                 NodeStateEx state = getNodeState(

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/GroupImpl.java
Wed Sep  8 09:56:05 2010
@@ -16,6 +16,28 @@
  */
 package org.apache.jackrabbit.core.security.user;
 
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.UserManager;
@@ -29,33 +51,12 @@ import org.apache.jackrabbit.core.NodeIm
 import org.apache.jackrabbit.core.PropertyImpl;
 import org.apache.jackrabbit.core.session.SessionContext;
 import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.spi.commons.iterator.Iterators;
 import org.apache.jackrabbit.util.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
 /**
  * GroupImpl...
  */
@@ -424,7 +425,7 @@ class GroupImpl extends AuthorizableImpl
         }
 
         public boolean addMember(final AuthorizableImpl authorizable) throws RepositoryException
{
-            return userManager.performProtectedOperation(getSession(), new SessionOperation<Boolean>()
{
+            return userManager.performProtectedOperation(getSession(), new SessionWriteOperation<Boolean>()
{
                 public Boolean perform(SessionContext context) throws RepositoryException
{
                     NodeImpl nMembers = (node.hasNode(N_MEMBERS)
                             ? node.getNode(N_MEMBERS)
@@ -465,7 +466,7 @@ class GroupImpl extends AuthorizableImpl
                 return false;
             }
 
-            return userManager.performProtectedOperation(getSession(), new SessionOperation<Boolean>()
{
+            return userManager.performProtectedOperation(getSession(), new SessionWriteOperation<Boolean>()
{
                 public Boolean perform(SessionContext context) throws RepositoryException
{
                     NodeImpl nMembers = node.getNode(N_MEMBERS);
                     try {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
Wed Sep  8 09:56:05 2010
@@ -16,6 +16,21 @@
  */
 package org.apache.jackrabbit.core.security.user;
 
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.nodetype.ConstraintViolationException;
+
 import org.apache.jackrabbit.api.JackrabbitSession;
 import org.apache.jackrabbit.api.security.principal.PrincipalIterator;
 import org.apache.jackrabbit.api.security.user.Authorizable;
@@ -30,7 +45,7 @@ import org.apache.jackrabbit.core.id.Nod
 import org.apache.jackrabbit.core.security.principal.PrincipalImpl;
 import org.apache.jackrabbit.core.security.user.UserImporter.ImportBehavior;
 import org.apache.jackrabbit.core.session.SessionContext;
-import org.apache.jackrabbit.core.session.SessionOperation;
+import org.apache.jackrabbit.core.session.SessionWriteOperation;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.util.ReferenceChangeTracker;
 import org.apache.jackrabbit.core.xml.NodeInfo;
@@ -43,21 +58,6 @@ import org.apache.jackrabbit.spi.commons
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.ImportUUIDBehavior;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.nodetype.ConstraintViolationException;
-
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
 /**
  * <code>UserImporter</code> implements a
  * <code>DefaultProtectedPropertyImporter</code> that is able to deal with
@@ -396,7 +396,7 @@ public class UserImporter implements Pro
                         final NodeImpl groupNode = ((AuthorizableImpl) gr).getNode();
 
                         if (userManager.getGroupMembershipSplitSize() > 0) {
-                            userManager.performProtectedOperation((SessionImpl) session,
new SessionOperation<Object>() {
+                            userManager.performProtectedOperation((SessionImpl) session,
new SessionWriteOperation<Object>() {
                                 public Boolean perform(SessionContext context) throws RepositoryException
{
                                     NodeImpl nMembers = (groupNode.hasNode(UserConstants.N_MEMBERS)
                                             ? groupNode.getNode(UserConstants.N_MEMBERS)

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/AddNodeOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/AddNodeOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/AddNodeOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/AddNodeOperation.java
Wed Sep  8 09:56:05 2010
@@ -34,7 +34,7 @@ import org.apache.jackrabbit.spi.commons
 /**
  * Session operation for adding a new node.
  */
-public class AddNodeOperation implements SessionOperation<Node> {
+public class AddNodeOperation implements SessionWriteOperation<Node> {
 
     private final NodeImpl node;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java?rev=994954&r1=994953&r2=994954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
Wed Sep  8 09:56:05 2010
@@ -24,7 +24,7 @@ import org.apache.jackrabbit.core.id.Nod
 /**
  * Operation to persist transient changes in a session.
  */
-public class SessionSaveOperation implements SessionOperation<Object> {
+public class SessionSaveOperation implements SessionWriteOperation<Object> {
 
     /**
      * Persists transient changes by delegating to the save() method of the

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java?rev=994954&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java
(added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java
Wed Sep  8 09:56:05 2010
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core.session;
+
+/**
+ * Marker interface that marks a {@link SessionOperation} that modifies
+ * the state of the session or the repository.
+ */
+public interface SessionWriteOperation<T> extends SessionOperation<T> {
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionWriteOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message