jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r555086 - in /jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement: ./ src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/ src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/ src/main/java/org/apache/jac...
Date Tue, 10 Jul 2007 21:34:04 GMT
Author: clombart
Date: Tue Jul 10 14:34:03 2007
New Revision: 555086

URL: http://svn.apache.org/viewvc?view=rev&rev=555086
Log:
patch for issue JCR-998 provided by Carlos Sanchez ( annotation support - still in progress)

Modified:
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/pom.xml
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/BaseNodeManagementException.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/JackrabbitRepositorySession.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/pom.xml?view=diff&rev=555086&r1=555085&r2=555086
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/pom.xml (original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/pom.xml Tue Jul 10
14:34:03 2007
@@ -26,9 +26,12 @@
 	<!-- ====================================================================== -->
 	<!-- P R O J E C T  D E S C R I P T I O N                                   -->
 	<!-- ====================================================================== -->
+    <parent>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit</artifactId>
+      <version>1.4-SNAPSHOT</version>
+    </parent>
 	<artifactId>jackrabbit-ocm-nodemanagement</artifactId>
-	<groupId>org.apache.jackrabbit</groupId>
-	<version>1.0-SNAPSHOT</version>
 	<packaging>jar</packaging>
 	<name>Jackrabbit OCM Node management</name>
 	<description>
@@ -49,7 +52,7 @@
 		<dependency>
 			<groupId>org.apache.jackrabbit</groupId>
 			<artifactId>jackrabbit-ocm</artifactId>
-			<version>1.0-SNAPSHOT</version>
+			<version>1.4-SNAPSHOT</version>
 		</dependency>
 
 		<!-- Test -->
@@ -87,10 +90,21 @@
 				<configuration>
 					<excludes>
 						<exclude>**/TestBase.java</exclude>
-
 					</excludes>
 				</configuration>
 			</plugin>
+			<plugin>
+				<inherited>true</inherited>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>			
 		</plugins>
 	</build>
 </project>

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/BaseNodeManagementException.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/BaseNodeManagementException.java?view=diff&rev=555086&r1=555085&r2=555086
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/BaseNodeManagementException.java
(original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/exception/BaseNodeManagementException.java
Tue Jul 10 14:34:03 2007
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.ocm.nodemanagement.exception;
 
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
 /** Base exception for all JCR Node Type Management exceptions.
  *
  * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
@@ -64,5 +67,31 @@
     public void setWrappedException(Exception object)
     {
         this.wrappedException = object;
+    }
+
+    public void printStackTrace( PrintStream ps )
+    {
+        if ( getWrappedException() == null || getWrappedException() == this )
+        {
+            super.printStackTrace( ps );
+        }
+        else
+        {
+            ps.println( this );
+            getWrappedException().printStackTrace( ps );
+        }
+    }
+
+    public void printStackTrace( PrintWriter pw )
+    {
+        if ( getWrappedException() == null || getWrappedException() == this )
+        {
+            super.printStackTrace( pw );
+        }
+        else
+        {
+            pw.println( this );
+            getWrappedException().printStackTrace( pw );
+        }
     }
 }

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/JackrabbitRepositorySession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/JackrabbitRepositorySession.java?view=diff&rev=555086&r1=555085&r2=555086
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/JackrabbitRepositorySession.java
(original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/JackrabbitRepositorySession.java
Tue Jul 10 14:34:03 2007
@@ -48,6 +48,8 @@
         Repository repository =
                 RepositoryUtil.getRepository(configuration.getRepositoryName());
         
-        return RepositoryUtil.login(repository, username, password);
+        Session session =  RepositoryUtil.login(repository, username, password);
+        RepositoryUtil.setupSession(session);
+        return session; 
     }
 }

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java?view=diff&rev=555086&r1=555085&r2=555086
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/main/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
Tue Jul 10 14:34:03 2007
@@ -355,7 +355,8 @@
         node.setAutoCreated(field.isJcrAutoCreated());
         node.setMandatory(field.isJcrMandatory());
         node.setAllowsSameNameSiblings(field.isJcrSameNameSiblings());
-
+        node.setDefaultPrimaryType( getNamespaceHelper().getQName( field.getDefaultPrimaryType()
) );
+        
         if (field.getJcrOnParentVersion() != null
             && field.getJcrOnParentVersion().length() > 0) {
             node.setOnParentVersion(OnParentVersionAction.valueFromName(field.getJcrOnParentVersion()));

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java?view=diff&rev=555086&r1=555085&r2=555086
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java
(original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-nodemanagement/src/test/java/org/apache/jackrabbit/ocm/nodemanagement/impl/jackrabbit/NodeTypeManagerImplTest.java
Tue Jul 10 14:34:03 2007
@@ -106,7 +106,7 @@
         field1.setJcrType("String");
         field1.setJcrAutoCreated(true);
         field1.setJcrMandatory(true);
-        field1.setJcrMultiple(true);
+        field1.setJcrMultiple(true);        
         classDescriptor.addFieldDescriptor(field1);
 
         FieldDescriptor field2 = new FieldDescriptor();



Mime
View raw message