jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r615649 [7/14] - in /jackrabbit/trunk: jackrabbit-classloader/src/main/java/org/apache/jackrabbit/classloader/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ jackra...
Date Sun, 27 Jan 2008 21:08:36 GMT
Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/PathTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/PathTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/PathTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/PathTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -26,29 +26,29 @@
 import org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter;
 
 /**
- * 
- *  Name Type Converter 
- * 
+ *
+ *  Name Type Converter
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public class PathTypeConverterImpl implements AtomicTypeConverter
 {
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
 	{
-		try 
+		try
 		{
-			if (propValue == null) 
+			if (propValue == null)
 			{
 				return null;
 			}
 			return valueFactory.createValue((String) propValue, PropertyType.PATH);
-		} 
-		catch (RepositoryException e) 
+		}
+		catch (RepositoryException e)
 		{
 			throw new IncorrectAtomicTypeException("Impossible to convert the value into a path property : " + propValue.toString() + ". Check if it is a valid path.", e);
 		}
@@ -56,7 +56,7 @@
 	}
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
      */
 	public Object getObject(Value value)
@@ -73,7 +73,7 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/ReferenceTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/ReferenceTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/ReferenceTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/ReferenceTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -26,30 +26,30 @@
 import org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter;
 
 /**
- * 
- *  Reference Type Converter(java string attribute into a JCR property based on the REFERENCE type) 
- * 
- * 
+ *
+ *  Reference Type Converter(java string attribute into a JCR property based on the REFERENCE type)
+ *
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public class ReferenceTypeConverterImpl implements AtomicTypeConverter
 {
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
 	{
-		try 
+		try
 		{
-			if (propValue == null) 
+			if (propValue == null)
 			{
 				return null;
 			}
 			return valueFactory.createValue((String) propValue, PropertyType.REFERENCE);
-		} 
-		catch (RepositoryException e) 
+		}
+		catch (RepositoryException e)
 		{
 			throw new IncorrectAtomicTypeException("Impossible to convert the value into a reference property :  " + propValue.toString() + ". Check if it is a correct uuid", e);
 		}
@@ -57,7 +57,7 @@
 	}
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
      */
 	public Object getObject(Value value)
@@ -74,7 +74,7 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/StringTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/StringTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/StringTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/StringTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -25,16 +25,16 @@
 import org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter;
 
 /**
- * 
- * String Type Converter 
- * 
+ *
+ * String Type Converter
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
 public class StringTypeConverterImpl implements AtomicTypeConverter
 {
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
@@ -47,7 +47,7 @@
 	}
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
      */
 	public Object getObject(Value value)
@@ -64,7 +64,7 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/TimestampTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/TimestampTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/TimestampTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/TimestampTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -27,16 +27,16 @@
 import org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter;
 
 /**
- * 
+ *
  * Timestamp Type Converter
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
 public class TimestampTypeConverterImpl implements AtomicTypeConverter
 {
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
@@ -48,7 +48,7 @@
 	}
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
      */
 	public Object getObject(Value value)
@@ -65,7 +65,7 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UndefinedTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UndefinedTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UndefinedTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UndefinedTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -31,16 +31,16 @@
 import org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter;
 
 /**
- * 
- * String Type Converter 
- * 
+ *
+ * String Type Converter
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
 public class UndefinedTypeConverterImpl implements AtomicTypeConverter
 {
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
@@ -50,68 +50,68 @@
 		  {
 			return null;
 		  }
-		  
+		
           if (propValue.getClass() == String.class)
           {
-        	  return valueFactory.createValue((String) propValue);  
+        	  return valueFactory.createValue((String) propValue);
           }
 
           if (propValue.getClass() == InputStream.class)
           {
-        	  return valueFactory.createValue((InputStream) propValue);  
+        	  return valueFactory.createValue((InputStream) propValue);
           }
-	        
+	
           if ((propValue.getClass() == Long.class) ||(propValue.getClass() == Integer.class))
           {
-        	  return valueFactory.createValue(((Number) propValue).longValue());  
+        	  return valueFactory.createValue(((Number) propValue).longValue());
           }
 
           if (propValue.getClass() == Double.class )
           {
-        	  return valueFactory.createValue(((Double) propValue).doubleValue());  
+        	  return valueFactory.createValue(((Double) propValue).doubleValue());
           }
 
           if (propValue.getClass() == Boolean.class )
           {
-        	  return valueFactory.createValue(((Boolean) propValue).booleanValue());  
+        	  return valueFactory.createValue(((Boolean) propValue).booleanValue());
           }
 
           if (propValue.getClass() == Calendar.class )
           {
-        	  
-        	  return valueFactory.createValue((Calendar) propValue);  
+        	
+        	  return valueFactory.createValue((Calendar) propValue);
           }
 
           if (propValue.getClass() == GregorianCalendar.class )
           {
-        	  return valueFactory.createValue((GregorianCalendar) propValue);  
+        	  return valueFactory.createValue((GregorianCalendar) propValue);
           }
-          
+
           if (propValue.getClass() == GregorianCalendar.class )
           {
-        	  return valueFactory.createValue((GregorianCalendar) propValue);  
+        	  return valueFactory.createValue((GregorianCalendar) propValue);
           }
-          
+
           if (propValue.getClass() == Date.class )
           {
         	  Calendar calendar = Calendar.getInstance();
         	  calendar.setTime((Date) propValue);
-        	  return valueFactory.createValue(calendar);  
+        	  return valueFactory.createValue(calendar);
           }
 
           if (propValue.getClass() == Date.class )
           {
         	  Calendar calendar = Calendar.getInstance();
         	  calendar.setTime((Date) propValue);
-        	  return valueFactory.createValue(calendar);  
+        	  return valueFactory.createValue(calendar);
           }
-          
+
           throw new IncorrectAtomicTypeException("Impossible to convert the value - property type not found");
 		
 	}
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
      */
 	public Object getObject(Value value)
@@ -175,7 +175,7 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UtilDateTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UtilDateTypeConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UtilDateTypeConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/atomictypeconverter/impl/UtilDateTypeConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -29,7 +29,7 @@
 
 /**
  * Util Date Converter
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
@@ -37,7 +37,7 @@
 {
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
 	 */
 	public Value getValue(ValueFactory valueFactory, Object propValue)
@@ -53,7 +53,7 @@
 
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
 	 */
 	public Object getObject(Value value)
