jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r191499 [3/3] - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: ./ jndi/ lock/ nodetype/ observation/ query/lucene/ state/ state/obj/ state/xml/ version/ virtual/ xml/
Date Mon, 20 Jun 2005 15:58:58 GMT
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/obj/ObjectPersistenceManager.java
Mon Jun 20 08:58:57 2005
@@ -50,11 +50,9 @@
 import java.io.OutputStream;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 /**
@@ -170,14 +168,8 @@
         out.writeUTF(state.getParentUUID() == null ? "" : state.getParentUUID());
         // definitionId
         out.writeUTF(state.getDefinitionId().toString());
-        // parentUUIDs
-        Collection c = state.getParentUUIDs();
-        out.writeInt(c.size()); // count
-        for (Iterator iter = c.iterator(); iter.hasNext();) {
-            out.writeUTF((String) iter.next()); // uuid
-        }
         // mixin types
-        c = state.getMixinTypeNames();
+        Collection c = state.getMixinTypeNames();
         out.writeInt(c.size()); // count
         for (Iterator iter = c.iterator(); iter.hasNext();) {
             out.writeUTF(iter.next().toString());   // name
@@ -231,17 +223,8 @@
         // definitionId
         s = in.readUTF();
         state.setDefinitionId(NodeDefId.valueOf(s));
-        // parentUUIDs
-        int count = in.readInt();   // count
-        List list = new ArrayList(count);
-        for (int i = 0; i < count; i++) {
-            list.add(in.readUTF()); // uuid
-        }
-        if (list.size() > 0) {
-            state.setParentUUIDs(list);
-        }
         // mixin types
-        count = in.readInt();   // count
+        int count = in.readInt();   // count
         Set set = new HashSet(count);
         for (int i = 0; i < count; i++) {
             set.add(QName.valueOf(in.readUTF())); // name

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/xml/XMLPersistenceManager.java
Mon Jun 20 08:58:57 2005
@@ -85,9 +85,6 @@
     private static final String PARENTUUID_ATTRIBUTE = "parentUUID";
     private static final String DEFINITIONID_ATTRIBUTE = "definitionId";
 
-    private static final String PARENTS_ELEMENT = "parents";
-    private static final String PARENT_ELEMENT = "parent";
-
     private static final String MIXINTYPES_ELEMENT = "mixinTypes";
     private static final String MIXINTYPE_ELEMENT = "mixinType";
 
@@ -212,18 +209,6 @@
         String definitionId = walker.getAttribute(DEFINITIONID_ATTRIBUTE);
         state.setDefinitionId(NodeDefId.valueOf(definitionId));
 
-        // parent uuid's
-        if (walker.enterElement(PARENTS_ELEMENT)) {
-            ArrayList parentUUIDs = new ArrayList();
-            while (walker.iterateElements(PARENT_ELEMENT)) {
-                parentUUIDs.add(walker.getAttribute(UUID_ATTRIBUTE));
-            }
-            if (parentUUIDs.size() > 0) {
-                state.setParentUUIDs(parentUUIDs);
-            }
-            walker.leaveElement();
-        }
-
         // mixin types
         if (walker.enterElement(MIXINTYPES_ELEMENT)) {
             Set mixins = new HashSet();
@@ -306,7 +291,6 @@
             while (walker.iterateElements(VALUE_ELEMENT)) {
                 // read serialized value
                 String content = walker.getContent();
-                InternalValue val;
                 if (content.length() > 0) {
                     if (type == PropertyType.BINARY) {
                         // special handling required for binary value:
@@ -512,18 +496,10 @@
                         + PARENTUUID_ATTRIBUTE + "=\"" + (state.getParentUUID() == null ?
"" : state.getParentUUID()) + "\" "
                         + DEFINITIONID_ATTRIBUTE + "=\"" + state.getDefinitionId().toString()
+ "\" "
                         + NODETYPE_ATTRIBUTE + "=\"" + Text.encodeIllegalXMLCharacters(state.getNodeTypeName().toString())
+ "\">\n");
-                // parents
-                writer.write("\t<" + PARENTS_ELEMENT + ">\n");
-                Iterator iter = state.getParentUUIDs().iterator();
-                while (iter.hasNext()) {
-                    writer.write("\t\t<" + PARENT_ELEMENT + " "
-                            + UUID_ATTRIBUTE + "=\"" + iter.next() + "\"/>\n");
-                }
-                writer.write("\t</" + PARENTS_ELEMENT + ">\n");
 
                 // mixin types
                 writer.write("\t<" + MIXINTYPES_ELEMENT + ">\n");
-                iter = state.getMixinTypeNames().iterator();
+                Iterator iter = state.getMixinTypeNames().iterator();
                 while (iter.hasNext()) {
                     writer.write("\t\t<" + MIXINTYPE_ELEMENT + " "
                             + NAME_ATTRIBUTE + "=\"" + Text.encodeIllegalXMLCharacters(iter.next().toString())
+ "\"/>\n");

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
Mon Jun 20 08:58:57 2005
@@ -183,8 +183,8 @@
      */
     public boolean hasFrozenHistory(String uuid) {
         try {
-            List entries = node.getState().getChildNodeEntries(uuid);
-            if (entries.size() > 0) {
+            NodeState.ChildNodeEntry entry  = node.getState().getChildNodeEntry(uuid);
+            if (entry != null) {
                 return getVersionManager().getItem(uuid) instanceof InternalFrozenVersionHistory;
             }
         } catch (RepositoryException e) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java
Mon Jun 20 08:58:57 2005
@@ -90,8 +90,7 @@
             try {
                 String parentId = nodeState.getParentUUID();
                 NodeState parent = (NodeState) stateMgr.getItemState(new NodeId(parentId));
-                name = ((NodeState.ChildNodeEntry)
-                        parent.getChildNodeEntries(nodeState.getUUID()).get(0)).getName();
+                name = parent.getChildNodeEntry(nodeState.getUUID()).getName();
             } catch (ItemStateException e) {
                 // should never occurr
                 throw new IllegalStateException(e.toString());

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
Mon Jun 20 08:58:57 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.core.virtual;
 
-import org.apache.commons.collections.ReferenceMap;
+import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.jackrabbit.core.Constants;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=191499&r1=191498&r2=191499&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
Mon Jun 20 08:58:57 2005
@@ -221,6 +221,7 @@
             }
             // remove conflicting:
             // check if conflicting can be removed
+            // (access rights, node type constraints, locking & versioning status)
             itemOps.checkRemoveNode(conflicting,
                     BatchedItemOperations.CHECK_ACCESS
                     | BatchedItemOperations.CHECK_LOCK



Mime
View raw message