jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1177285 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ./ hierarchy/ nodetype/ operation/ state/
Date Thu, 29 Sep 2011 12:31:09 GMT
Author: mduerig
Date: Thu Sep 29 12:31:08 2011
New Revision: 1177285

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

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LogUtil.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/SessionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.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/NodeTypeRegistryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LogUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LogUtil.java?rev=1177285&r1=1177284&r2=1177285&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LogUtil.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LogUtil.java
Thu Sep 29 12:31:08 2011
@@ -43,17 +43,17 @@ public final class LogUtil {
      * Fail safe conversion of internal {@code Path} to JCR path for use in
      * error messages etc.
      *
-     * @param qPath path to convert
+     * @param path path to convert
      * @param pathResolver
      * @return JCR path
      */
-    public static String safeGetJCRPath(Path qPath, PathResolver pathResolver) {
+    public static String safeGetJCRPath(Path path, PathResolver pathResolver) {
         try {
-            return pathResolver.getJCRPath(qPath);
+            return pathResolver.getJCRPath(path);
         } catch (NamespaceException e) {
-            log.error("failed to convert " + qPath + " to JCR path.");
+            log.error("failed to convert " + path + " to JCR path.");
             // return string representation of internal path as a fallback
-            return qPath.toString();
+            return path.toString();
         }
     }
 
@@ -78,17 +78,17 @@ public final class LogUtil {
      * Fail safe conversion of a {@code Name} to a JCR name for use in
      * error messages etc.
      *
-     * @param qName
+     * @param name
      * @param resolver
      * @return JCR name or String representation of the given {@code Name}
      * in case the resolution fails.
      */
-    public static String saveGetJCRName(Name qName, NamePathResolver resolver) {
+    public static String saveGetJCRName(Name name, NamePathResolver resolver) {
         try {
-            return resolver.getJCRName(qName);
+            return resolver.getJCRName(name);
         } catch (NamespaceException e) {
-            log.error("failed to convert " + qName + " to JCR name.");
-            return qName.toString();
+            log.error("failed to convert " + name + " to JCR name.");
+            return name.toString();
         }
     }
 

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=1177285&r1=1177284&r2=1177285&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
Thu Sep 29 12:31:08 2011
@@ -1033,7 +1033,7 @@ public class NodeImpl extends ItemImpl<N
      * Common internal restore method for the various Node#restore calls.
      *
      * @param targetNode
-     * @param relQPath
+     * @param relPath
      * @param version
      * @param removeExisting
      * @throws PathNotFoundException
@@ -1045,10 +1045,10 @@ public class NodeImpl extends ItemImpl<N
      * @throws InvalidItemStateException
      * @throws RepositoryException
      */
-    private void restore(NodeImpl targetNode, Path relQPath, Version version, boolean removeExisting)
+    private void restore(NodeImpl targetNode, Path relPath, Version version, boolean removeExisting)
             throws RepositoryException {
 
-        if (relQPath == null) {
+        if (relPath == null) {
             /* restore target already exists. */
             // target must be versionable
             targetNode.checkIsVersionable();
@@ -1070,7 +1070,7 @@ public class NodeImpl extends ItemImpl<N
             if (!targetNode.isCheckedOut()) {
                 throw new VersionException("Parent " + targetNode.safeGetJCRPath()
                     + " for non-existing restore target '"
-                    + LogUtil.safeGetJCRPath(relQPath, session.getNamePathResolver())
+                    + LogUtil.safeGetJCRPath(relPath, session.getNamePathResolver())
                     + "' must be checked out.");
             }
             targetNode.checkIsLocked();
@@ -1078,7 +1078,7 @@ public class NodeImpl extends ItemImpl<N
         }
 
         NodeState versionState = session.getVersionState(version);
-        session.getVersionStateManager().restore(targetNode.getNodeState(), relQPath, versionState,
removeExisting);
+        session.getVersionStateManager().restore(targetNode.getNodeState(), relPath, versionState,
removeExisting);
     }
 
     @Override
@@ -1176,24 +1176,24 @@ public class NodeImpl extends ItemImpl<N
     //--------------------------------------------------------< public impl >---
 
     /**
-     * @param qName
+     * @param name
      * @return
      * @throws RepositoryException
      */
-    boolean isNodeType(Name qName) throws RepositoryException {
+    boolean isNodeType(Name name) throws RepositoryException {
         // first do trivial checks without using type hierarchy
-        if (qName.equals(getPrimaryNodeTypeName())) {
+        if (name.equals(getPrimaryNodeTypeName())) {
             return true;
         }
         // check if contained in mixin types
         for (Name mixin : getNodeState().getMixinTypeNames()) {
-            if (mixin.equals(qName)) {
+            if (mixin.equals(name)) {
                 return true;
             }
         }
         // NEW nodes with inherited-mixins -> mixin not yet active
         if (getNodeState().getStatus() == Status.NEW &&
-            session.getNodeTypeResolver().getNodeType(qName).isMixin()) {
+            session.getNodeTypeResolver().getNodeType(name).isMixin()) {
             return false;
         }
 
@@ -1201,7 +1201,7 @@ public class NodeImpl extends ItemImpl<N
         EffectiveNodeType effNT = session.getEffectiveNodeTypeProvider().getEffectiveNodeType(getNodeState()
                 .getNodeTypeNames());
         
-        return effNT.includesNodeType(qName);
+        return effNT.includesNodeType(name);
     }
 
     //-----------------------------------------------------------< ItemImpl >---
@@ -1349,29 +1349,29 @@ public class NodeImpl extends ItemImpl<N
     }
 
     /**
-     * @param qName
+     * @param name
      * @return
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
     // TODO: protected due to usage within VersionImpl, VersionHistoryImpl (check for alternatives)
-    protected Property getProperty(Name qName) throws RepositoryException {
+    protected Property getProperty(Name name) throws RepositoryException {
         checkStatus();
         try {
-            PropertyEntry pEntry = getNodeEntry().getPropertyEntry(qName);
+            PropertyEntry pEntry = getNodeEntry().getPropertyEntry(name);
             if (pEntry == null) {
-                throw new PathNotFoundException(LogUtil.saveGetJCRName(qName, session.getNamePathResolver()));
+                throw new PathNotFoundException(LogUtil.saveGetJCRName(name, session.getNamePathResolver()));
             }
             return getItemManager().getItem(pEntry);
         } catch (AccessDeniedException e) {
-            throw new PathNotFoundException(LogUtil.saveGetJCRName(qName, session.getNamePathResolver()));
+            throw new PathNotFoundException(LogUtil.saveGetJCRName(name, session.getNamePathResolver()));
         }
     }
 
     /**
      * Create a new single valued property
      *
-     * @param qName
+     * @param name
      * @param type
      * @param value
      * @return
@@ -1379,8 +1379,8 @@ public class NodeImpl extends ItemImpl<N
      * could be found.
      * @throws RepositoryException if another error occurs.
      */
-    private Property createProperty(Name qName, Value value, int type) throws RepositoryException
{
-        QPropertyDefinition def = getApplicablePropertyDefinition(qName, type, false);
+    private Property createProperty(Name name, Value value, int type) throws RepositoryException
{
+        QPropertyDefinition def = getApplicablePropertyDefinition(name, type, false);
         int targetType = def.getRequiredType();
         if (targetType == PropertyType.UNDEFINED) {
             targetType = type;
@@ -1393,21 +1393,21 @@ public class NodeImpl extends ItemImpl<N
             Value targetValue = ValueHelper.convert(value, targetType, session.getValueFactory());
             qvs = ValueFormat.getQValue(targetValue, session.getNamePathResolver(), session.getQValueFactory());
         }
-        return createProperty(qName, targetType, def, new QValue[] {qvs});
+        return createProperty(name, targetType, def, new QValue[] {qvs});
     }
 
     /**
      * Create a new multi valued property
      *
-     * @param qName
+     * @param name
      * @param type
      * @param values
      * @return
      * @throws ConstraintViolationException
      * @throws RepositoryException
      */
-    private Property createProperty(Name qName, Value[] values, int type) throws RepositoryException
{
-        QPropertyDefinition def = getApplicablePropertyDefinition(qName, type, true);
+    private Property createProperty(Name name, Value[] values, int type) throws RepositoryException
{
+        QPropertyDefinition def = getApplicablePropertyDefinition(name, type, true);
         int targetType = def.getRequiredType();
         // make sure, the final type is not set to undefined
         if (targetType == PropertyType.UNDEFINED) {
@@ -1431,11 +1431,11 @@ public class NodeImpl extends ItemImpl<N
         }
         Value[] targetValues = ValueHelper.convert(values, targetType, session.getValueFactory());
         QValue[] qvs = ValueFormat.getQValues(targetValues, session.getNamePathResolver(),
session.getQValueFactory());
-        return createProperty(qName, targetType, def, qvs);
+        return createProperty(name, targetType, def, qvs);
     }
 
     /**
-     * @param qName
+     * @param name
      * @param type
      * @param def
      * @param qvs
@@ -1444,12 +1444,12 @@ public class NodeImpl extends ItemImpl<N
      * @throws ConstraintViolationException
      * @throws RepositoryException
      */
-    private Property createProperty(Name qName, int type, QPropertyDefinition def, QValue[]
qvs)
+    private Property createProperty(Name name, int type, QPropertyDefinition def, QValue[]
qvs)
             throws RepositoryException {
 
-        Operation op = AddProperty.create(getNodeState(), qName, type, def, qvs);
+        Operation op = AddProperty.create(getNodeState(), name, type, def, qvs);
         session.getSessionItemStateManager().execute(op);
-        return getProperty(qName);
+        return getProperty(name);
     }
 
     /**
@@ -1458,13 +1458,13 @@ public class NodeImpl extends ItemImpl<N
      * @throws RepositoryException
      */
     private Name getQName(String jcrName) throws RepositoryException {
-        Name qName;
+        Name name;
         try {
-            qName = session.getNamePathResolver().getQName(jcrName);
+            name = session.getNamePathResolver().getQName(jcrName);
         } catch (NameException upe) {
             throw new RepositoryException("invalid name: "+ jcrName, upe);
         }
-        return qName;
+        return name;
     }
 
     /**

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=1177285&r1=1177284&r2=1177285&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
Thu Sep 29 12:31:08 2011
@@ -256,11 +256,11 @@ public class SessionImpl extends Abstrac
     public Item getItem(String absPath) throws RepositoryException {
         checkIsAlive();
         try {
-            Path qPath = getQPath(absPath).getNormalizedPath();
-            if (itemManager.nodeExists(qPath)) {
-                return itemManager.getNode(qPath);
+            Path path = getQPath(absPath).getNormalizedPath();
+            if (itemManager.nodeExists(path)) {
+                return itemManager.getNode(path);
             } else {
-                return itemManager.getProperty(qPath);
+                return itemManager.getProperty(path);
             }
         } catch (AccessDeniedException ade) {
             throw new PathNotFoundException(absPath);
@@ -270,8 +270,8 @@ public class SessionImpl extends Abstrac
     @Override
     public boolean itemExists(String absPath) throws RepositoryException {
         checkIsAlive();
-        Path qPath = getQPath(absPath).getNormalizedPath();
-        return itemManager.nodeExists(qPath) || itemManager.propertyExists(qPath);
+        Path path = getQPath(absPath).getNormalizedPath();
+        return itemManager.nodeExists(path) || itemManager.propertyExists(path);
     }
 
     @Override
@@ -447,8 +447,8 @@ public class SessionImpl extends Abstrac
     public Node getNode(String absPath) throws RepositoryException {
         checkIsAlive();
         try {
-            Path qPath = getQPath(absPath).getNormalizedPath();
-            return itemManager.getNode(qPath);
+            Path path = getQPath(absPath).getNormalizedPath();
+            return itemManager.getNode(path);
         } catch (AccessDeniedException ade) {
             throw new PathNotFoundException(absPath);
         }
@@ -463,8 +463,8 @@ public class SessionImpl extends Abstrac
     public Property getProperty(String absPath) throws RepositoryException {
         checkIsAlive();
         try {
-            Path qPath = getQPath(absPath).getNormalizedPath();
-            return itemManager.getProperty(qPath);
+            Path path = getQPath(absPath).getNormalizedPath();
+            return itemManager.getProperty(path);
         } catch (AccessDeniedException ade) {
             throw new PathNotFoundException(absPath);
         }
@@ -519,15 +519,15 @@ public class SessionImpl extends Abstrac
     @Override
     public boolean nodeExists(String absPath) throws RepositoryException {
         checkIsAlive();
-        Path qPath = getQPath(absPath).getNormalizedPath();
-        return itemManager.nodeExists(qPath);
+        Path path = getQPath(absPath).getNormalizedPath();
+        return itemManager.nodeExists(path);
     }
 
     @Override
     public boolean propertyExists(String absPath) throws RepositoryException {
         checkIsAlive();
-        Path qPath = getQPath(absPath).getNormalizedPath();
-        return itemManager.propertyExists(qPath);
+        Path path = getQPath(absPath).getNormalizedPath();
+        return itemManager.propertyExists(path);
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java?rev=1177285&r1=1177284&r2=1177285&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
Thu Sep 29 12:31:08 2011
@@ -458,7 +458,7 @@ final class ChildNodeEntries {
                     LinkedEntries.LinkNode ln = it.next();
                     if (ln == beforeLN) {
                         break;
-                    } else if (ln != insert && insertName.equals(ln.qName)) {
+                    } else if (ln != insert && insertName.equals(ln.name)) {
                         position++;
                     } // else: ln == insertLN OR no SNS -> not relevant for position count
                 }
@@ -491,7 +491,7 @@ final class ChildNodeEntries {
             // nothing to do
         } else {
             // reorder named map
-            Name insertName = insertLN.qName;
+            Name insertName = insertLN.name;
             if (entriesByName.containsSiblings(insertName)) {
                 int position; 
                 if (afterLN == entries.getHeader()) {
@@ -504,7 +504,7 @@ final class ChildNodeEntries {
                     position = 0;
                     for (Iterator<LinkedEntries.LinkNode> it = entries.linkNodeIterator();
it.hasNext(); ) {
                         LinkedEntries.LinkNode ln = it.next();
-                        if (insertName.equals(ln.qName) && ln != insertLN) {
+                        if (insertName.equals(ln.name) && ln != insertLN) {
                             position++;
                         }
                         if (ln == afterLN) {
@@ -655,17 +655,17 @@ final class ChildNodeEntries {
          */
         private final class LinkNode extends Node {
 
-            private final Name qName;
+            private final Name name;
 
             protected LinkNode() {
-                qName = null;
+                name = null;
             }
 
             protected LinkNode(Object value, int index) {
                 // add soft reference from linkNode to the NodeEntry (value)
                 // unless the entry is a SNSibling. TODO: review again.
                 super(index > Path.INDEX_DEFAULT ? value : new SoftReference<Object>(value));
-                qName = ((NodeEntry) value).getName();
+                name = ((NodeEntry) value).getName();
             }
 
             @Override
@@ -689,7 +689,7 @@ final class ChildNodeEntries {
                 // if the nodeEntry has been g-collected in the mean time
                 // create a new NodeEntry in order to avoid returning null.
                 if (ne == null && this != header) {
-                    ne = factory.createNodeEntry(parent, qName, null);
+                    ne = factory.createNodeEntry(parent, name, null);
                     super.setValue(new SoftReference<NodeEntry>(ne));
                 }
                 return ne;
@@ -777,27 +777,27 @@ final class ChildNodeEntries {
         /**
          * Return true if more than one NodeEntry with the given name exists.
          *
-         * @param qName
+         * @param name
          * @return true if more than one NodeEntry with the given name exists.
          */
-        public boolean containsSiblings(Name qName) {
-            return snsMap.containsKey(qName);
+        public boolean containsSiblings(Name name) {
+            return snsMap.containsKey(name);
         }
 
         /**
          * Returns a single {@code NodeEntry} or an unmodifiable
          * {@code List} of NodeEntry objects.
          *
-         * @param qName
+         * @param name
          * @return a single {@code NodeEntry} or a {@code List} of
          * NodeEntry objects.
          */
-        private Object get0(Name qName) {
-            LinkedEntries.LinkNode val = nameMap.get(qName);
+        private Object get0(Name name) {
+            LinkedEntries.LinkNode val = nameMap.get(name);
             if (val != null) {
                 return val.getNodeEntry();
             } else {
-                List<LinkedEntries.LinkNode> l = snsMap.get(qName);
+                List<LinkedEntries.LinkNode> l = snsMap.get(name);
                 if (l != null) {
                     List<NodeEntry> nodeEntries = new ArrayList<NodeEntry>(l.size());
                     for (LinkedEntries.LinkNode ln : l) {
@@ -814,16 +814,16 @@ final class ChildNodeEntries {
          * {@code List} of NodeEntry objects.
          *
          *
-         * @param qName
+         * @param name
          * @return a single {@code NodeEntry} or a {@code List} of
          * NodeEntry objects.
          */
-        private List<NodeEntry> get(Name qName) {
-            LinkedEntries.LinkNode val = nameMap.get(qName);
+        private List<NodeEntry> get(Name name) {
+            LinkedEntries.LinkNode val = nameMap.get(name);
             if (val != null) {
                 return Collections.singletonList(val.getNodeEntry());
             } else {
-                List<LinkedEntries.LinkNode> l = snsMap.get(qName);
+                List<LinkedEntries.LinkNode> l = snsMap.get(name);
                 if (l != null) {
                     List<NodeEntry> nodeEntries = new ArrayList<NodeEntry>(l.size());
                     for (LinkedEntries.LinkNode ln : l) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java?rev=1177285&r1=1177284&r2=1177285&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
Thu Sep 29 12:31:08 2011
@@ -87,14 +87,14 @@ public final class EntryFactory {
         return rootEntry;
     }
 
-    public NodeEntry createNodeEntry(NodeEntry parent, Name qName, String uniqueId) {
-        NodeEntry entry = new NodeEntry(parent, qName, uniqueId, this);
+    public NodeEntry createNodeEntry(NodeEntry parent, Name name, String uniqueId) {
+        NodeEntry entry = new NodeEntry(parent, name, uniqueId, this);
         notifyEntryCreated(entry);
         return entry;
     }
 
-    public PropertyEntry createPropertyEntry(NodeEntry parent, Name qName) {
-        return new PropertyEntry(parent, qName, this);
+    public PropertyEntry createPropertyEntry(NodeEntry parent, Name name) {
+        return new PropertyEntry(parent, name, this);
     }
 
     public IdFactory getIdFactory() {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java?rev=1177285&r1=1177284&r2=1177285&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyManager.java
Thu Sep 29 12:31:08 2011
@@ -140,23 +140,23 @@ public class HierarchyManager {
     /**
      * Resolves a path into a {@code NodeEntry}.
      *
-     * @param qPath
+     * @param path
      * @return
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeEntry getNodeEntry(Path qPath) throws RepositoryException {
+    public NodeEntry getNodeEntry(Path path) throws RepositoryException {
         NodeEntry rootEntry = getRootEntry();
         // shortcut
-        if (qPath.denotesRoot()) {
+        if (path.denotesRoot()) {
             return rootEntry;
         }
-        if (!qPath.isCanonical()) {
+        if (!path.isCanonical()) {
             String msg = "Path is not canonical";
             log.debug(msg);
             throw new RepositoryException(msg);
         }
-        return rootEntry.getDeepNodeEntry(qPath);
+        return rootEntry.getDeepNodeEntry(path);
     }
 
     /**
@@ -185,41 +185,41 @@ public class HierarchyManager {
     /**
      * Resolves a path into a {@code PropertyEntry}.
      *
-     * @param qPath
+     * @param path
      * @return
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyEntry getPropertyEntry(Path qPath) throws RepositoryException {
+    public PropertyEntry getPropertyEntry(Path path) throws RepositoryException {
         // shortcut
-        if (qPath.denotesRoot()) {
+        if (path.denotesRoot()) {
             throw new PathNotFoundException("The root path never points to a Property.");
         }
-        if (!qPath.isCanonical()) {
+        if (!path.isCanonical()) {
             String msg = "Path is not canonical";
             log.debug(msg);
             throw new RepositoryException(msg);
         }
-        return getRootEntry().getDeepPropertyEntry(qPath);
+        return getRootEntry().getDeepPropertyEntry(path);
     }
 
     /**
      * Retrieves the {@code NodeEntry} corresponding to the given
      * path and resolves it to the underlying {@code NodeState}.
      *
-     * @param qPath
+     * @param path
      * @return
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public NodeState getNodeState(Path qPath) throws RepositoryException {
-        NodeEntry entry = getNodeEntry(qPath);
+    public NodeState getNodeState(Path path) throws RepositoryException {
+        NodeEntry entry = getNodeEntry(path);
         try {
             NodeState state = entry.getNodeState();
             if (state.isValid()) {
                 return state;
             } else {
-                throw new PathNotFoundException(LogUtil.safeGetJCRPath(qPath, namePathResolver));
+                throw new PathNotFoundException(LogUtil.safeGetJCRPath(path, namePathResolver));
             }
         } catch (ItemNotFoundException e) {
             throw new PathNotFoundException(e);
@@ -230,19 +230,19 @@ public class HierarchyManager {
      * Retrieves the {@code PropertyEntry} corresponding to the given
      * path and resolves it to the underlying {@code PropertyState}.
      *
-     * @param qPath
+     * @param path
      * @return
      * @throws PathNotFoundException
      * @throws RepositoryException
      */
-    public PropertyState getPropertyState(Path qPath) throws RepositoryException {
-        PropertyEntry entry = getPropertyEntry(qPath);
+    public PropertyState getPropertyState(Path path) throws RepositoryException {
+        PropertyEntry entry = getPropertyEntry(path);
         try {
             PropertyState state = entry.getPropertyState();
             if (state.isValid()) {
                 return state;
             } else {
-                throw new PathNotFoundException(LogUtil.safeGetJCRPath(qPath, namePathResolver));
+                throw new PathNotFoundException(LogUtil.safeGetJCRPath(path, namePathResolver));
             }
         } catch (ItemNotFoundException e) {
             throw new PathNotFoundException(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=1177285&r1=1177284&r2=1177285&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
Thu Sep 29 12:31:08 2011
@@ -305,8 +305,8 @@ public class NodeTypeImpl extends Abstra
     @Override
     public boolean canRemoveItem(String itemName) {
         try {
-            Name qName = resolver().getQName(itemName);
-            return !(ent.hasRemoveNodeConstraint(qName) || ent.hasRemovePropertyConstraint(qName));
+            Name name = resolver().getQName(itemName);
+            return !(ent.hasRemoveNodeConstraint(name) || ent.hasRemovePropertyConstraint(name));
         } catch (RepositoryException re) {
             return false;
         }

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=1177285&r1=1177284&r2=1177285&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
Thu Sep 29 12:31:08 2011
@@ -127,8 +127,8 @@ public class NodeTypeRegistryImpl implem
 
     @Override
     public Name[] getRegisteredNodeTypes() throws RepositoryException {
-        Set<Name> qNames = registeredNTDefs.keySet();
-        return qNames.toArray(new Name[registeredNTDefs.size()]);
+        Set<Name> names = registeredNTDefs.keySet();
+        return names.toArray(new Name[registeredNTDefs.size()]);
     }
 
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java?rev=1177285&r1=1177284&r2=1177285&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
Thu Sep 29 12:31:08 2011
@@ -33,13 +33,13 @@ public class Restore extends AbstractOpe
     private static final Logger log = LoggerFactory.getLogger(Restore.class);
 
     private final NodeState nodeState;
-    private final Path relQPath;
+    private final Path relPath;
     private final NodeState[] versionStates;
     private final boolean removeExisting;
 
-    private Restore(NodeState nodeState, Path relQPath, NodeState[] versionStates, boolean
removeExisting) {
+    private Restore(NodeState nodeState, Path relPath, NodeState[] versionStates, boolean
removeExisting) {
         this.nodeState = nodeState;
-        this.relQPath = relQPath;
+        this.relPath = relPath;
         this.versionStates = versionStates;
         this.removeExisting = removeExisting;
 
@@ -97,7 +97,7 @@ public class Restore extends AbstractOpe
      * @see javax.jcr.Node#restore(Version, String, boolean)
      */
     public Path getRelativePath() {
-        return relQPath;
+        return relPath;
     }
 
     public NodeId[] getVersionIds() throws RepositoryException {

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=1177285&r1=1177284&r2=1177285&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
Thu Sep 29 12:31:08 2011
@@ -547,14 +547,14 @@ public class SessionItemStateManager ext
     }
 
     /**
-     * @param qNames
+     * @param names
      * @param factory
      * @return An array of QValue objects from the given {@code Name}s
      */
-    private static QValue[] getQValues(Name[] qNames, QValueFactory factory) throws RepositoryException
{
-        QValue[] ret = new QValue[qNames.length];
-        for (int i = 0; i < qNames.length; i++) {
-            ret[i] = factory.create(qNames[i]);
+    private static QValue[] getQValues(Name[] names, QValueFactory factory) throws RepositoryException
{
+        QValue[] ret = new QValue[names.length];
+        for (int i = 0; i < names.length; i++) {
+            ret[i] = factory.create(names[i]);
         }
         return ret;
     }



Mime
View raw message