@@ -71,12 +71,12 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
 	 */
 	public String getXPathQueryValue(ValueFactory valueFactory, Object object)
 	{
-		try 
+		try
 		{
 			Calendar calendar =  Calendar.getInstance();
 			
@@ -84,8 +84,8 @@
 
 			return "xs:dateTime('" + valueFactory.createValue(calendar).getString() + "')";
 
-		} 
-		catch (RepositoryException e) 
+		}
+		catch (RepositoryException e)
 		{
 			throw new IncorrectAtomicTypeException("Impossible to get the sting value ", e);
 		}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanConverter.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanConverter.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/BeanConverter.java Sun Jan 27 13:08:08 2008
@@ -28,7 +28,7 @@
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 
 /**
- * Interface describing a custom bean converter. 
+ * Interface describing a custom bean converter.
  *
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
@@ -43,9 +43,9 @@
      * @param beanDescriptor The bean descriptor
      * @param beanClassDescriptor the Class Descriptor associated to the bean to insert
      * @param bean the bean to convert( insert into the JCR structure)
-     * @param parentClassDescriptor The Class Descriptor associated to the parent object 
-     * @param parent the object which will contain the bean to convert 
-     * 
+     * @param parentClassDescriptor The Class Descriptor associated to the parent object
+     * @param parent the object which will contain the bean to convert
+     *
      * @throws ObjectContentManagerException thrown in case the insert fails; marks a failure due to logic of
      *  the insert (parent node cannot be accessed, the insert fails, etc.)
      * @throws RepositoryException thrown in case the underlying repository has thrown a
@@ -65,8 +65,8 @@
      * @param beanClassDescriptor the Class Descriptor associated to the bean to update
      * @param bean the bean to convert( insert into the JCR structure)
      * @param parentClassDescriptor The Class Descriptor associated to the parent object
-     * @param parent the object which will contain the bean to convert 
-     * 
+     * @param parent the object which will contain the bean to convert
+     *
      * @throws ObjectContentManagerException thrown in case the update fails; marks a failure due to logic
      *  of update (parent node cannot be accessed, the update fails, etc.)
      * @throws RepositoryException thrown in case the underlying repository has thrown a
@@ -76,40 +76,40 @@
      */
     void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object bean, ClassDescriptor parentClassDescriptor, Object parent)
     throws ObjectContentManagerException, RepositoryException, JcrMappingException;
-    
+
     /**
      * Retrieve a bean from the repository.
-     * 
+     *
      * @param session the JCR session
      * @param parentNode The parent node
      * @param beanDescriptor The bean descriptor
      * @param beanClassDescriptor the Class Descriptor associated to the bean to insert
      * @param beanClass The bean Class
      * @param parent The parent which contain the bean to retrieve
-     * 
-     * @throws ObjectContentManagerException thrown in case the bean cannot be retrieved or initialized; 
+     *
+     * @throws ObjectContentManagerException thrown in case the bean cannot be retrieved or initialized;
      *  marks a failure due to logic of retrieval
      * @throws RepositoryException thrown in case the underlying repository has thrown a
      *  <code>javax.jcr.RepositoryException</code> that is not possible to be handled or
      *  wrapped in ObjectContentManagerException; marks a repository failure
      * @throws JcrMappingException throws in case the mapping of the bean is not correct
      */
-    Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent) 
+    Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
     throws ObjectContentManagerException, RepositoryException, JcrMappingException;
 
 
     /**
      * Remove the bean from the repository.
-     * 
+     *
      * @param session the JCR session
      * @param parentNode The node which will contain the converter bean
-     * @param beanDescriptor The bean descriptor    
+     * @param beanDescriptor The bean descriptor
      * @param beanClassDescriptor the Class Descriptor associated to the bean to update
      * @param bean the bean to convert( insert into the JCR structure)
-     * @param parentClassDescriptor The Class Descriptor associated to the parent object 
-     * @param parent the object which contains the bean to convert 
-     * 
-     * @throws ObjectContentManagerException thrown in case the bean cannot be removed; 
+     * @param parentClassDescriptor The Class Descriptor associated to the parent object
+     * @param parent the object which contains the bean to convert
+     *
+     * @throws ObjectContentManagerException thrown in case the bean cannot be removed;
      *  marks a failure due to logic of removal
      * @throws RepositoryException thrown in case the underlying repository has thrown a
      *  <code>javax.jcr.RepositoryException</code> that is not possible to be handled or
@@ -118,26 +118,26 @@
      */
     void remove(Session session, Node parentNode,  BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object bean, ClassDescriptor parentClassDescriptor, Object parent)
     throws ObjectContentManagerException, RepositoryException, JcrMappingException;
-    
+
     /**
-     * Get the bean path. 
-     * 
+     * Get the bean path.
+     *
      * When the bean is mapped to a subnode, the bean path is the parent node path + the jcrname of the current bean.
-     * Sometime a BeanConverter can be used to access to a bean which is not mapped to a subnode. In this case, 
+     * Sometime a BeanConverter can be used to access to a bean which is not mapped to a subnode. In this case,
      * another implementation can be provided in this method getPath. {@link  ParentBeanConverterImpl} is a good example.
-     * 
-     * @param session the JCR session 
+     *
+     * @param session the JCR session
      * @param beanDescriptor The descriptor of the bean to convert
      * @param parentNode the node which contain this bean (its corresponfing subnode)
      * @return the bean path
-     * 
+     *
      * @throws RepositoryException thrown in case the underlying repository has thrown a
      *  <code>javax.jcr.RepositoryException</code> that is not possible to be handled or
      *  wrapped in ObjectContentManagerException; marks a repository failure
-     * 
+     *
      */
     String getPath(Session session, BeanDescriptor beanDescriptor, Node parentNode)
     throws ObjectContentManagerException;
