jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1165740 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ./ config/ hierarchy/ nodetype/ observation/ query/ state/ util/ version/ xml/
Date Tue, 06 Sep 2011 16:06:51 GMT
Author: mduerig
Date: Tue Sep  6 16:06:50 2011
New Revision: 1165740

URL: http://svn.apache.org/viewvc?rev=1165740&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
clean up

Added:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java   (contents, props changed)
      - copied, changed from r1165683, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdatableItemStateManager.java
Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdatableItemStateManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/ReferenceChangeTracker.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/DocViewImportHandler.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImportHandler.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/TargetImportHandler.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java Tue Sep  6 16:06:50 2011
@@ -30,14 +30,12 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.jcr2spi.util.LogUtil;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
-import org.omg.CORBA.DynAnyPackage.Invalid;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.Item;
 import javax.jcr.ItemNotFoundException;
-import javax.jcr.ItemVisitor;
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.Repository;
@@ -91,9 +89,6 @@ public abstract class ItemImpl implement
     }
 
     @Override
-    public abstract String getName() throws RepositoryException;
-
-    @Override
     public Item getAncestor(int depth) throws RepositoryException {
         checkStatus();
         if (depth == 0) {
@@ -209,12 +204,6 @@ public abstract class ItemImpl implement
     }
 
     @Override
-    public abstract void accept(ItemVisitor visitor) throws RepositoryException;
-
-    @Override
-    public abstract boolean isNode();
-
-    @Override
     public void save() throws RepositoryException {
         // check state of this instance
         checkStatus();
@@ -369,7 +358,7 @@ public abstract class ItemImpl implement
      *
      * @param listener the new listener to be informed on life cycle changes
      */
-    void addLifeCycleListener(ItemLifeCycleListener listener) {
+    final void addLifeCycleListener(ItemLifeCycleListener listener) {
         if (!listeners.containsKey(listener)) {
             listeners.put(listener, listener);
         }
@@ -518,7 +507,7 @@ public abstract class ItemImpl implement
     }
 
     /**
-     * Failsafe conversion of internal <code>Path</code> to JCR path for use in
+     * Fail safe conversion of internal <code>Path</code> to JCR path for use in
      * error messages etc.
      *
      * @return JCR path

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java Tue Sep  6 16:06:50 2011
@@ -103,11 +103,11 @@ public class ItemManagerImpl implements 
             // session-sanity & permissions are checked upon itemExists(ItemState)
             NodeState nodeState = hierarchyManager.getNodeState(path);
             return itemExists(nodeState);
-        } catch (PathNotFoundException pnfe) {
+        } catch (PathNotFoundException e) {
             return false;
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             return false;
-        } catch (RepositoryException re) {
+        } catch (RepositoryException e) {
             return false;
         }
     }
@@ -118,9 +118,9 @@ public class ItemManagerImpl implements 
             // session-sanity & permissions are checked upon itemExists(ItemState)
             PropertyState propState = hierarchyManager.getPropertyState(path);
             return itemExists(propState);
-        } catch (PathNotFoundException pnfe) {
+        } catch (PathNotFoundException e) {
             return false;
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             return false;
         } catch (RepositoryException re) {
             return false;
@@ -152,7 +152,7 @@ public class ItemManagerImpl implements 
             // return true, if ItemState is valid. Access rights are granted,
             // otherwise the state would not have been retrieved.
             return itemState.isValid();
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             return false;
         } catch (RepositoryException re) {
             return false;
@@ -164,7 +164,7 @@ public class ItemManagerImpl implements 
         NodeEntry nodeEntry = hierarchyManager.getNodeEntry(path);
         try {
             return (Node) getItem(nodeEntry);
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             throw new PathNotFoundException(LogUtil.safeGetJCRPath(path, session.getPathResolver()));
         }
     }
@@ -174,7 +174,7 @@ public class ItemManagerImpl implements 
         PropertyEntry propertyEntry = hierarchyManager.getPropertyEntry(path);
         try {
             return (Property) getItem(propertyEntry);
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             throw new PathNotFoundException(LogUtil.safeGetJCRPath(path, session.getPathResolver()));
         }
     }
@@ -206,11 +206,11 @@ public class ItemManagerImpl implements 
         // check sanity of session
         session.checkIsAlive();
 
-        Iterator<NodeEntry> iter = parentEntry.getNodeEntries();
-        while (iter.hasNext()) {
+        Iterator<NodeEntry> it = parentEntry.getNodeEntries();
+        while (it.hasNext()) {
             try {
                 // check read access by accessing the nodeState (implicit validation check)
-                NodeEntry entry = iter.next();
+                NodeEntry entry = it.next();
                 entry.getNodeState();
                 return true;
             } catch (ItemNotFoundException e) {
@@ -235,10 +235,10 @@ public class ItemManagerImpl implements 
         // check sanity of session
         session.checkIsAlive();
 
-        Iterator<PropertyEntry> iter = parentEntry.getPropertyEntries();
-        while (iter.hasNext()) {
+        Iterator<PropertyEntry> it = parentEntry.getPropertyEntries();
+        while (it.hasNext()) {
             try {
-                PropertyEntry entry = iter.next();
+                PropertyEntry entry = it.next();
                 // check read access by accessing the propState (also implicit validation).
                 entry.getPropertyState();
                 return true;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java Tue Sep  6 16:06:50 2011
@@ -194,7 +194,7 @@ public class Jcr2spiRepositoryFactory im
                     serviceFactoryClass = Class.forName(serviceFactoryName);
                 }
 
-                Object serviceFactory = serviceFactoryClass.newInstance();
+                Object serviceFactory = serviceFactoryClass.getConstructor().newInstance();
 
                 if (serviceFactory instanceof RepositoryServiceFactory) {
                     log.debug("Found RepositoryServiceFactory {}", serviceFactory);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java Tue Sep  6 16:06:50 2011
@@ -57,7 +57,6 @@ import javax.jcr.Item;
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.ItemVisitor;
-import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.PathNotFoundException;
@@ -68,7 +67,6 @@ import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
-import javax.jcr.ValueFormatException;
 import javax.jcr.lock.Lock;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
@@ -399,10 +397,10 @@ public class NodeImpl extends ItemImpl i
         // the child nodes because this would lead to an infinite recursion.
         try {
             return getItemManager().getChildNodes(getNodeEntry());
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             String msg = "Failed to list the child nodes of " + safeGetJCRPath();
             log.debug(msg);
-            throw new RepositoryException(msg, infe);
+            throw new RepositoryException(msg, e);
         } catch (AccessDeniedException ade) {
             String msg = "Failed to list the child nodes of " + safeGetJCRPath();
             log.debug(msg);
@@ -445,10 +443,10 @@ public class NodeImpl extends ItemImpl i
         checkStatus();
         try {
             return getItemManager().getChildProperties(getNodeEntry());
-        } catch (ItemNotFoundException infe) {
+        } catch (ItemNotFoundException e) {
             String msg = "Failed to list the child properties of " + getPath();
             log.debug(msg);
-            throw new RepositoryException(msg, infe);
+            throw new RepositoryException(msg, e);
         } catch (AccessDeniedException ade) {
             String msg = "Failed to list the child properties of " + getPath();
             log.debug(msg);
@@ -669,8 +667,7 @@ public class NodeImpl extends ItemImpl i
         if (mixin.isNodeType(NameConstants.MIX_REFERENCEABLE)) {
             EffectiveNodeType entRemaining = getRemainingENT(mixinValue);
             if (!entRemaining.includesNodeType(NameConstants.MIX_REFERENCEABLE)) {
-                PropertyIterator iter = getReferences();
-                if (iter.hasNext()) {
+                if (getReferences().hasNext()) {
                     throw new ConstraintViolationException("Mixin type " + mixinName +
                             " can not be removed: the node is being referenced through at least one property of type REFERENCE");
                 }
@@ -704,7 +701,7 @@ public class NodeImpl extends ItemImpl i
     private List<Name> getMixinTypes() {
         Name[] mixinValue;
         if (getNodeState().getStatus() == Status.EXISTING) {
-            // jcr:mixinTypes must correspond to the mixins present on the nodestate.
+            // jcr:mixinTypes must correspond to the mixins present on the node state.
             mixinValue = getNodeState().getMixinTypeNames();
         } else {
             try {
@@ -729,7 +726,7 @@ public class NodeImpl extends ItemImpl i
     }
 
     /**
-     * Build the effective node type of remaining mixin's & primary type
+     * Build the effective node type of remaining mixins & primary type
      *
      * @param remainingMixins
      * @return effective node type
@@ -897,7 +894,7 @@ public class NodeImpl extends ItemImpl i
         }
 
         Operation op = Update.create(getNodeState(), srcWorkspaceName);
-        ((WorkspaceImpl)session.getWorkspace()).getUpdatableItemStateManager().execute(op);
+        ((WorkspaceImpl)session.getWorkspace()).getUpdateableItemStateManager().execute(op);
     }
 
     @Override
@@ -933,16 +930,16 @@ public class NodeImpl extends ItemImpl i
                 }
             } else {
                 // get corresponding ancestor
-                Node correspNode = srcSession.getNodeByUUID(referenceableNode.getUUID());
+                Node correspondingNode = srcSession.getNodeByUUID(referenceableNode.getUUID());
                 // path of m2 found, if m1 == n1
                 if (referenceableNode == this) {
-                    correspondingPath = correspNode.getPath();
+                    correspondingPath = correspondingNode.getPath();
                 } else {
                     Path p = referenceableNode.getQPath().computeRelativePath(getQPath());
                     // use prefix mappings of srcSession
                     String relPath = session.getPathResolver().getJCRPath(p);
-                    if (correspNode.hasNode(relPath)) {
-                        correspondingPath = correspNode.getNode(relPath).getPath();
+                    if (correspondingNode.hasNode(relPath)) {
+                        correspondingPath = correspondingNode.getNode(relPath).getPath();
                     } else {
                         throw new ItemNotFoundException("No corresponding path found in workspace " + workspaceName +
                                 '(' + safeGetJCRPath() + ')');
@@ -1190,10 +1187,10 @@ public class NodeImpl extends ItemImpl i
         }
 
         // check effective node type
-        EffectiveNodeType effnt = session.getEffectiveNodeTypeProvider().getEffectiveNodeType(getNodeState()
+        EffectiveNodeType effNT = session.getEffectiveNodeTypeProvider().getEffectiveNodeType(getNodeState()
                 .getNodeTypeNames());
         
-        return effnt.includesNodeType(qName);
+        return effNT.includesNodeType(qName);
     }
 
     //-----------------------------------------------------------< ItemImpl >---

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/RepositoryImpl.java Tue Sep  6 16:06:50 2011
@@ -16,20 +16,25 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.HashMap;
+import org.apache.jackrabbit.commons.AbstractRepository;
+import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
+import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.SessionInfo;
+import org.apache.jackrabbit.spi.XASessionInfo;
+import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
+import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
+import org.apache.jackrabbit.spi.commons.value.ValueFormat;
+import org.apache.jackrabbit.value.ValueFactoryImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.Credentials;
-import javax.jcr.LoginException;
-import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
-import javax.jcr.NamespaceException;
 import javax.naming.Context;
 import javax.naming.Name;
 import javax.naming.NamingException;
@@ -38,19 +43,12 @@ import javax.naming.Reference;
 import javax.naming.Referenceable;
 import javax.naming.StringRefAddr;
 import javax.naming.spi.ObjectFactory;
-
-import org.apache.jackrabbit.commons.AbstractRepository;
-import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
-import org.apache.jackrabbit.spi.SessionInfo;
-import org.apache.jackrabbit.spi.XASessionInfo;
-import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
-import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
-import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
-import org.apache.jackrabbit.spi.commons.value.ValueFormat;
-import org.apache.jackrabbit.value.ValueFactoryImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Map.Entry;
 
 /**
  * <code>RepositoryImpl</code>...
@@ -81,15 +79,15 @@ public class RepositoryImpl extends Abst
             }
         });
 
-        Map<String, QValue[]> descr = config.getRepositoryService().getRepositoryDescriptors();       
-        descriptors = new HashMap<String, Value[]>(descr.size());
-        for (String key : descr.keySet()) {
-            QValue[] qvs = descr.get(key);
+        Map<String, QValue[]> descriptors = config.getRepositoryService().getRepositoryDescriptors();
+        this.descriptors = new HashMap<String, Value[]>(descriptors.size());
+        for (Entry<String, QValue[]> stringEntry : descriptors.entrySet()) {
+            QValue[] qvs = stringEntry.getValue();
             Value[] vs = new Value[qvs.length];
             for (int i = 0; i < qvs.length; i++) {
                 vs[i] = ValueFormat.getJCRValue(qvs[i], resolver, vf);
             }
-            descriptors.put(key, vs);
+            this.descriptors.put(stringEntry.getKey(), vs);
         }
     }
 
@@ -174,16 +172,16 @@ public class RepositoryImpl extends Abst
     @Override
     public Reference getReference() throws NamingException {
         if (config instanceof Referenceable) {
-            Referenceable confref = (Referenceable)config;
+            Referenceable ref = (Referenceable) config;
             if (reference == null) {
                 reference = new Reference(RepositoryImpl.class.getName(), RepositoryImpl.Factory.class.getName(), null);
                 // carry over all addresses from referenceable config
-                for (Enumeration<RefAddr> en = confref.getReference().getAll(); en.hasMoreElements(); ) {
+                for (Enumeration<RefAddr> en = ref.getReference().getAll(); en.hasMoreElements(); ) {
                     reference.add(en.nextElement());
                 }
 
                 // also add the information required by factory class
-                reference.add(new StringRefAddr(Factory.RCF, confref.getReference().getFactoryClassName()));
+                reference.add(new StringRefAddr(Factory.RCF, ref.getReference().getFactoryClassName()));
                 reference.add(new StringRefAddr(Factory.RCC, config.getClass().getName()));
             }
 
@@ -230,35 +228,35 @@ public class RepositoryImpl extends Abst
 
         @Override
         public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
-                throws Exception {
+                throws Exception, NoSuchMethodException, InvocationTargetException {
 
             Object res = null;
             if (obj instanceof Reference) {
                 Reference ref = (Reference)obj;
-                String classname = ref.getClassName();
+                String className = ref.getClassName();
 
-                if (RepositoryImpl.class.getName().equals(classname)) {
+                if (RepositoryImpl.class.getName().equals(className)) {
 
-                    RefAddr rfac = ref.get(RCF);
-                    if (rfac == null || !(rfac instanceof StringRefAddr)) {
-                        throw new Exception("Address type " + RCF + " missing or of wrong class: " + rfac);
+                    RefAddr rFactory = ref.get(RCF);
+                    if (rFactory == null || !(rFactory instanceof StringRefAddr)) {
+                        throw new Exception("Address type " + RCF + " missing or of wrong class: " + rFactory);
                     }
-                    String configFactoryClassName = (String) rfac.getContent();
+                    String configFactoryClassName = (String) rFactory.getContent();
 
-                    RefAddr rclas = ref.get(RCC);
-                    if (rclas == null || !(rclas instanceof StringRefAddr)) {
-                        throw new Exception("Address type " + RCC + " missing or of wrong class: " + rclas);
+                    RefAddr rClass = ref.get(RCC);
+                    if (rClass == null || !(rClass instanceof StringRefAddr)) {
+                        throw new Exception("Address type " + RCC + " missing or of wrong class: " + rClass);
                     }
-                    String repositoryConfigClassName = (String) rclas.getContent();
+                    String repositoryConfigClassName = (String) rClass.getContent();
 
-                    Object rof = Class.forName(configFactoryClassName).newInstance();
+                    Object rof = Class.forName(configFactoryClassName).getConstructor().newInstance();
 
                     if (! (rof instanceof ObjectFactory)) {
                         throw new Exception(rof + " must implement ObjectFactory");
                     }
 
                     ObjectFactory of = (ObjectFactory)rof;
-                    Reference newref = new Reference(repositoryConfigClassName,
+                    Reference newRef = new Reference(repositoryConfigClassName,
                         configFactoryClassName, null);
 
                     // carry over all arguments except our own
@@ -266,18 +264,18 @@ public class RepositoryImpl extends Abst
                         RefAddr ra = en.nextElement();
                         String type = ra.getType();
                         if (! RCF.equals(type) && ! RCC.equals(type)) {
-                            newref.add(ra);
+                            newRef.add(ra);
                         }
                     }
 
-                    Object config = of.getObjectInstance(newref, name, nameCtx, environment);
+                    Object config = of.getObjectInstance(newRef, name, nameCtx, environment);
                     if (! (config instanceof RepositoryConfig)) {
                         throw new Exception(config + " must implement RepositoryConfig");
                     }
                     return RepositoryImpl.create((RepositoryConfig)config);
                 }
                 else {
-                    throw new Exception("Unexpected class: " + classname);
+                    throw new Exception("Unexpected class: " + className);
                 }
             }
             return res;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java Tue Sep  6 16:06:50 2011
@@ -16,40 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.AccessControlException;
-import java.util.Map;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.Credentials;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.InvalidSerializedDataException;
-import javax.jcr.Item;
-import javax.jcr.ItemExistsException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.LoginException;
-import javax.jcr.NamespaceException;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.Node;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.Property;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFactory;
-import javax.jcr.Workspace;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.retention.RetentionManager;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionException;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
 import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.commons.AbstractSession;
@@ -72,7 +38,7 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.state.PropertyState;
 import org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager;
-import org.apache.jackrabbit.jcr2spi.state.UpdatableItemStateManager;
+import org.apache.jackrabbit.jcr2spi.state.UpdateableItemStateManager;
 import org.apache.jackrabbit.jcr2spi.util.LogUtil;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.xml.ImportHandler;
@@ -102,6 +68,34 @@ import org.xml.sax.ContentHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Credentials;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidSerializedDataException;
+import javax.jcr.Item;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.NamespaceException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.Property;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFactory;
+import javax.jcr.Workspace;
+import javax.jcr.retention.RetentionManager;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.version.Version;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessControlException;
+import java.util.Map;
+
 /**
  * <code>SessionImpl</code>...
  */
@@ -152,7 +146,7 @@ public class SessionImpl extends Abstrac
         ntManager = new NodeTypeManagerImpl(workspace.getNodeTypeRegistry(), this);
         validator = new ItemStateValidator(this, getPathFactory());
 
-        itemStateManager = createSessionItemStateManager(workspace.getUpdatableItemStateManager(), workspace.getItemStateFactory());
+        itemStateManager = createSessionItemStateManager(workspace.getUpdateableItemStateManager(), workspace.getItemStateFactory());
         HierarchyManager hMgr = getHierarchyManager();
         itemManager = createItemManager(hMgr);
 
@@ -720,7 +714,7 @@ public class SessionImpl extends Abstrac
         return new WorkspaceImpl(sessionInfo.getWorkspaceName(), this, config, sessionInfo);
     }
 
-    protected SessionItemStateManager createSessionItemStateManager(UpdatableItemStateManager workspaceStateManager,
+    protected SessionItemStateManager createSessionItemStateManager(UpdateableItemStateManager workspaceStateManager,
             ItemStateFactory isf) throws RepositoryException {
 
         return new SessionItemStateManager(workspaceStateManager, getValidator(), getQValueFactory(), isf, this);
@@ -810,15 +804,15 @@ public class SessionImpl extends Abstrac
     }
 
     // TODO public for SessionImport only. review
-    public IdFactory getIdFactory() throws RepositoryException {
+    public IdFactory getIdFactory() {
         return workspace.getIdFactory();
     }
 
-    public NameFactory getNameFactory() throws RepositoryException {
+    public NameFactory getNameFactory() {
         return workspace.getNameFactory();
     }
 
-    PathFactory getPathFactory() throws RepositoryException {
+    final PathFactory getPathFactory() {
         return workspace.getPathFactory();
     }
 
@@ -1004,10 +998,10 @@ public class SessionImpl extends Abstrac
      * @throws RepositoryException
      */
     void checkAccessibleWorkspace(String workspaceName) throws RepositoryException {
-        String[] wsps = workspace.getAccessibleWorkspaceNames();
+        String[] workspaces = workspace.getAccessibleWorkspaceNames();
         boolean accessible = false;
-        for (int i = 0; i < wsps.length && !accessible; i++) {
-            accessible = wsps[i].equals(workspaceName);
+        for (int i = 0; i < workspaces.length && !accessible; i++) {
+            accessible = workspaces[i].equals(workspaceName);
         }
 
         if (!accessible) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java Tue Sep  6 16:06:50 2011
@@ -37,7 +37,7 @@ import org.apache.jackrabbit.jcr2spi.sec
 import org.apache.jackrabbit.jcr2spi.state.ItemStateFactory;
 import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.state.UpdatableItemStateManager;
+import org.apache.jackrabbit.jcr2spi.state.UpdateableItemStateManager;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.version.VersionManagerImpl;
 import org.apache.jackrabbit.jcr2spi.xml.WorkspaceContentHandler;
@@ -56,30 +56,19 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.ContentHandler;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.InvalidSerializedDataException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.NamespaceRegistry;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.PathNotFoundException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.ValueFactory;
 import javax.jcr.Workspace;
-import javax.jcr.lock.LockException;
 import javax.jcr.lock.LockManager;
-import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NodeTypeManager;
 import javax.jcr.observation.ObservationManager;
 import javax.jcr.query.QueryManager;
 import javax.jcr.version.Version;
-import javax.jcr.version.VersionException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.concurrent.ExecutorService;
 
 /**
  * <code>WorkspaceImpl</code>...
@@ -141,7 +130,7 @@ public class WorkspaceImpl implements Wo
         Path destPath = session.getQPath(destAbsPath);
 
         Operation op = Copy.create(srcPath, destPath, getName(), this, this);
-        getUpdatableItemStateManager().execute(op);
+        getUpdateableItemStateManager().execute(op);
     }
 
     @Override
@@ -162,7 +151,7 @@ public class WorkspaceImpl implements Wo
         Path srcPath = session.getQPath(srcAbsPath);
         Path destPath = session.getQPath(destAbsPath);
 
-        // copy (i.e. pull) subtree at srcAbsPath from srcWorkspace
+        // copy (i.e. pull) sub tree at srcAbsPath from srcWorkspace
         // to 'this' workspace at destAbsPath
         SessionImpl srcSession = null;
         try {
@@ -173,7 +162,7 @@ public class WorkspaceImpl implements Wo
 
             // do cross-workspace copy
             Operation op = Copy.create(srcPath, destPath, srcWsp.getName(), srcWsp, this);
-            getUpdatableItemStateManager().execute(op);
+            getUpdateableItemStateManager().execute(op);
         } finally {
             if (srcSession != null) {
                 // we don't need the other session anymore, logout
@@ -203,7 +192,7 @@ public class WorkspaceImpl implements Wo
         Path srcPath = session.getQPath(srcAbsPath);
         Path destPath = session.getQPath(destAbsPath);
 
-        // clone (i.e. pull) subtree at srcAbsPath from srcWorkspace
+        // clone (i.e. pull) sub tree at srcAbsPath from srcWorkspace
         // to 'this' workspace at destAbsPath
 
         SessionImpl srcSession = null;
@@ -215,7 +204,7 @@ public class WorkspaceImpl implements Wo
 
             // do clone
             Operation op = Clone.create(srcPath, destPath, srcWsp.getName(), removeExisting, srcWsp, this);
-            getUpdatableItemStateManager().execute(op);
+            getUpdateableItemStateManager().execute(op);
         } finally {
             if (srcSession != null) {
                 // we don't need the other session anymore, logout
@@ -233,7 +222,7 @@ public class WorkspaceImpl implements Wo
         Path destPath = session.getQPath(destAbsPath);
 
         Operation op = Move.create(srcPath, destPath, getHierarchyManager(), getPathResolver(), false);
-        getUpdatableItemStateManager().execute(op);
+        getUpdateableItemStateManager().execute(op);
     }
 
     @Override
@@ -461,7 +450,7 @@ public class WorkspaceImpl implements Wo
      *
      * @return the state manager of this workspace
      */
-    UpdatableItemStateManager getUpdatableItemStateManager() {
+    UpdateableItemStateManager getUpdateableItemStateManager() {
         return wspManager;
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java Tue Sep  6 16:06:50 2011
@@ -64,7 +64,7 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.jcr2spi.state.Status;
 import org.apache.jackrabbit.jcr2spi.state.TransientISFactory;
 import org.apache.jackrabbit.jcr2spi.state.TransientItemStateFactory;
-import org.apache.jackrabbit.jcr2spi.state.UpdatableItemStateManager;
+import org.apache.jackrabbit.jcr2spi.state.UpdateableItemStateManager;
 import org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.Event;
@@ -102,8 +102,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.Semaphore;
@@ -111,7 +109,7 @@ import java.util.concurrent.Semaphore;
 /**
  * <code>WorkspaceManager</code>...
  */
-public class WorkspaceManager implements UpdatableItemStateManager, NamespaceStorage, AccessManager {
+public final class WorkspaceManager implements UpdateableItemStateManager, NamespaceStorage, AccessManager {
     private static final Logger log = LoggerFactory.getLogger(WorkspaceManager.class);
 
     private final RepositoryService service;
@@ -417,7 +415,7 @@ public class WorkspaceManager implements
      * @throws RepositoryException if an error occurs.
      * @throws UnsupportedRepositoryOperationException
      *                             if the implementation does not support
-     *                             journaled observation.
+     *                             journalled observation.
      */
     public EventBundle getEvents(EventFilter filter, long after) throws RepositoryException {
         return service.getEvents(sessionInfo, filter, after);
@@ -460,13 +458,13 @@ public class WorkspaceManager implements
     }
 
     /**
-     * @param tisf The transient item state factory.
+     * @param transientISF The transient item state factory.
      * @param idFactory The id factory.
      * @return a new instance of <code>HierarchyManager</code>.
      * @throws javax.jcr.RepositoryException If an error occurs.
      */
-    private HierarchyManager createHierarchyManager(TransientItemStateFactory tisf, IdFactory idFactory) {
-        return new HierarchyManagerImpl(tisf, idFactory, getPathFactory());
+    private HierarchyManager createHierarchyManager(TransientItemStateFactory transientISF, IdFactory idFactory) {
+        return new HierarchyManagerImpl(transientISF, idFactory, getPathFactory());
     }
 
     /**
@@ -482,7 +480,7 @@ public class WorkspaceManager implements
      * @return an instance of <code>NodeTypeRegistryImpl</code>.
      */
     private NodeTypeRegistryImpl createNodeTypeRegistry(NamespaceRegistry nsRegistry) {
-        NodeTypeStorage ntst = new NodeTypeStorage() {
+        NodeTypeStorage ntStorage = new NodeTypeStorage() {
             @Override
             public Iterator<QNodeTypeDefinition> getAllDefinitions() throws RepositoryException {
                 return service.getQNodeTypeDefinitions(sessionInfo);
@@ -501,8 +499,8 @@ public class WorkspaceManager implements
             }
         };
         NodeTypeCache ntCache = NodeTypeCache.getInstance(service, sessionInfo.getUserID());
-        ntst = ntCache.wrap(ntst);
-        return NodeTypeRegistryImpl.create(ntst, nsRegistry);
+        ntStorage = ntCache.wrap(ntStorage);
+        return NodeTypeRegistryImpl.create(ntStorage, nsRegistry);
     }
 
     /**
@@ -540,7 +538,7 @@ public class WorkspaceManager implements
         service.deleteWorkspace(sessionInfo, name);
     }
 
-    //------------------------------------------< UpdatableItemStateManager >---
+    //------------------------------------------< UpdateableItemStateManager >---
 
     /**
      * Creates a new batch from the single workspace operation and executes it.
@@ -698,11 +696,11 @@ public class WorkspaceManager implements
      *
      * @param eventBundles the event bundles generated by the repository service
      *                     as the effect of an local or external change.
-     * @param lstnrs Array of internal event listeners
+     * @param eventListeners Array of internal event listeners
      * @throws InterruptedException if this thread is interrupted while waiting
      *                              for the {@link #updateSync}.
      */
-    private void onEventReceived(EventBundle[] eventBundles, InternalEventListener[] lstnrs) throws InterruptedException {
+    private void onEventReceived(EventBundle[] eventBundles, InternalEventListener[] eventListeners) throws InterruptedException {
         if (log.isDebugEnabled()) {
             log.debug("received {} event bundles.", eventBundles.length);
             for (EventBundle eventBundle : eventBundles) {
@@ -745,9 +743,9 @@ public class WorkspaceManager implements
         try {
             // notify listener
             for (EventBundle eventBundle : eventBundles) {
-                for (InternalEventListener lstnr : lstnrs) {
+                for (InternalEventListener l : eventListeners) {
                     try {
-                        lstnr.onEvent(eventBundle);
+                        l.onEvent(eventBundle);
                     } catch (Exception e) {
                         log.warn("Exception in event polling thread: " + e);
                         log.debug("Dump:", e);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java Tue Sep  6 16:06:50 2011
@@ -25,7 +25,7 @@ import org.apache.jackrabbit.spi.Reposit
  * bootstrap an SPI implementation.
  * <p>
  * Instances of this class <em>should</em> implement
- * {@link javax.naming.Referenceable} in order to make JCR2SPI's
+ * {@link javax.naming.Referenceable} in order to make JCR2SPI
  * {@link javax.jcr.Repository} itself referenceable.
  */
 public interface RepositoryConfig {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java Tue Sep  6 16:06:50 2011
@@ -370,10 +370,10 @@ final class ChildNodeEntriesImpl impleme
     /**
      *
      * @param insertName
-     * @param insertLN
+     * @param insert
      * @param beforeLN
      */
-    private void reorder(Name insertName, LinkedEntries.LinkNode insertLN, LinkedEntries.LinkNode beforeLN) {
+    private void reorder(Name insertName, LinkedEntries.LinkNode insert, LinkedEntries.LinkNode beforeLN) {
         // reorder named map
         if (entriesByName.containsSiblings(insertName)) {
             int position;
@@ -389,15 +389,15 @@ final class ChildNodeEntriesImpl impleme
                     LinkedEntries.LinkNode ln = it.next();
                     if (ln == beforeLN) {
                         break;
-                    } else if (ln != insertLN && insertName.equals(ln.qName)) {
+                    } else if (ln != insert && insertName.equals(ln.qName)) {
                         position++;
-                    } // else: ln == inserLN OR no SNS -> not relevant for position count
+                    } // else: ln == insertLN OR no SNS -> not relevant for position count
                 }
             }
-            entriesByName.reorder(insertName, insertLN, position);
+            entriesByName.reorder(insertName, insert, position);
         }
         // reorder in linked list
-        entries.reorderNode(insertLN, beforeLN);
+        entries.reorderNode(insert, beforeLN);
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java Tue Sep  6 16:06:50 2011
@@ -376,7 +376,7 @@ public class NodeEntryImpl extends Hiera
                 entry = (NodeEntryImpl) cne;
             } else {
                 // no valid entry
-                // -> if cnes are complete -> assume that it doesn't exist.
+                // -> if entries are complete -> assume that it doesn't exist.
                 //    refresh will bring up new entries added in the mean time
                 //    on the persistent layer.
                 if (entry.childNodeEntries.isComplete()) {
@@ -449,7 +449,7 @@ public class NodeEntryImpl extends Hiera
                 entry = (NodeEntryImpl) cne;
             } else {
                 // no valid ancestor node entry
-                // -> if cnes are complete -> assume that it doesn't exist.
+                // -> if entries are complete -> assume that it doesn't exist.
                 //    refresh will bring up new entries added in the mean time
                 //    on the persistent layer.
                 if (entry.childNodeEntries.isComplete()) {
@@ -1270,9 +1270,9 @@ public class NodeEntryImpl extends Hiera
 
         if (wspIndex) {
             List<NodeEntryImpl> atticSiblings = childNodeAttic.get(cne.getName());
-            for (NodeEntryImpl sibl : atticSiblings) {
-                if (sibl.revertInfo != null) {
-                    sns.add(sibl.revertInfo.oldIndex - 1, sibl);
+            for (NodeEntryImpl s : atticSiblings) {
+                if (s.revertInfo != null) {
+                    sns.add(s.revertInfo.oldIndex - 1, s);
                 } else {
                     log.error("Sibling in attic doesn't have revertInfo....");
                 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java Tue Sep  6 16:06:50 2011
@@ -264,8 +264,7 @@ class DefinitionValidator {
         }
 
         // validate child-node definitions
-        QNodeDefinition[] cnda = ntDef.getChildNodeDefs();
-        for (QNodeDefinition cnd : cnda) {
+        for (QNodeDefinition cnd : ntDef.getChildNodeDefs()) {
             // make sure declaring node type matches name of node type definition
             if (!name.equals(cnd.getDeclaringNodeType())) {
                 String msg = "[" + name + '#' + cnd.getName()

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java Tue Sep  6 16:06:50 2011
@@ -323,7 +323,7 @@ public class EffectiveNodeTypeImpl imple
         try {
             definitionProvider.getQNodeDefinition(this, name, null);
         } catch (NoSuchNodeTypeException e) {
-            String msg = "internal eror: inconsistent node type";
+            String msg = "internal error: inconsistent node type";
             log.debug(msg);
             throw new ConstraintViolationException(msg, e);
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeImpl.java Tue Sep  6 16:06:50 2011
@@ -157,10 +157,10 @@ public class NodeTypeImpl extends Abstra
      */
     @Override
     public NodeDefinition[] getChildNodeDefinitions() {
-        QNodeDefinition[] cnda = ent.getAllQNodeDefinitions();
-        NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
-        for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]);
+        QNodeDefinition[] defs = ent.getAllQNodeDefinitions();
+        NodeDefinition[] nodeDefs = new NodeDefinition[defs.length];
+        for (int i = 0; i < defs.length; i++) {
+            nodeDefs[i] = ntMgr.getNodeDefinition(defs[i]);
         }
         return nodeDefs;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java Tue Sep  6 16:06:50 2011
@@ -225,20 +225,20 @@ public class NodeTypeManagerImpl extends
         try {
             String name = getNamePathResolver().getJCRName(ntName);
             synchronized (pdCache) {
-                Iterator<PropertyDefinition> iter = pdCache.values().iterator();
-                while (iter.hasNext()) {
-                    PropertyDefinition pd = iter.next();
+                Iterator<PropertyDefinition> it = pdCache.values().iterator();
+                while (it.hasNext()) {
+                    PropertyDefinition pd = it.next();
                     if (name.equals(pd.getDeclaringNodeType().getName())) {
-                        iter.remove();
+                        it.remove();
                     }
                 }
             }
             synchronized (ndCache) {
-                Iterator<NodeDefinition> iter = ndCache.values().iterator();
-                while (iter.hasNext()) {
-                    NodeDefinition nd = iter.next();
+                Iterator<NodeDefinition> it = ndCache.values().iterator();
+                while (it.hasNext()) {
+                    NodeDefinition nd = it.next();
                     if (name.equals(nd.getDeclaringNodeType().getName())) {
-                        iter.remove();
+                        it.remove();
                     }
                 }
             }
@@ -260,20 +260,20 @@ public class NodeTypeManagerImpl extends
         try {
             String name = getNamePathResolver().getJCRName(ntName);
             synchronized (pdCache) {
-                Iterator<PropertyDefinition> iter = pdCache.values().iterator();
-                while (iter.hasNext()) {
-                    PropertyDefinition pd = iter.next();
+                Iterator<PropertyDefinition> it = pdCache.values().iterator();
+                while (it.hasNext()) {
+                    PropertyDefinition pd = it.next();
                     if (name.equals(pd.getDeclaringNodeType().getName())) {
-                        iter.remove();
+                        it.remove();
                     }
                 }
             }
             synchronized (ndCache) {
-                Iterator<NodeDefinition> iter = ndCache.values().iterator();
-                while (iter.hasNext()) {
-                    NodeDefinition nd = iter.next();
+                Iterator<NodeDefinition> it = ndCache.values().iterator();
+                while (it.hasNext()) {
+                    NodeDefinition nd = it.next();
                     if (name.equals(nd.getDeclaringNodeType().getName())) {
-                        iter.remove();
+                        it.remove();
                     }
                 }
             }
@@ -358,17 +358,17 @@ public class NodeTypeManagerImpl extends
      * @see NodeTypeManager#registerNodeTypes(javax.jcr.nodetype.NodeTypeDefinition[], boolean)
      */
     @Override
-    public NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] ntds, boolean allowUpdate)
+    public NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] ntDefs, boolean allowUpdate)
             throws RepositoryException {
-        List<QNodeTypeDefinition> defs = new ArrayList<QNodeTypeDefinition>(ntds.length);
-        for (NodeTypeDefinition definition : ntds) {
-            QNodeTypeDefinition qdef = new QNodeTypeDefinitionImpl(definition, getNamePathResolver(),
+        List<QNodeTypeDefinition> defs = new ArrayList<QNodeTypeDefinition>(ntDefs.length);
+        for (NodeTypeDefinition definition : ntDefs) {
+            QNodeTypeDefinition ntDef = new QNodeTypeDefinitionImpl(definition, getNamePathResolver(),
                     mgrProvider.getQValueFactory());
             
-            if (!allowUpdate && hasNodeType(qdef.getName())) {
+            if (!allowUpdate && hasNodeType(ntDef.getName())) {
                 throw new NodeTypeExistsException("NodeType " + definition.getName() + " already exists.");
             }
-            defs.add(qdef);
+            defs.add(ntDef);
         }
 
         getNodeTypeRegistry().registerNodeTypes(defs, allowUpdate);
@@ -403,9 +403,9 @@ public class NodeTypeManagerImpl extends
         builder.append("NodeTypeManager (").append(super.toString()).append(")\n");
         builder.append("All NodeTypes:\n");
         try {
-            NodeTypeIterator iter = getAllNodeTypes();
-            while (iter.hasNext()) {
-                NodeType nt = iter.nextNodeType();
+            NodeTypeIterator it = getAllNodeTypes();
+            while (it.hasNext()) {
+                NodeType nt = it.nextNodeType();
                 builder.append(nt.getName());
                 builder.append("\n\tSupertypes");
                 for (NodeType supertype : nt.getSupertypes()) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java Tue Sep  6 16:06:50 2011
@@ -258,11 +258,11 @@ public class NodeTypeRegistryImpl implem
         mergedNodeTypes.add(ntName);
         allNodeTypes.add(ntName);
 
-        Name[] smixins = ntd.getSupportedMixinTypes();
+        Name[] mixins = ntd.getSupportedMixinTypes();
 
-        if (smixins != null) {
+        if (mixins != null) {
             supportedMixins = new HashSet<Name>();
-            supportedMixins.addAll(Arrays.asList(smixins));
+            supportedMixins.addAll(Arrays.asList(mixins));
         }
 
         // map of all item definitions (maps id to definition)
@@ -492,9 +492,9 @@ public class NodeTypeRegistryImpl implem
      * Notify the listeners that a node type <code>ntName</code> has been registered.
      */
     private void notifyRegistered(Name ntName) {
-        for (NodeTypeRegistryListener ntrl : copyListeners()) {
-            if (ntrl != null) {
-                ntrl.nodeTypeRegistered(ntName);
+        for (NodeTypeRegistryListener l : copyListeners()) {
+            if (l != null) {
+                l.nodeTypeRegistered(ntName);
             }
         }
     }
@@ -503,9 +503,9 @@ public class NodeTypeRegistryImpl implem
      * Notify the listeners that a node type <code>ntName</code> has been re-registered.
      */
     private void notifyReRegistered(Name ntName) {
-        for (NodeTypeRegistryListener ntrl : copyListeners()) {
-            if (ntrl != null) {
-                ntrl.nodeTypeReRegistered(ntName);
+        for (NodeTypeRegistryListener l : copyListeners()) {
+            if (l != null) {
+                l.nodeTypeReRegistered(ntName);
             }
         }
     }
@@ -514,21 +514,21 @@ public class NodeTypeRegistryImpl implem
      * Notify the listeners that a node type <code>ntName</code> has been unregistered.
      */
     private void notifyUnregistered(Name ntName) {
-        for (NodeTypeRegistryListener ntrl : copyListeners()) {
-            if (ntrl != null) {
-                ntrl.nodeTypeUnregistered(ntName);
+        for (NodeTypeRegistryListener l : copyListeners()) {
+            if (l != null) {
+                l.nodeTypeUnregistered(ntName);
             }
         }
     }
 
     private NodeTypeRegistryListener[] copyListeners() {
         // copy listeners to array to avoid ConcurrentModificationException
-        NodeTypeRegistryListener[] lstnrs = new NodeTypeRegistryListener[listeners.size()];
+        NodeTypeRegistryListener[] copy = new NodeTypeRegistryListener[listeners.size()];
         int cnt = 0;
-        for (NodeTypeRegistryListener ntrl : listeners.values()) {
-            lstnrs[cnt++] = ntrl;
+        for (NodeTypeRegistryListener l : listeners.values()) {
+            copy[cnt++] = l;
         }
-        return lstnrs;
+        return copy;
     }
 
     private void internalRegister(Map<QNodeTypeDefinition, EffectiveNodeType> defMap) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java Tue Sep  6 16:06:50 2011
@@ -173,12 +173,12 @@ public class ObservationManagerImpl impl
         for (Map.Entry<EventListener, EventFilter> entry : activeListeners.entrySet()) {
             EventListener listener = entry.getKey();
             EventFilter filter = entry.getValue();
-            FilteredEventIterator eventIter = new FilteredEventIterator(
+            FilteredEventIterator events = new FilteredEventIterator(
                     eventBundle.getEvents(), eventBundle.isLocal(), filter,
                     resolver, wspManager.getIdFactory());
-            if (eventIter.hasNext()) {
+            if (events.hasNext()) {
                 try {
-                    listener.onEvent(eventIter);
+                    listener.onEvent(events);
                 } catch (Throwable t) {
                     log.warn("EventConsumer threw exception: " + t.toString());
                     log.debug("Stack trace: ", t);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java Tue Sep  6 16:06:50 2011
@@ -16,13 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi.query;
 
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import javax.jcr.Item;
-import javax.jcr.Node;
-import javax.jcr.RangeIterator;
-
 import org.apache.jackrabbit.jcr2spi.ItemManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.spi.NodeId;
@@ -31,6 +24,12 @@ import org.apache.jackrabbit.spi.QueryRe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.Item;
+import javax.jcr.Node;
+import javax.jcr.RangeIterator;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
 /**
  * Implements a {@link javax.jcr.NodeIterator} returned by
  * {@link javax.jcr.query.QueryResult#getNodes()}.

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java Tue Sep  6 16:06:50 2011
@@ -43,8 +43,8 @@ public class ChangeLog {
     private static final Logger log = LoggerFactory.getLogger(ChangeLog.class);
 
     /**
-     * The changelog target: Root item of the tree whose changes are contained
-     * in this changelog.
+     * The change log target: Root item of the tree whose changes are contained
+     * in this change log.
      */
     private final ItemState target;
 
@@ -145,7 +145,7 @@ public class ChangeLog {
     }
 
     /**
-     * Revert the changes listed within this changelog
+     * Revert the changes listed within this change log
      */
     public void undo() throws RepositoryException {
         Operation[] ops = operations.toArray(new Operation[operations.size()]);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java Tue Sep  6 16:06:50 2011
@@ -222,7 +222,7 @@ public class NodeState extends ItemState
      *
      * @param mixinTypeNames
      */
-    public void setMixinTypeNames(Name[] mixinTypeNames) {
+    public final void setMixinTypeNames(Name[] mixinTypeNames) {
         if (mixinTypeNames != null) {
             this.mixinTypeNames = mixinTypeNames;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java Tue Sep  6 16:06:50 2011
@@ -244,7 +244,7 @@ public class PropertyState extends ItemS
      * @param type the value type
      * @throws RepositoryException If an error occurs.
      */
-    void setValues(QValue[] values, int type) throws RepositoryException {
+    final void setValues(QValue[] values, int type) throws RepositoryException {
         if (getStatus() == Status.NEW) {
             if (data == null) {
                 data = new PropertyData(type, values, getDefinition());

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java Tue Sep  6 16:06:50 2011
@@ -24,10 +24,8 @@ import java.util.Iterator;
 import java.util.List;
 
 import javax.jcr.AccessDeniedException;
-import javax.jcr.InvalidItemStateException;
 import javax.jcr.ItemExistsException;
 import javax.jcr.PropertyType;
-import javax.jcr.ReferentialIntegrityException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
@@ -67,13 +65,13 @@ import org.slf4j.LoggerFactory;
 /**
  * <code>SessionItemStateManager</code> ...
  */
-public class SessionItemStateManager extends TransientOperationVisitor implements UpdatableItemStateManager {
+public class SessionItemStateManager extends TransientOperationVisitor implements UpdateableItemStateManager {
     private static final Logger log = LoggerFactory.getLogger(SessionItemStateManager.class);
 
     /**
      * State manager that allows updates
      */
-    private final UpdatableItemStateManager workspaceItemStateMgr;
+    private final UpdateableItemStateManager workspaceItemStateMgr;
 
     /**
      * State manager for the transient items
@@ -95,7 +93,7 @@ public class SessionItemStateManager ext
      * @param isf
      * @param mgrProvider
      */
-    public SessionItemStateManager(UpdatableItemStateManager workspaceItemStateMgr, ItemStateValidator validator,
+    public SessionItemStateManager(UpdateableItemStateManager workspaceItemStateMgr, ItemStateValidator validator,
             QValueFactory qValueFactory, ItemStateFactory isf, SessionImpl mgrProvider) {
 
         this.workspaceItemStateMgr = workspaceItemStateMgr;
@@ -202,7 +200,7 @@ public class SessionItemStateManager ext
         refTracker.clear();
     }
 
-    //------------------------------------------< UpdatableItemStateManager >---
+    //------------------------------------------< UpdateableItemStateManager >---
 
     @Override
     public void execute(Operation operation) throws RepositoryException {

Copied: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java (from r1165683, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdatableItemStateManager.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java?p2=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java&p1=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdatableItemStateManager.java&r1=1165683&r2=1165740&rev=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdatableItemStateManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java Tue Sep  6 16:06:50 2011
@@ -23,7 +23,7 @@ import javax.jcr.RepositoryException;
 /**
  * An <code>ItemStateManager</code> that deals with state modifications.
  */
-public interface UpdatableItemStateManager {
+public interface UpdateableItemStateManager {
 
     /**
      * Executes the given operation and modifies the affected item states accordingly.
@@ -43,7 +43,7 @@ public interface UpdatableItemStateManag
     void execute(ChangeLog changes) throws RepositoryException;
 
     /**
-     * Disposes this <code>UpdatableItemStateManager</code> and frees resources.
+     * Disposes this <code>UpdateableItemStateManager</code> and frees resources.
      */
     void dispose();
 }

Propchange: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/UpdateableItemStateManager.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/ReferenceChangeTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/ReferenceChangeTracker.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/ReferenceChangeTracker.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/ReferenceChangeTracker.java Tue Sep  6 16:06:50 2011
@@ -59,7 +59,7 @@ public class ReferenceChangeTracker {
 
     /**
      * Store the given uuid mapping for later lookup using
-     * <code>#adjustReferences(UpdatableItemStateManager, ItemStateValidator)</code>.
+     * <code>#adjustReferences(UpdateableItemStateManager, ItemStateValidator)</code>.
      *
      * @param oldUUID
      * @param newUUID

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java Tue Sep  6 16:06:50 2011
@@ -98,11 +98,11 @@ public class VersionHistoryImpl extends 
     public VersionIterator getAllVersions() throws RepositoryException {
         checkStatus();
         refreshEntry(vhEntry);
-        Iterator<NodeEntry> childIter = vhEntry.getNodeEntries();
+        Iterator<NodeEntry> it = vhEntry.getNodeEntries();
         List<NodeEntry> versionEntries = new ArrayList<NodeEntry>();
         // all child-nodes except from jcr:versionLabels point to Versions.
-        while (childIter.hasNext()) {
-            NodeEntry entry = childIter.next();
+        while (it.hasNext()) {
+            NodeEntry entry = it.next();
             if (!NameConstants.JCR_VERSIONLABELS.equals(entry.getName())) {
                 versionEntries.add(entry);
             }
@@ -220,15 +220,15 @@ public class VersionHistoryImpl extends 
         checkValidVersion(version);
         String vUUID = version.getUUID();
 
-        List<String> vlabels = new ArrayList<String>();
+        List<String> labels = new ArrayList<String>();
         Name[] qLabels = getQLabels();
         for (Name qLabel : qLabels) {
             String uuid = getVersionByLabel(qLabel).getUUID();
             if (vUUID.equals(uuid)) {
-                vlabels.add(session.getNameResolver().getJCRName(qLabel));
+                labels.add(session.getNameResolver().getJCRName(qLabel));
             }
         }
-        return vlabels.toArray(new String[vlabels.size()]);
+        return labels.toArray(new String[labels.size()]);
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java Tue Sep  6 16:06:50 2011
@@ -95,7 +95,7 @@ public interface VersionManager {
     /**
      * @param nodeState
      * @throws VersionException If the <code>Node</code> represented by the given
-     * <code>NodeState</code> is checkedin.
+     * <code>NodeState</code> is checked in.
      * @throws RepositoryException If another error occurs.
      * @see javax.jcr.Node#isCheckedOut()
      */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/DocViewImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/DocViewImportHandler.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/DocViewImportHandler.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/DocViewImportHandler.java Tue Sep  6 16:06:50 2011
@@ -242,17 +242,17 @@ class DocViewImportHandler extends Targe
      */
     private Name[] parseNames(String value) throws SAXException {
         String[] names = value.split("\\p{Space}+");
-        Name[] qnames = new Name[names.length];
+        Name[] qNames = new Name[names.length];
         for (int i = 0; i < names.length; i++) {
             try {
-                qnames[i] = resolver.getQName(names[i]);
+                qNames[i] = resolver.getQName(names[i]);
             } catch (NameException ne) {
                 throw new SAXException("Invalid name: " + names[i], ne);
             } catch (NamespaceException e) {
                 throw new SAXException("Invalid name: " + names[i], e);
             }
         }
-        return qnames;
+        return qNames;
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImportHandler.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImportHandler.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImportHandler.java Tue Sep  6 16:06:50 2011
@@ -192,7 +192,7 @@ public class ImportHandler extends Defau
     }
 
     @Override
-    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+    public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException {
         // check if new context needs to be started
         if (nsContextStarted) {
             // reset flag
@@ -218,7 +218,7 @@ public class ImportHandler extends Defau
         }
 
         // delegate to target handler
-        targetHandler.startElement(namespaceURI, localName, qName, atts);
+        targetHandler.startElement(namespaceURI, localName, qName, attributes);
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/TargetImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/TargetImportHandler.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/TargetImportHandler.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/TargetImportHandler.java Tue Sep  6 16:06:50 2011
@@ -16,6 +16,15 @@
  */
 package org.apache.jackrabbit.jcr2spi.xml;
 
+import org.apache.jackrabbit.jcr2spi.xml.Importer.TextValue;
+import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.util.TransientFileFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.jcr.RepositoryException;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileReader;
@@ -25,16 +34,6 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.io.Writer;
 
-import javax.jcr.RepositoryException;
-
-import org.apache.jackrabbit.jcr2spi.xml.Importer.TextValue;
-import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
-import org.apache.jackrabbit.util.TransientFileFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
 /**
  * <code>TargetImportHandler</code> serves as the base class for the concrete
  * classes <code>{@link DocViewImportHandler}</code> and
@@ -296,14 +295,14 @@ abstract class TargetImportHandler exten
                     // create temp file and spool buffer contents
                     TransientFileFactory fileFactory = TransientFileFactory.getInstance();
                     tmpFile = fileFactory.createTransientFile("txt", null, null);
-                    final FileOutputStream fout = new FileOutputStream(tmpFile);
-                    writer = new OutputStreamWriter(fout) {
+                    final FileOutputStream out = new FileOutputStream(tmpFile);
+                    writer = new OutputStreamWriter(out) {
                         @Override
                         public void flush() throws IOException {
                             // flush this writer
                             super.flush();
                             // force synchronization with underlying file
-                            fout.getFD().sync();
+                            out.getFD().sync();
                         }
                     };
                     writer.write(buffer, 0, bufferPos);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java?rev=1165740&r1=1165739&r2=1165740&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java Tue Sep  6 16:06:50 2011
@@ -124,7 +124,7 @@ public class WorkspaceContentHandler ext
     }
 
     @Override
-    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
-        delegatee.startElement(namespaceURI, localName, qName, atts);
+    public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException {
+        delegatee.startElement(namespaceURI, localName, qName, attributes);
     }
 }
\ No newline at end of file



Mime
View raw message