jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r424227 - in /jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr: property/ValuesProperty.java search/SearchResultProperty.java
Date Fri, 21 Jul 2006 08:26:07 GMT
Author: tripod
Date: Fri Jul 21 01:26:07 2006
New Revision: 424227

URL: http://svn.apache.org/viewvc?rev=424227&view=rev
Log:
replacing deprecated calls

Modified:
    jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
    jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java

Modified: jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java?rev=424227&r1=424226&r2=424227&view=diff
==============================================================================
--- jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
(original)
+++ jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
Fri Jul 21 01:26:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.webdav.jcr.property;
 
+import org.apache.jackrabbit.value.ValueFactoryImpl;
 import org.apache.jackrabbit.value.ValueHelper;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavServletResponse;
@@ -144,7 +145,7 @@
         String typeStr = DomUtil.getAttribute(valueElement, ATTR_VALUE_TYPE, ItemResourceConstants.NAMESPACE);
         int type = (typeStr == null) ? defaultType : PropertyType.valueFromName(typeStr);
         // deserialize value ->> see #toXml where values are serialized
-        return ValueHelper.deserialize(value, type, true);
+        return ValueHelper.deserialize(value, type, true, ValueFactoryImpl.getInstance());
     }
 
     /**
@@ -158,7 +159,7 @@
         checkPropertyName(JCR_VALUES);
         Value[] vs = new Value[jcrValues.length];
         for (int i = 0; i < jcrValues.length; i++) {
-            vs[i] = ValueHelper.convert(jcrValues[i], propertyType);
+            vs[i] = ValueHelper.convert(jcrValues[i], propertyType, ValueFactoryImpl.getInstance());
         }
         return jcrValues;
     }
@@ -166,7 +167,7 @@
     /**
      * Returns the internal property value as jcr <code>Value</code> array
      * 
-     * @return
+     * @return the internal property value as jcr <code>Value</code> array
      */
     public Value[] getJcrValues() throws ValueFormatException {
         checkPropertyName(JCR_VALUES);
@@ -181,7 +182,9 @@
      */
     public Value getJcrValue(int propertyType) throws ValueFormatException {
         checkPropertyName(JCR_VALUE);
-        return (jcrValues.length == 0) ? null : ValueHelper.convert(jcrValues[0], propertyType);
+        return (jcrValues.length == 0)
+                ? null
+                : ValueHelper.convert(jcrValues[0], propertyType, ValueFactoryImpl.getInstance());
     }
 
     /**
@@ -219,7 +222,7 @@
     /**
      *
      * @param document
-     * @return
+     * @return the xml element
      */
     public Element toXml(Document document) {
         Element elem = getName().toXml(document);

Modified: jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java?rev=424227&r1=424226&r2=424227&view=diff
==============================================================================
--- jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
(original)
+++ jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
Fri Jul 21 01:26:07 2006
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.webdav.jcr.search;
 
 import org.apache.jackrabbit.value.ValueHelper;
+import org.apache.jackrabbit.value.ValueFactoryImpl;
 import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
 import org.apache.jackrabbit.webdav.property.AbstractDavProperty;
 import org.apache.jackrabbit.webdav.property.DavProperty;
@@ -108,7 +109,8 @@
         Element valueElement = DomUtil.getChildElement(columnElement, JCR_VALUE.getName(),
JCR_VALUE.getNamespace());
         if (valueElement != null) {
             String typeStr = DomUtil.getAttribute(valueElement, ATTR_VALUE_TYPE, ItemResourceConstants.NAMESPACE);
-            jcrValue = ValueHelper.deserialize(DomUtil.getText(valueElement), PropertyType.valueFromName(typeStr),
true);
+            jcrValue = ValueHelper.deserialize(DomUtil.getText(valueElement),
+                    PropertyType.valueFromName(typeStr), true, ValueFactoryImpl.getInstance());
         } else {
             jcrValue = null;
         }



Mime
View raw message