jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r425080 - in /jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav: PropertyInfoImpl.java QueryInfoImpl.java RepositoryServiceImpl.java
Date Mon, 24 Jul 2006 14:54:03 GMT
Author: angela
Date: Mon Jul 24 07:54:03 2006
New Revision: 425080

URL: http://svn.apache.org/viewvc?rev=425080&view=rev
Log:
remove usage of ValueFactoryImpl introduced with rev.424227 in order to
get rid of deprecated calls -> pass ValueFactory instead

Modified:
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java?rev=425080&r1=425079&r2=425080&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
Mon Jul 24 07:54:03 2006
@@ -33,6 +33,7 @@
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
+import javax.jcr.ValueFactory;
 import java.io.InputStream;
 import java.io.ByteArrayInputStream;
 import java.io.UnsupportedEncodingException;
@@ -50,7 +51,10 @@
     private boolean isMultiValued;
     private Object[] values;
 
-    public PropertyInfoImpl(MultiStatusResponse response, URIResolver uriResolver, NamespaceResolver
nsResolver, SessionInfo sessionInfo) throws RepositoryException, DavException {
+    public PropertyInfoImpl(MultiStatusResponse response, URIResolver uriResolver,
+                            NamespaceResolver nsResolver, SessionInfo sessionInfo,
+                            ValueFactory valueFactory)
+        throws RepositoryException, DavException {
         super(response, uriResolver, sessionInfo);
 
         id = uriResolver.getPropertyId(getParentId(), response);
@@ -61,8 +65,8 @@
 
         if (propSet.contains(ItemResourceConstants.JCR_VALUE)) {
             // TODO: jcr-server sends jcr values not qualified
-            ValuesProperty vp = new ValuesProperty(propSet.get(ItemResourceConstants.JCR_VALUE),
type);
-            Value jcrValue = vp.getJcrValue(type);
+            ValuesProperty vp = new ValuesProperty(propSet.get(ItemResourceConstants.JCR_VALUE),
type, valueFactory);
+            Value jcrValue = vp.getJcrValue(type, valueFactory);
             if (type == PropertyType.BINARY) {
                 values = (jcrValue == null) ?  new InputStream[0] : new InputStream[] {jcrValue.getStream()};
             } else {
@@ -71,8 +75,8 @@
             }
         } else {
             isMultiValued = true;
-            ValuesProperty vp = new ValuesProperty(propSet.get(ItemResourceConstants.JCR_VALUES),
type);
-            Value[] jcrValues = vp.getJcrValues(type);
+            ValuesProperty vp = new ValuesProperty(propSet.get(ItemResourceConstants.JCR_VALUES),
type, valueFactory);
+            Value[] jcrValues = vp.getJcrValues(type, valueFactory);
             if (type == PropertyType.BINARY) {
                 values = new InputStream[jcrValues.length];
                 for (int i = 0; i < jcrValues.length; i++) {

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java?rev=425080&r1=425079&r2=425080&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
Mon Jul 24 07:54:03 2006
@@ -39,6 +39,7 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.PropertyType;
+import javax.jcr.ValueFactory;
 import java.io.InputStream;
 import java.util.Iterator;
 import java.util.AbstractCollection;
@@ -60,9 +61,13 @@
 
     private final QName[] columnNames;
     private final NamespaceResolver nsResolver;
+    private final ValueFactory valueFactory;
 
-    public QueryInfoImpl(MultiStatus ms, SessionInfo sessionInfo, URIResolver uriResolver,
NamespaceResolver nsResolver) throws RepositoryException {
+    public QueryInfoImpl(MultiStatus ms, SessionInfo sessionInfo, URIResolver uriResolver,
+                         NamespaceResolver nsResolver, ValueFactory valueFactory)
+        throws RepositoryException {
         this.nsResolver = nsResolver;
+        this.valueFactory = valueFactory;
 
         String responseDescription = ms.getResponseDescription();
         if (responseDescription != null) {
@@ -87,7 +92,7 @@
             DavPropertySet okSet = response.getProperties(DavServletResponse.SC_OK);
 
             DavProperty davProp = okSet.get(SearchResultProperty.SEARCH_RESULT_PROPERTY);
-            SearchResultProperty resultProp = new SearchResultProperty(davProp);
+            SearchResultProperty resultProp = new SearchResultProperty(davProp, valueFactory);
 
             NodeId nodeId = uriResolver.getNodeId(href, sessionInfo);
             this.results.put(nodeId, resultProp);

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=425080&r1=425079&r2=425080&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Mon Jul 24 07:54:03 2006
@@ -664,7 +664,8 @@
                 throw new ItemNotFoundException("Unable to retrieve the property with id
" + propertyId);
             }
 
-            PropertyInfo pInfo = new PropertyInfoImpl(responses[0], getURIResolver(), getNamespaceResolver(),
sessionInfo);
+            PropertyInfo pInfo = new PropertyInfoImpl(responses[0],
+                getURIResolver(), getNamespaceResolver(), sessionInfo, valueFactory);
             return pInfo;
         } catch (IOException e) {
             throw new RepositoryException(e);
@@ -1229,7 +1230,8 @@
             method.checkSuccess();
 
             MultiStatus ms = method.getResponseBodyAsMultiStatus();
-            return new QueryInfoImpl(ms, sessionInfo, getURIResolver(), getNamespaceResolver());
+            return new QueryInfoImpl(ms, sessionInfo, getURIResolver(),
+                getNamespaceResolver(), valueFactory);
         } catch (IOException e) {
             throw new RepositoryException(e);
         } catch (DavException e) {



Mime
View raw message