incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r353840 - in /incubator/graffito/trunk/jcr-mapping: ./ src/java/org/apache/portals/graffito/jcr/exception/ src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/ src/test/org/apache/portals/graffito/jcr/repository/
Date Sun, 04 Dec 2005 10:12:23 GMT
Author: clombart
Date: Sun Dec  4 02:12:10 2005
New Revision: 353840

URL: http://svn.apache.org/viewcvs?rev=353840&view=rev
Log:
Move jcr-mapping project

Modified:
    incubator/graffito/trunk/jcr-mapping/.classpath
    incubator/graffito/trunk/jcr-mapping/locator.ent
    incubator/graffito/trunk/jcr-mapping/locator.path
    incubator/graffito/trunk/jcr-mapping/project.properties
    incubator/graffito/trunk/jcr-mapping/project.xml
    incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
    incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
    incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/RepositoryUtilTest.java

Modified: incubator/graffito/trunk/jcr-mapping/.classpath
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/.classpath?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/.classpath (original)
+++ incubator/graffito/trunk/jcr-mapping/.classpath Sun Dec  4 02:12:10 2005
@@ -11,15 +11,13 @@
   </classpathentry>
   <classpathentry kind="var" path="MAVEN_REPO/graffito/jars/graffito-commons-1.0-a1-dev.jar">
   </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/jackrabbit/jars/jackrabbit-core-1.0-SNAPSHOT.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/jackrabbit/jars/jackrabbit-commons-1.0-SNAPSHOT.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/jackrabbit/jars/jackrabbit-api-1.0-SNAPSHOT.jar">
+  <classpathentry kind="var" path="MAVEN_REPO/jackrabbit/jars/jackrabbit-1.0-20051109-SNAPSHOT.jar">
   </classpathentry>
   <classpathentry kind="var" path="MAVEN_REPO/concurrent/jars/concurrent-1.3.4.jar">
   </classpathentry>
   <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar">
   </classpathentry>
   <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jta-1.0-M1.jar">
   </classpathentry>

Modified: incubator/graffito/trunk/jcr-mapping/locator.ent
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/locator.ent?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/locator.ent (original)
+++ incubator/graffito/trunk/jcr-mapping/locator.ent Sun Dec  4 02:12:10 2005
@@ -1,2 +1,2 @@
 <!-- derive locator.ent from parent -->
-<!ENTITY % locator-ent SYSTEM "file:../locator.ent"> %locator-ent;
+<!ENTITY % locator-ent SYSTEM "file:../../locator.ent"> %locator-ent;

Modified: incubator/graffito/trunk/jcr-mapping/locator.path
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/locator.path?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/locator.path (original)
+++ incubator/graffito/trunk/jcr-mapping/locator.path Sun Dec  4 02:12:10 2005
@@ -1 +1 @@
-../
\ No newline at end of file
+../../
\ No newline at end of file

Modified: incubator/graffito/trunk/jcr-mapping/project.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/project.properties?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/project.properties (original)
+++ incubator/graffito/trunk/jcr-mapping/project.properties Sun Dec  4 02:12:10 2005
@@ -21,7 +21,7 @@
 # MULTIPROJECTS
 #-----------------------------------------------------------------------------------------------------
 maven.multiproject.type=jar
-
+maven.license.licenseFile=../../LICENSE.TXT
 #-----------------------------------------------------------------------------------------------------
 # DOC : SITE & PDF DOC
 #-----------------------------------------------------------------------------------------------------

Modified: incubator/graffito/trunk/jcr-mapping/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/project.xml?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/project.xml (original)
+++ incubator/graffito/trunk/jcr-mapping/project.xml Sun Dec  4 02:12:10 2005
@@ -16,7 +16,7 @@
 -->
 
 <project>
-	<extend>${basedir}/../project.xml</extend>
+	<extend>${basedir}/../../project.xml</extend>
 	<pomVersion>3</pomVersion>
 	<id>graffito-jcr-mapping</id>
 	<groupId>graffito</groupId>
