jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r123110 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Date Wed, 22 Dec 2004 15:22:48 GMT
Author: stefan
Date: Wed Dec 22 07:22:43 2004
New Revision: 123110

URL: http://svn.apache.org/viewcvs?view=rev&rev=123110
Log:
minor fix: remember changed definitonId
+ reformatting (removing tab-character=
Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java?view=diff&rev=123110&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java&r1=123109&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java&r2=123110
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java	(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemManager.java	Wed Dec
22 07:22:43 2004
@@ -16,13 +16,11 @@
 package org.apache.jackrabbit.core;
 
 import org.apache.commons.collections.ReferenceMap;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.PropDefId;
-import org.apache.jackrabbit.core.nodetype.NodeDefId;
+import org.apache.jackrabbit.core.nodetype.*;
 import org.apache.jackrabbit.core.state.*;
+import org.apache.jackrabbit.core.version.InternalVersion;
 import org.apache.jackrabbit.core.version.InternalVersionHistory;
 import org.apache.jackrabbit.core.version.VersionHistoryImpl;
-import org.apache.jackrabbit.core.version.InternalVersion;
 import org.apache.jackrabbit.core.version.VersionImpl;
 import org.apache.log4j.Logger;
 
@@ -152,7 +150,7 @@
     private NodeDef getDefinition(NodeState state)
             throws RepositoryException {
         NodeDefId defId = state.getDefinitionId();
-        NodeDef def = session.getNodeTypeManager().getNodeDef(defId);
+        NodeDefImpl def = session.getNodeTypeManager().getNodeDef(defId);
         if (def == null) {
             log.warn("node at " + safeGetJCRPath(state.getId()) + " has invalid definitionId
(" + defId + ")");
 
@@ -162,6 +160,7 @@
             NodeState parentState = (NodeState) parent.getItemState();
             NodeState.ChildNodeEntry cne = (NodeState.ChildNodeEntry) parentState.getChildNodeEntries(state.getUUID()).get(0);
             def = parent.getApplicableChildNodeDef(cne.getName(), state.getNodeTypeName());
+            state.setDefinitionId(new NodeDefId(def.unwrap()));
         }
         return def;
     }
@@ -169,7 +168,7 @@
     private PropertyDef getDefinition(PropertyState state)
             throws RepositoryException {
         PropDefId defId = state.getDefinitionId();
-        PropertyDef def = session.getNodeTypeManager().getPropDef(defId);
+        PropertyDefImpl def = session.getNodeTypeManager().getPropDef(defId);
         if (def == null) {
             log.warn("property at " + safeGetJCRPath(state.getId()) + " has invalid definitionId
(" + defId + ")");
 
@@ -177,6 +176,7 @@
             NodeId parentId = new NodeId(state.getParentUUID());
             NodeImpl parent = (NodeImpl) getItem(parentId);
             def = parent.getApplicablePropertyDef(state.getName(), state.getType(), state.isMultiValued());
+            state.setDefinitionId(new PropDefId(def.unwrap()));
         }
         return def;
     }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java?view=diff&rev=123110&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java&r1=123109&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java&r2=123110
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Wed Dec 22 07:22:43 2004
@@ -1295,14 +1295,14 @@
         NodeTypeDef ntdOld = (NodeTypeDef) registeredNTDefs.get(name);
         NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
         if (!diff.isModified()) {
-	    // the definition has been modified, there's nothing to do here...
-	    return getEffectiveNodeType(name);
+            // the definition has been modified, there's nothing to do here...
+            return getEffectiveNodeType(name);
         }
         if (diff.isTrivial()) {
             /**
              * the change is trivial and has no effect on current content
              * (e.g. that would be the case when non-mandatory properties had
-	     * been added);
+             * been added);
              * re-register node type definition and update caches &
              * notify listeners on re-registration
              */

Mime
View raw message