-    
+
 
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/AbstractBeanConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/AbstractBeanConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/AbstractBeanConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/AbstractBeanConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -30,9 +30,9 @@
 import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 /**
- * 
+ *
  * Abstract Bean Converter Class
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
@@ -50,9 +50,9 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * Default implementation for many BeanConverter. This method can be overridden in specific BeanConverter
-	 * 
+	 *
 	 */
     public String getPath(Session session, BeanDescriptor beanDescriptor, Node parentNode)
            throws ObjectContentManagerException

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/DefaultBeanConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/DefaultBeanConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/DefaultBeanConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/DefaultBeanConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -31,10 +31,10 @@
 import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 /**
- * 
+ *
  * Default Bean Converter
- * 
- * 
+ *
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
@@ -42,50 +42,50 @@
 
 	private final static Log log = LogFactory.getLog(DefaultBeanConverterImpl.class);
 	
-	public DefaultBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider) 
+	public DefaultBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
 	{
 		super(mapper, objectConverter, atomicTypeConverterProvider);	
 	}
 
 	public void insert(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-			throws ObjectContentManagerException, RepositoryException, 	JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException, 	JcrMappingException
 	{
 		objectConverter.insert(session, parentNode, beanDescriptor.getJcrName(), object);
 	}
 
 	public void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-			throws ObjectContentManagerException, RepositoryException,	JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException,	JcrMappingException
 	{
-		try 
+		try
 		{
-			String jcrNodeName = beanDescriptor.getJcrName(); 
+			String jcrNodeName = beanDescriptor.getJcrName();
 			if (parentNode.hasNode(jcrNodeName))
 			{		
 			   objectConverter.update(session, parentNode, beanDescriptor.getJcrName() , object);
 			}
-			else 
+			else
 			{
 			   objectConverter.insert(session, parentNode, beanDescriptor.getJcrName() , object);
 			}
-		} 
-		catch (javax.jcr.RepositoryException e) 
+		}
+		catch (javax.jcr.RepositoryException e)
 		{
 			throw new RepositoryException(e);	
 		}
 	}
 
 	public Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
-			throws ObjectContentManagerException, RepositoryException,JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException,JcrMappingException
 	{
         return objectConverter.getObject(session, beanClass, this.getPath(session, beanDescriptor, parentNode));
 		
 	}
 
 	public void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-	          throws ObjectContentManagerException,	RepositoryException, JcrMappingException 
+	          throws ObjectContentManagerException,	RepositoryException, JcrMappingException
 	{
 		try {
-			if (parentNode.hasNode(beanDescriptor.getJcrName())) 
+			if (parentNode.hasNode(beanDescriptor.getJcrName()))
 			{
 				parentNode.getNode(beanDescriptor.getJcrName()).remove();
 			}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/InlineBeanConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/InlineBeanConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/InlineBeanConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/InlineBeanConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -30,18 +30,18 @@
 import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 /**
- * 
+ *
  * Bean converter used to map some node properties into one nested bean field.
  * The corresponding bean field is not associated to a subnode.
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
 public class InlineBeanConverterImpl extends AbstractBeanConverterImpl  implements BeanConverter {
 
-	SimpleFieldsHelper simpleFieldsHelper; 
+	SimpleFieldsHelper simpleFieldsHelper;
 	
-	public InlineBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider) 
+	public InlineBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
 	{
 		super(mapper, objectConverter, atomicTypeConverterProvider);
 		this.simpleFieldsHelper = new SimpleFieldsHelper(atomicTypeConverterProvider);
@@ -62,7 +62,7 @@
 			throws ObjectContentManagerException, RepositoryException,JcrMappingException {
 		
 		return simpleFieldsHelper.retrieveSimpleFields(session, beanClassDescriptor, parentNode, bean);
- 
+
 	}
 
 	public void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ParentBeanConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ParentBeanConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ParentBeanConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ParentBeanConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -31,11 +31,11 @@
 import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
 import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
 /**
- * 
- * Bean converter used to access to the parent object. 
- * the mixin type referenceable is not mandatory for the node matching to the parent object. 
- * 
- * 
+ *
+ * Bean converter used to access to the parent object.
+ * the mixin type referenceable is not mandatory for the node matching to the parent object.
+ *
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
@@ -43,7 +43,7 @@
 
 	private final static Log log = LogFactory.getLog(ParentBeanConverterImpl.class);
 	
-	public ParentBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider) 
+	public ParentBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
 	{
 		super(mapper, objectConverter, atomicTypeConverterProvider);	
 	}
@@ -58,7 +58,7 @@
 
 	public Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
 			throws ObjectContentManagerException, RepositoryException,JcrMappingException {
-        try 
+        try
         {			
 			Node grandParentNode = parentNode.getParent();
 			if (grandParentNode.getPath().equals("/"))
@@ -67,11 +67,11 @@
 			}
 			return objectConverter.getObject(session, grandParentNode.getPath());
 			
-		} 
-        catch (javax.jcr.RepositoryException e) 
+		}
+        catch (javax.jcr.RepositoryException e)
 		{
 			throw new RepositoryException(e);
-		} 
+		}
 		
 	}
 
@@ -81,14 +81,14 @@
 	}
 	
 	/**
-	 * 
+	 *
 	 * Default implementation for many BeanConverter. This method can be overridden in specific BeanConverter
-	 * 
+	 *
 	 */
     public String getPath(Session session, BeanDescriptor beanDescriptor, Node parentNode)
                 throws ObjectContentManagerException
     {		
-		 try 
+		 try
 		 {
 			if (parentNode != null)
 		    {
@@ -97,10 +97,10 @@
 			}
 			else
 			{
-			    return null; 
+			    return null;
 			}
-		} 
-		catch (javax.jcr.RepositoryException e) 
+		}
+		catch (javax.jcr.RepositoryException e)
 		{
 			throw new RepositoryException(e);
 		}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ReferenceBeanConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ReferenceBeanConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ReferenceBeanConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/beanconverter/impl/ReferenceBeanConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -35,11 +35,11 @@
 import org.apache.jackrabbit.ocm.mapper.model.FieldDescriptor;
 import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;
 /**
- * 
- * Map a bean attribute into a reference jcr property. It is not possible to update direclty the referenced bean. 
+ *
+ * Map a bean attribute into a reference jcr property. It is not possible to update direclty the referenced bean.
  * Only the corresponding uuid can be updated in the main object. The modifications on the referenced bean attributes are ignored
- * 
- * 
+ *
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
  *
  */
@@ -47,26 +47,26 @@
 
 	private final static Log log = LogFactory.getLog(ReferenceBeanConverterImpl.class);
 	