@@ -27,8 +27,8 @@
 	<shortDescription>Graffito JCR Mapping Tools</shortDescription>
 
 	<repository>
-		<connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr-mapping</connection>
-		<developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr-mapping</developerConnection>
+		<connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr/jcr-mapping</connection>
+		<developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr/jcr-mapping</developerConnection>
 		<url>http://svn.apache.org/viewcvs</url>
 	</repository>
 
@@ -179,8 +179,20 @@
 			</resource>
 		</resources>
 
-	</build>
-	<reports>
-		<report>maven-javadoc-plugin</report>
-	</reports>
+
+  </build>
+  <reports>
+       <report>maven-javadoc-plugin</report>
+       <report>maven-changelog-plugin</report>    
+       <report>maven-file-activity-plugin</report>
+       <report>maven-jcoverage-plugin</report>
+       <report>maven-changelog-plugin</report>
+       <report>maven-changes-plugin</report>
+       <!-- <report>maven-checkstyle-plugin</report> -->
+       <report>maven-junit-report-plugin</report>
+       <report>maven-jxr-plugin</report>
+       <report>maven-pmd-plugin</report>
+       
+       
+  </reports>
 </project>

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
Sun Dec  4 02:12:10 2005
@@ -23,7 +23,7 @@
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
  */
 
-public abstract class JcrMappingException extends RuntimeException
+public class JcrMappingException extends RuntimeException
 {
 
     /**

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
Sun Dec  4 02:12:10 2005
@@ -54,7 +54,7 @@
 		{
 			return null;
 		}
-		return this.getValueFactory().createValue(((java.util.Date) propValue).getTime());
+		return this.getValueFactory().createValue(((java.util.Date) propValue).getTime());		
 	}
 
 

Modified: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/RepositoryUtilTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/RepositoryUtilTest.java?rev=353840&r1=353839&r2=353840&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/RepositoryUtilTest.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/RepositoryUtilTest.java
Sun Dec  4 02:12:10 2005
@@ -16,10 +16,12 @@
  */
 package org.apache.portals.graffito.jcr.repository;
 
+import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;
 import javax.jcr.Repository;
 import javax.jcr.Session;
 import javax.jcr.nodetype.NodeTypeManager;
+import javax.transaction.UserTransaction;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -27,6 +29,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.transaction.jackrabbit.UserTransactionImpl;
 
 /** Testcase for RepositoryUtil.
  * 
@@ -178,4 +181,52 @@
          assertTrue("Incorrect encoded path", encodedPath.equals("/files/test/_x0031_2aa/b/_x0033_4/rrr/_x0031_.0"));
 
     }
+    
+    public void testUserTransaction()
+    {
+    	try
+		{
+			Repository repository = RepositoryUtil.getRepository("repositoryTest");
+			assertNotNull("The repository is null", repository);
+			Session session = RepositoryUtil.login(repository, "superuser",
+					"superuser");
+
+			UserTransaction utx = new UserTransactionImpl(session);
+
+			// start transaction
+			utx.begin();
+
+			// add node and save
+			Node root = session.getRootNode();
+			Node n = root.addNode("test");
+			root.save();
+			utx.commit();
+			
+			assertTrue("test node doesn't exist", session.itemExists("/test"));
+			
+			utx = new UserTransactionImpl(session);
+			utx.begin();
+			Node test = (Node) session.getItem("/test");
+			test.remove();
+			session.save();
+			utx.rollback();
+			
+			assertTrue("test node doesn't exist", session.itemExists("/test"));			
+
+			utx = new UserTransactionImpl(session);
+			utx.begin();
+			test = (Node) session.getItem("/test");
+			test.remove();
+			session.save();
+			utx.commit();
+			
+			assertFalse("test node exists", session.itemExists("/test"));			
+			
+		}
+		catch (Exception e)
+		{
+
+		}
+    }
+    
 }



Mime
View raw message