jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r192955 - in /incubator/jackrabbit/trunk/src: java/org/apache/jackrabbit/core/version/VersionManagerImpl.java test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java test/org/apache/jackrabbit/test/api/version/VersionTest.java
Date Wed, 22 Jun 2005 16:51:14 GMT
Author: tripod
Date: Wed Jun 22 09:51:12 2005
New Revision: 192955

URL: http://svn.apache.org/viewcvs?rev=192955&view=rev
Log:
- fixing tck bugs

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?rev=192955&r1=192954&r2=192955&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
Wed Jun 22 09:51:12 2005
@@ -54,6 +54,7 @@
 import javax.jcr.NodeIterator;
 import javax.jcr.Session;
 import javax.jcr.Value;
+import javax.jcr.PropertyType;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionException;
@@ -133,8 +134,16 @@
                 root.setDefinitionId(ntReg.getEffectiveNodeType(REP_SYSTEM).getApplicableChildNodeDef(
                         JCR_VERSIONSTORAGE, REP_VERSIONSTORAGE).getId());
                 root.setNodeTypeName(REP_VERSIONSTORAGE);
+                PropertyState pt = pMgr.createNew(new PropertyId(rootUUID, JCR_PRIMARYTYPE));
+                pt.setDefinitionId(ntReg.getEffectiveNodeType(REP_SYSTEM).getApplicablePropertyDef(
+                        JCR_PRIMARYTYPE, PropertyType.NAME, false).getId());
+                pt.setMultiValued(false);
+                pt.setType(PropertyType.NAME);
+                pt.setValues(new InternalValue[]{InternalValue.create(REP_VERSIONSTORAGE)});
+                root.addPropertyEntry(pt.getName());
                 ChangeLog cl = new ChangeLog();
                 cl.added(root);
+                cl.added(pt);
                 pMgr.store(cl);
             }
             SharedItemStateManager sharedStateMgr = new SharedItemStateManager(pMgr, VERSION_STORAGE_NODE_UUID,
ntReg);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java?rev=192955&r1=192954&r2=192955&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
Wed Jun 22 09:51:12 2005
@@ -104,6 +104,14 @@
     public void testAutocreatedRootVersionHasNoState() throws
             RepositoryException {
 
+        /*
+
+        the spec 1.0 does not properly define this anymore. the
+        nt:version does not have a jcr:frozenUUID or jcr:primaryType, this was
+        moved to nt:frozenNode. so, the jcr:rootVersion is initialzied with an
+        'empty' frozen node. but this is wrongly described in chapter
+        8.2.4 Initializing the Version History.
+
         Version rootVersion = vHistory.getRootVersion();
         try {
             rootVersion.getNode(jcrFrozenNode);
@@ -111,6 +119,8 @@
         } catch (PathNotFoundException e) {
             // success
         }
+
+        */
     }
 
     /**

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java?rev=192955&r1=192954&r2=192955&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
Wed Jun 22 09:51:12 2005
@@ -359,6 +359,10 @@
      * to the current node
      */
     public void testGetReferences() throws Exception {
+        /*
+
+        inter-versionstorage references MAY not be supported by the rep.
+
         PropertyIterator pi = version.getReferences();
         boolean hasRootVersionReference = false;
         while (pi.hasNext()) {
@@ -375,6 +379,8 @@
             }
         }
         assertTrue("Version.getReferences() does not return the jcr:successors property of
the jcr:rootVersion", hasRootVersionReference);
+
+        */
     }
 
     /**



Mime
View raw message