-	public ReferenceBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider) 
+	public ReferenceBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
 	{
 		super(mapper, objectConverter, atomicTypeConverterProvider);	
 	}
 
 	public void insert(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-			throws ObjectContentManagerException, RepositoryException, 	JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException, 	JcrMappingException
 	{
-		updateReferenceProperty(parentNode, beanDescriptor, beanClassDescriptor, object); 
+		updateReferenceProperty(parentNode, beanDescriptor, beanClassDescriptor, object);
 		
 	}
 
 	public void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-			throws ObjectContentManagerException, RepositoryException,	JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException,	JcrMappingException
 	{
 		updateReferenceProperty(parentNode, beanDescriptor, beanClassDescriptor, object);
 	}
 
 	public Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
-			throws ObjectContentManagerException, RepositoryException,JcrMappingException 
+			throws ObjectContentManagerException, RepositoryException,JcrMappingException
 	{
         try {
 			String uuid = parentNode.getProperty(beanDescriptor.getJcrName()).getString();
@@ -81,7 +81,7 @@
 	}
 
 	public void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
-	          throws ObjectContentManagerException,	RepositoryException, JcrMappingException 
+	          throws ObjectContentManagerException,	RepositoryException, JcrMappingException
 	{
 		updateReferenceProperty(parentNode, beanDescriptor, beanClassDescriptor, null);	
 	}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/ObjectCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/ObjectCache.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/ObjectCache.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/ObjectCache.java Sun Jan 27 13:08:08 2008
@@ -20,15 +20,15 @@
 
 /**
  *
- *  
- * Interface use for an object cache.  
- * 
+ *
+ * Interface use for an object cache.
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
- * 
+ *
  */
 public interface ObjectCache
 {
-    
+
 	void cache(String path, Object object);
 	
 	void clear();

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/impl/RequestObjectCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/impl/RequestObjectCacheImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/impl/RequestObjectCacheImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/cache/impl/RequestObjectCacheImpl.java Sun Jan 27 13:08:08 2008
@@ -25,21 +25,21 @@
 *
 * This is a simple cache implementation that can be used per retrieve requests.
 * This avoids to load duplicated object instance.
-* 
+*
 * @author <a href="mailto:christophe.lombart@gmail.com">Lombart Christophe </a>
-* 
+*
 */
-public class RequestObjectCacheImpl implements ObjectCache 
+public class RequestObjectCacheImpl implements ObjectCache
 {
 
 	private Map alreadyCachedObjects = new HashMap();
 	
-	public void cache(String path, Object object) 
+	public void cache(String path, Object object)
 	{		
 		alreadyCachedObjects.put(path, object);
 	}
 	
-	public void clear() 
+	public void clear()
 	{
 		alreadyCachedObjects.clear();
 	}

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/CollectionConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/CollectionConverter.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/CollectionConverter.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/CollectionConverter.java Sun Jan 27 13:08:08 2008
@@ -24,65 +24,65 @@
 
 /**
  * Convert any kind of {@link ManageableCollection} into severals JCR nodes.
- * 
+ *
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
- * 
+ *
  */
 public interface CollectionConverter
 {
 
 	/**
 	 * Insert/convert collection elements into some JCR nodes
-	 * @param session The JCR session 
+	 * @param session The JCR session
 	 * @param parentNode the node which will contains the collection element
 	 * @param collectionDescriptor The collection descriptor
 	 * @param collection the collection to insert
-	 * 
+	 *
 	 * @throws ObjectContentManagerException when it is not possible to insert the collection
-	 * 
+	 *
 	 */
-	public void insertCollection(Session session, Node parentNode, 
+	public void insertCollection(Session session, Node parentNode,
 			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws ObjectContentManagerException;
 
 	/**
 	 * Update collection elements already present in the JCR repository
-	 * @param session The JCR session 
+	 * @param session The JCR session
 	 * @param parentNode the node which will contains the collection element
 	 * @param collectionDescriptor The collection descriptor
 	 * @param collection the collection to update
-	 * 
+	 *
 	 * @throws ObjectContentManagerException when it is not possible to update the collection
 	 */
-	public void updateCollection(Session session, Node parentNode, 
+	public void updateCollection(Session session, Node parentNode,
 			                     CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws ObjectContentManagerException;
 
 	/**
-	 * Get a {@link ManageableCollection} from the JCR repository 
-	 * @param session The JCR session 
+	 * Get a {@link ManageableCollection} from the JCR repository
+	 * @param session The JCR session
 	 * @param parentNode the node which contains the collection element
 	 * @param collectionDescriptor The collection descriptor
-	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
+	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..)
 	 * @return The collection populates with all elements found in the JCR repository
-	 * 
-	 * @throws ObjectContentManagerException when it is not possible to retrieve the collection 
+	 *
+	 * @throws ObjectContentManagerException when it is not possible to retrieve the collection
 	 */
-	public ManageableCollection getCollection(Session session, Node parentNode, 
+	public ManageableCollection getCollection(Session session, Node parentNode,
 			                                  CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws ObjectContentManagerException;
 
 	
 	/**
 	 * Check if the collection is null. This method is mainly used in the Proxy manager to return a null value or a proxy object
-	 * Without proxy proxy, this method is never called. 
-	 * 
-	 * @param session The JCR session 
+	 * Without proxy proxy, this method is never called.
+	 *
+	 * @param session The JCR session
 	 * @param parentNode the node which contains the collection element
 	 * @param collectionDescriptor The collection descriptor
-	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..) 
+	 * @param collectionFieldClass The collection class to used (ArrayList, Vector, ..)
 	 * @return true if the collection contains elements.
-	 * 
-	 * 
-	 * @throws ObjectContentManagerException when it is not possible to retrieve the collection 
+	 *
+	 *
+	 * @throws ObjectContentManagerException when it is not possible to retrieve the collection
 	 */	
-	public boolean isNull(Session session, Node parentNode, 
+	public boolean isNull(Session session, Node parentNode,
                                       CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws ObjectContentManagerException;
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollection.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollection.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollection.java Sun Jan 27 13:08:08 2008
@@ -18,12 +18,12 @@
 
 import java.util.Iterator;
 
-/** 
+/**
  * Common interface used to persist any kind of Collection or Map.
- * 
+ *
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public interface ManageableCollection
 {
@@ -32,16 +32,16 @@
      * @param object the object to add
      */
 	public void addObject(Object object);
-   
+
 	/**
 	 * @return The ManageableCollection iterator
 	 */
     public Iterator getIterator();
-    
-    /** 
+
+    /**
      * @return The ManageableCollection size
      */
     public int getSize();
-    
-    
+
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollectionUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollectionUtil.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollectionUtil.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/ManageableCollectionUtil.java Sun Jan 27 13:08:08 2008
@@ -74,7 +74,7 @@
             if (collectionClass.equals(HashSet.class)) {
                 return new ManageableSet();
             }
-            
+
             if (collectionClass.equals(Collection.class) || collectionClass.equals(List.class)) {
                 return new ManageableArrayList();
             }
@@ -82,7 +82,7 @@
             if (collectionClass.equals(Set.class)) {
                 return new ManageableSet();
             }
-            
+
             Object collection = collectionClass.newInstance();
             if (!(collection instanceof ManageableCollection)) {
                 throw new JcrMappingException("Unsupported collection type :"
@@ -134,7 +134,7 @@
             if (object.getClass().equals(HashSet.class)) {
                 return new ManageableSet((Set) object);
             }
-            
+
             if (object.getClass().equals(Collection.class)
                 || object.getClass().equals(List.class)) {
                 ManageableArrayList manageableArrayList = new ManageableArrayList();
@@ -149,7 +149,7 @@
         catch (Exception e) {
             throw new JcrMappingException("Impossible to create the manageable collection", e);
         }
-        
+
         throw new JcrMappingException("Unsupported collection type :" + object.getClass().getName());
     }
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/AbstractCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/AbstractCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/AbstractCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/AbstractCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -35,9 +35,9 @@
 import org.apache.jackrabbit.ocm.mapper.Mapper;
 import org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor;
 
-/** 
+/**
  * Abstract class used for all CollectionConverter
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
@@ -48,7 +48,7 @@
 
 	/**
 	 * Constructor
-	 * 
+	 *
 	 * @param atomicTypeConverters The atomic type converter to used
 	 * @param objectConverter The object converter to used
 	 * @param mapper The mapper to used

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/BeanReferenceCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/BeanReferenceCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/BeanReferenceCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/BeanReferenceCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -49,7 +49,7 @@
  * Only the uuid can be modified, not the associated object
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public class BeanReferenceCollectionConverterImpl extends AbstractCollectionConverterImpl {
 
@@ -85,7 +85,7 @@
     protected void doUpdateCollection(Session session,
                                  Node parentNode,
                                  CollectionDescriptor collectionDescriptor,
-                                 ManageableCollection collection) throws RepositoryException 
+                                 ManageableCollection collection) throws RepositoryException
     {
         String jcrName = getCollectionJcrName(collectionDescriptor);
 
@@ -97,7 +97,7 @@
         if (collection == null) {
             return;
         }
-        
+
         addUuidProperties(session, parentNode, collectionDescriptor, collection);
 
     }
@@ -118,7 +118,7 @@
             Value[] values = property.getValues();
 
             ManageableCollection collection = ManageableCollectionUtil.getManageableCollection(collectionFieldClass);
-           
+
             for (int i = 0; i < values.length; i++) {
                 String uuid = values[i].getString();
                 String path = session.getNodeByUUID(uuid).getPath();    			
@@ -134,16 +134,16 @@
                   + "for class " + collectionDescriptor.getClassDescriptor().getClassName(), e);
         }
     }
-    
+
     /**
      * @see AbstractCollectionConverterImpl#doIsNull(Session, Node, CollectionDescriptor, Class)
      */
-    protected boolean doIsNull(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws RepositoryException 
+    protected boolean doIsNull(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws RepositoryException
     {
         String jcrName = getCollectionJcrName(collectionDescriptor);
         return ! parentNode.hasProperty(jcrName);
     }
-    
+
 	private void addUuidProperties(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws UnsupportedRepositoryOperationException, RepositoryException, VersionException, LockException, ConstraintViolationException {
 		try {
             if (collection == null) {
@@ -156,12 +156,12 @@
             Iterator collectionIterator = collection.getIterator();
             for (int i = 0; i < collection.getSize(); i++) {
                 Object object = collectionIterator.next();
-				if (object != null) 
+				if (object != null)
 				{
 					ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(object.getClass());
 
 					FieldDescriptor fieldDescriptor = classDescriptor.getUuidFieldDescriptor();
-					if (fieldDescriptor == null) 
+					if (fieldDescriptor == null)
 					{
 						throw new JcrMappingException("The bean doesn't have an uuid - classdescriptor : "
 										              + classDescriptor.getClassName());
@@ -175,11 +175,11 @@
             parentNode.setProperty(jcrName, values);
         }
         catch(Exception e) {
-            throw new ObjectContentManagerException("Cannot insert collection field : " 
+            throw new ObjectContentManagerException("Cannot insert collection field : "
                     + collectionDescriptor.getFieldName()
                     + " of class "
                     + collectionDescriptor.getClassDescriptor().getClassName(), e);
         }
 	}
-    
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/DefaultCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/DefaultCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/DefaultCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/DefaultCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -105,10 +105,10 @@
         }
 
         Node collectionNode = parentNode.addNode(jcrName);
-        
-        ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); 
 
-        Iterator collectionIterator = collection.getIterator();        
+        ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
+
+        Iterator collectionIterator = collection.getIterator();
         while (collectionIterator.hasNext()) {
             Object item = collectionIterator.next();
             String elementJcrName = null;
@@ -119,7 +119,7 @@
                                                            .getFieldName();
                 elementJcrName = ReflectionUtils.getNestedProperty(item, idFieldName).toString();
             }
-            else {                
+            else {
                 elementJcrName = COLLECTION_ELEMENT_NAME;
             }
 
@@ -135,29 +135,29 @@
                                  Node parentNode,
                                  CollectionDescriptor collectionDescriptor,
                                  ManageableCollection collection) throws RepositoryException {
-        
+
     	String jcrName = getCollectionJcrName(collectionDescriptor);
     	boolean hasNode = parentNode.hasNode(jcrName);
         // If the new value for the collection is null, drop the node matching to the collection
     	if (collection == null)
         {
-            if (hasNode) 
+            if (hasNode)
             {
                 parentNode.getNode(jcrName).remove();
             }
             return;
         }
 
-    	// If there is not yet a node matching to the collection, insert the collection 
+    	// If there is not yet a node matching to the collection, insert the collection
     	if (! hasNode)
     	{
     		this.doInsertCollection(session, parentNode, collectionDescriptor, collection);
     		return;
     	}
-        
+
     	// update process
     	
-        ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));         
+        ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
         Node collectionNode = parentNode.getNode(jcrName);
         //  If the collection elements have not an id, it is not possible to find the matching JCR nodes => delete the complete collection
         if (!elementClassDescriptor.hasIdField()) {
@@ -228,7 +228,7 @@
         Node collectionNode = parentNode.getNode(jcrName);
         NodeIterator children = collectionNode.getNodes();
         Class elementClass = ReflectionUtils.forName(collectionDescriptor.getElementClassName());
-        
+
         while (children.hasNext()) {
             Node itemNode = children.nextNode();
             Object item = objectConverter.getObject(session, elementClass, itemNode.getPath());
@@ -237,7 +237,7 @@
 
         return collection;
     }
-    
+
     /**
      * @see AbstractCollectionConverterImpl#doIsNull(Session, Node, CollectionDescriptor, Class)
      */
@@ -251,5 +251,5 @@
             return true;
         }
         return false;
-    }    
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableArrayList.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableArrayList.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableArrayList.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableArrayList.java Sun Jan 27 13:08:08 2008
@@ -21,28 +21,28 @@
 
 import org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection;
 
-/** 
+/**
  *
  * {@link ManageableCollection} ArrayList implementation
- * 
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public class ManageableArrayList extends ArrayList implements ManageableCollection
 {
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#addObject(java.lang.Object)
 	 */
     public void addObject(Object object)
     {
         this.add(object);
-     
+
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#getIterator()
      */
     public Iterator getIterator()
@@ -51,7 +51,7 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#getSize()
      */
 	public int getSize()
@@ -59,7 +59,7 @@
 		
 		return this.size();
 	}
-    
-    
+
+
 
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableSet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableSet.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableSet.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableSet.java Sun Jan 27 13:08:08 2008
@@ -24,16 +24,16 @@
 
 
 /**
- * This class/interface 
+ * This class/interface
  */
 public class ManageableSet extends HashSet implements ManageableCollection {
     public ManageableSet() {
     }
-    
+
     public ManageableSet(Collection collection) {
         super(collection);
     }
-    
+
     /**
      * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#addObject(java.lang.Object)
      */

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableVector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableVector.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableVector.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ManageableVector.java Sun Jan 27 13:08:08 2008
@@ -21,17 +21,17 @@
 
 import org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection;
 
-/** 
+/**
  *
- * {@link ManageableCollection} Vector implementation 
+ * {@link ManageableCollection} Vector implementation
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
- * 
+ *
  */
 public class ManageableVector extends Vector implements ManageableCollection
 {
 
 	/**
-	 * 
+	 *
 	 * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#addObject(java.lang.Object)
 	 */
     public void addObject(Object object)
@@ -40,16 +40,16 @@
     }
 
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#getIterator()
      */
     public Iterator getIterator()
     {
         return this.iterator();
     }
-    
+
     /**
-     * 
+     *
      * @see org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableCollection#getSize()
      */
 	public int getSize()
@@ -57,6 +57,6 @@
 		
 		return this.size();
 	}
-    
+
 
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/MultiValueCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/MultiValueCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/MultiValueCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/MultiValueCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -88,7 +88,7 @@
             parentNode.setProperty(jcrName, values);
         }
         catch(ValueFormatException vfe) {
-            throw new ObjectContentManagerException("Cannot insert collection field : " 
+            throw new ObjectContentManagerException("Cannot insert collection field : "
                     + collectionDescriptor.getFieldName()
                     + " of class "
                     + collectionDescriptor.getClassDescriptor().getClassName(), vfe);
@@ -118,7 +118,7 @@
         // Add all collection element into an Value array
         Value[] values = new Value[collection.getSize()];
         ValueFactory valueFactory = session.getValueFactory();
-        int i = 0; 
+        int i = 0;
         for (Iterator collectionIterator = collection.getIterator(); collectionIterator.hasNext(); i++) {
             Object fieldValue = collectionIterator.next();
             AtomicTypeConverter atomicTypeConverter = (AtomicTypeConverter) atomicTypeConverters
@@ -162,7 +162,7 @@
                   vfe);
         }
     }
-    
+
     /**
      * @see AbstractCollectionConverterImpl#doIsNull(Session, Node, CollectionDescriptor, Class)
      */
@@ -176,5 +176,5 @@
             return true;
         }
         return false;
-    }     
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/NTCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/NTCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/NTCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/NTCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -50,10 +50,10 @@
  * Collection Mapping/convertion based on node type.
  *
  * This collection mapping strategy maps the collection elements into subnodes based on the same node types.
- * 
- * There are 2 constraints in this collection converter : 
- * 1/ this is not possible to have 2 different collections in the main object which are used the same jcr node type for their elements. 
- * 2/ this is not possible to make a distinction between an empty collection and an null collection. 
+ *
+ * There are 2 constraints in this collection converter :
+ * 1/ this is not possible to have 2 different collections in the main object which are used the same jcr node type for their elements.
+ * 2/ this is not possible to make a distinction between an empty collection and an null collection.
  *
  *
  * If the collection element class contains an id (see the FieldDescriptor definition), this id value is used to build the collection element node name.
@@ -66,7 +66,7 @@
  *                ....
  *          /collection-element (node used to store the second collection element)
  *          ...
- *          
+ *
  *          Each "collection-element" nodes have the same jcr node type
  *
  * Example - with an id attribute:
@@ -76,7 +76,7 @@
  *                ....
  *          /anotherValue (id value assigned to the first element)
  *          ...
- *          
+ *
  *          Each collection element nodes have the same jcr node type
  *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
@@ -111,10 +111,10 @@
         if (collection == null) {
             return;
         }
-        
+
         ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
 
-        Iterator collectionIterator = collection.getIterator();        
+        Iterator collectionIterator = collection.getIterator();
         while (collectionIterator.hasNext()) {
             Object item = collectionIterator.next();
             String elementJcrName = null;
@@ -124,7 +124,7 @@
                 String idFieldName = elementClassDescriptor.getIdFieldDescriptor().getFieldName();
                 elementJcrName = ReflectionUtils.getNestedProperty(item, idFieldName).toString();
             }
-            else {                
+            else {
                 elementJcrName = COLLECTION_ELEMENT_NAME;
             }
 
@@ -140,7 +140,7 @@
                                       Node parentNode,
                                       CollectionDescriptor collectionDescriptor,
                                       ManageableCollection collection) throws RepositoryException {
-        
+
         ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass(
                 ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
 
@@ -158,7 +158,7 @@
         Map updatedItems = new HashMap();
         while (collectionIterator.hasNext()) {
             Object item = collectionIterator.next();
-        
+
             String elementJcrName = null;
 
             if (elementClassDescriptor.hasIdField()) {
@@ -183,14 +183,14 @@
         }
 
         // Delete JCR nodes that are not present in the collection
-         NodeIterator nodes = this.getCollectionNodes(session, parentNode, 
+         NodeIterator nodes = this.getCollectionNodes(session, parentNode,
         		                                              elementClassDescriptor.getJcrType());
          if (nodes != null && elementClassDescriptor.hasIdField()) {
-            
+
 
             while (nodes.hasNext()) {
                 Node child = (Node) nodes.next();
-                
+
                 if (!updatedItems.containsKey(child.getName())) {
                     child.remove();
                 }
@@ -205,16 +205,16 @@
                                                    Node parentNode,
                                                    CollectionDescriptor collectionDescriptor,
                                                    Class collectionFieldClass) throws RepositoryException {
-	    ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName())); 
+	    ClassDescriptor elementClassDescriptor = mapper.getClassDescriptorByClass( ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
         ManageableCollection collection = ManageableCollectionUtil.getManageableCollection(collectionFieldClass);
 
         NodeIterator nodes = this.getCollectionNodes(session, parentNode, elementClassDescriptor.getJcrType());
-        
+
         if (nodes == null || nodes.getSize() == 0)
         {
         	return null;
         }
-                
+
         while (nodes.hasNext()) {
             Node itemNode = (Node) nodes.next();
             log.debug("Collection node found : " + itemNode.getPath());
@@ -224,12 +224,12 @@
 
         return collection;
     }
-    
+
     /**
      * @see AbstractCollectionConverterImpl#doIsNull(Session, Node, CollectionDescriptor, Class)
-     * 
+     *
      * return true If the parent node doesn't contains node based on the node type associated to the collection elements
-     *  
+     *
      */
     protected boolean doIsNull(Session session,
                                               Node parentNode,
@@ -241,51 +241,51 @@
 		QueryResult queryResult = getQuery(session, parentNode, elementClassDescriptor.getJcrType());    	
     	return queryResult.getNodes().getSize() == 0;
     }
-        
+
     private NodeIterator getCollectionNodes(Session session, Node parentNode, String itemNodeType)
     throws PathNotFoundException, ValueFormatException, RepositoryException {
 
         List collectionNodes = null;
-        
+
         QueryResult queryResult = getQuery(session, parentNode, itemNodeType);
         return  queryResult.getNodes();
-        
+
     }
 
-    private void deleteCollectionItems(Session session, Node parentNode, String itemNodeType) 
-    throws VersionException, 
-           LockException, 
-           ConstraintViolationException, 
-           PathNotFoundException, 
-           ValueFormatException, 
+    private void deleteCollectionItems(Session session, Node parentNode, String itemNodeType)
+    throws VersionException,
+           LockException,
+           ConstraintViolationException,
+           PathNotFoundException,
+           ValueFormatException,
            RepositoryException
     {
         NodeIterator nodes = this.getCollectionNodes(session, parentNode, itemNodeType);
         if (nodes == null || nodes.getSize()==0) return;
-        
+
         while (nodes.hasNext()) {
             Node node = (Node) nodes.next();
             node.remove();
         }
     }
-    
-   
+
+
 	
 	private QueryResult getQuery(Session session, Node parentNode, String jcrNodeType) throws RepositoryException, InvalidQueryException {
     	String jcrExpression= "";    	
-    	if (!parentNode.getPath().startsWith("/jcr:system/jcr:versionStorage")) 
+    	if (!parentNode.getPath().startsWith("/jcr:system/jcr:versionStorage"))
     	{
-            jcrExpression = "SELECT * FROM " + jcrNodeType + " WHERE jcr:path LIKE '" + parentNode.getPath() 
+            jcrExpression = "SELECT * FROM " + jcrNodeType + " WHERE jcr:path LIKE '" + parentNode.getPath()
                                        + "/%' AND NOT jcr:path LIKE '" + parentNode.getPath() + "/%/%'";
     	}
     	else
     	{
     	
-    		jcrExpression = "SELECT * FROM nt:frozenNode" + " WHERE jcr:path LIKE '" + parentNode.getPath() + "/%'" 
+    		jcrExpression = "SELECT * FROM nt:frozenNode" + " WHERE jcr:path LIKE '" + parentNode.getPath() + "/%'"
     		                 + " AND NOT jcr:path LIKE '" + parentNode.getPath() + "/%/%'"
     		                 + " AND jcr:frozenPrimaryType = '" + jcrNodeType + "'";
 
-    		                
+    		
     	}
         Query jcrQuery = session.getWorkspace().getQueryManager().createQuery(jcrExpression, javax.jcr.query.Query.SQL);
         QueryResult queryResult = jcrQuery.execute();

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ReferenceCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ReferenceCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ReferenceCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ReferenceCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -43,8 +43,8 @@
 
 /**
  *
- * This collection mapping strategy maps a collection of String into a JCR multi value property based on the reference type 
- * 
+ * This collection mapping strategy maps a collection of String into a JCR multi value property based on the reference type
+ *
  * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
  */
 public class ReferenceCollectionConverterImpl extends AbstractCollectionConverterImpl {
@@ -112,7 +112,7 @@
 
             ManageableCollection collection = ManageableCollectionUtil.getManageableCollection(collectionFieldClass);
             for (int i = 0; i < values.length; i++) {
-                
+
                 collection.addObject(values[i].getString());
             }
 
@@ -125,7 +125,7 @@
                   vfe);
         }
     }
-    
+
     /**
      * @see AbstractCollectionConverterImpl#doIsNull(Session, Node, CollectionDescriptor, Class)
      */
@@ -140,7 +140,7 @@
         }
         return false;
     }
-    
+
 	private void addUuidProperties(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, ManageableCollection collection) throws UnsupportedRepositoryOperationException, RepositoryException, VersionException, LockException, ConstraintViolationException {
 		try {
             if (collection == null) {
@@ -154,17 +154,17 @@
             for (int i = 0; i < collection.getSize(); i++) {
                 String uuid = (String) collectionIterator.next();
                 values[i] = valueFactory.createValue(uuid, PropertyType.REFERENCE);
-                
+
             }
 
             parentNode.setProperty(jcrName, values);
         }
         catch(ValueFormatException vfe) {
-            throw new ObjectContentManagerException("Cannot insert collection field : " 
+            throw new ObjectContentManagerException("Cannot insert collection field : "
                     + collectionDescriptor.getFieldName()
                     + " of class "
                     + collectionDescriptor.getClassDescriptor().getClassName(), vfe);
         }
 	}
-    
+
 }

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualNodesCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualNodesCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualNodesCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualNodesCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -40,13 +40,13 @@
  * The <code>ResidualNodesCollectionConverterImpl</code> is a collection
  * converter for multiple child nodes accessed through Node.getNodes(String
  * pattern).
- * 
+ *
  * @author <a href="mailto:fmeschbe[at]apache[dot]com">Felix Meschberger</a>
  */
 public class ResidualNodesCollectionConverterImpl extends
         AbstractCollectionConverterImpl {
 
-    
+
     /**
      * Constructor
      *
@@ -67,10 +67,10 @@
         CollectionDescriptor collectionDescriptor,
         ManageableCollection collection) {
 
-        if (!(collection instanceof Map)) { 
+        if (!(collection instanceof Map)) {
             return;
         }
-        
+
         Map map = (Map) collection;
         for (Iterator ei=map.entrySet().iterator(); ei.hasNext(); ) {
             Map.Entry entry = (Map.Entry) ei.next();
@@ -134,7 +134,7 @@
     protected ManageableCollection doGetCollection(Session session,
         Node parentNode, CollectionDescriptor collectionDescriptor,
         Class collectionFieldClass) throws RepositoryException {
-        
+
         try {
             String jcrName = getCollectionJcrName(collectionDescriptor);
             NodeIterator ni = parentNode.getNodes(jcrName);

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualPropertiesCollectionConverterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualPropertiesCollectionConverterImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualPropertiesCollectionConverterImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/collectionconverter/impl/ResidualPropertiesCollectionConverterImpl.java Sun Jan 27 13:08:08 2008
@@ -48,7 +48,7 @@
  */
 public class ResidualPropertiesCollectionConverterImpl extends
         AbstractCollectionConverterImpl {
-    
+
     /**
      * Constructor
      *
@@ -176,13 +176,13 @@
             for (Iterator ei = map.entrySet().iterator(); ei.hasNext();) {
                 Map.Entry entry = (Map.Entry) ei.next();
                 String name = String.valueOf(entry.getKey());
-                
+
                 // verify the property is not an existing protected property
                 if (parentNode.hasProperty(name)
                     && parentNode.getProperty(name).getDefinition().isProtected()) {
                     continue;
                 }
-                
+
                 Object value = entry.getValue();
                 if (value instanceof List) {
                     // multi value
@@ -208,17 +208,17 @@
                 + collectionDescriptor.getClassDescriptor().getClassName(), vfe);
         }
     }
-    
+
     /**
      * Returns the AtomicTypeConverter for the element class of the described
      * collection. If no such converter can be found a ObjectContentManagerException
      * is thrown.
-     * 
+     *
      * @param collectionDescriptor The descriptor of the collection for whose
      *      elements an AtomicTypeConverter is requested.
-     *      
+     *
      * @return The AtomicTypeConverter for the elements of the collection
-     * 
+     *
      * @throws ObjectContentManagerException if no such type converter is registered
      */
     private AtomicTypeConverter getAtomicTypeConverter(CollectionDescriptor collectionDescriptor) {
@@ -228,7 +228,7 @@
         if (atc != null) {
             return atc;
         }
-        
+
         throw new ObjectContentManagerException(
             "Cannot get AtomicTypeConverter for element class "
                 + elementClassName + " of class "

Modified: jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/CustomNodeTypeCreatorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/CustomNodeTypeCreatorImpl.java?rev=615649&r1=615648&r2=615649&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/CustomNodeTypeCreatorImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-ocm/src/main/java/org/apache/jackrabbit/ocm/manager/impl/CustomNodeTypeCreatorImpl.java Sun Jan 27 13:08:08 2008
@@ -28,21 +28,21 @@
  * @version $Id: Exp $
  */
 public class CustomNodeTypeCreatorImpl implements CustomNodeTypeCreator {
-    
+
     /** Logger.
      */
-    private final static Log log = LogFactory.getLog(CustomNodeTypeCreatorImpl.class); 
-    
+    private final static Log log = LogFactory.getLog(CustomNodeTypeCreatorImpl.class);
+
     /** Session to the jcr repository.
      */
     private ObjectContentManagerImpl jcrSession;
-    
+
     /** Creates a new instance of CustomNodeTypeCreatorImpl. */
     public CustomNodeTypeCreatorImpl()
     {
     }
-    
-    /** Creates a new instance of CustomNodeTypeCreatorImpl with a jcr session. 
+
+    /** Creates a new instance of CustomNodeTypeCreatorImpl with a jcr session.
      * @param jcrSession JcrSession
      */
     public CustomNodeTypeCreatorImpl(ObjectContentManagerImpl jcrSession)
@@ -52,33 +52,33 @@
 
     /** This method is supposed to create custom node types on repository
      * setup.
-     * 
-     * @throws org.apache.jackrabbit.ocm.exception.CustomNodeTypeCreationException 
+     *
+     * @throws org.apache.jackrabbit.ocm.exception.CustomNodeTypeCreationException
      * @return true/false
      */
     public boolean createInitialJcrCustomNodeTypes() throws CustomNodeTypeCreationException
     {
-       
+
         // TODO
-        
+
         return true;
     }
 
     /** Method to add a jcr custom node type to an existing jcr repository.
-     * 
-     * @throws org.apache.jackrabbit.ocm.exception.CustomNodeTypeCreationException 
+     *
+     * @throws org.apache.jackrabbit.ocm.exception.CustomNodeTypeCreationException
      * @return true/false
      */
     public boolean addJcrCustomNodeType() throws CustomNodeTypeCreationException
     {
-        
+
         // TODO
-        
+
         return false;
     }
-    
+
     /** Setter for property jcrSession.
-     * 
+     *
      * @param jcrSession JcrSession
      */
     public void setJcrSession(ObjectContentManagerImpl jcrSession)
@@ -87,7 +87,7 @@
     }
 
     /** Getter for property jcrSession.
-     * 
+     *
      * @return jcrSession
      */
     public ObjectContentManager getJcrSession()



Mime
View raw message