jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1002639 [3/3] - in /jackrabbit/trunk: jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/ser...
Date Wed, 29 Sep 2010 14:11:54 GMT
Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/ValueLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/ValueLoader.java?rev=1002639&r1=1002638&r2=1002639&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/ValueLoader.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/ValueLoader.java
Wed Sep 29 14:11:53 2010
@@ -19,14 +19,15 @@ package org.apache.jackrabbit.spi2davex;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.HeadMethod;
+import org.apache.jackrabbit.commons.webdav.JcrRemotingConstants;
 import org.apache.jackrabbit.spi2dav.ExceptionConverter;
+import org.apache.jackrabbit.spi2dav.ItemResourceConstants;
 import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.MultiStatusResponse;
 import org.apache.jackrabbit.webdav.client.methods.DavMethodBase;
 import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
-import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.property.DavPropertySet;
@@ -86,7 +87,7 @@ class ValueLoader {
 
     int loadType(String uri) throws RepositoryException, IOException {
         DavPropertyNameSet nameSet = new DavPropertyNameSet();
-        nameSet.add(ItemResourceConstants.JCR_TYPE);
+        nameSet.add(JcrRemotingConstants.JCR_TYPE_LN, ItemResourceConstants.NAMESPACE);
 
         DavMethodBase method = null;
         try {
@@ -97,7 +98,7 @@ class ValueLoader {
             MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
             if (responses.length == 1) {
                 DavPropertySet props = responses[0].getProperties(DavServletResponse.SC_OK);
-                DavProperty<?> type = props.get(ItemResourceConstants.JCR_TYPE);
+                DavProperty<?> type = props.get(JcrRemotingConstants.JCR_TYPE_LN, ItemResourceConstants.NAMESPACE);
                 if (type != null) {
                     return PropertyType.valueFromName(type.getValue().toString());
                 } else {

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/observation/DefaultEventType.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/observation/DefaultEventType.java?rev=1002639&r1=1002638&r2=1002639&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/observation/DefaultEventType.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/observation/DefaultEventType.java
Wed Sep 29 14:11:53 2010
@@ -75,6 +75,22 @@ public class DefaultEventType implements
     }
 
     /**
+     * Factory method to create an array of new <code>EventType</code> for the
+     * specified localNames and the specified namespace.
+     *
+     * @param localNames
+     * @param namespace
+     * @return An array of event types.
+     */
+    public static EventType[] create(String[] localNames, Namespace namespace) {
+        EventType[] types = new EventType[localNames.length];
+        for (int i = 0; i < localNames.length; i++) {
+            types[i] = create(localNames[i], namespace);
+        }
+        return types;
+    }
+
+    /**
      * Retrieves one or multiple <code>EventType</code>s from the 'eventtype'
      * Xml element. While a subscription may register multiple types (thus
      * the 'eventtype' contains multiple child elements), a single event may only

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/DavPropertyNameSet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/DavPropertyNameSet.java?rev=1002639&r1=1002638&r2=1002639&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/DavPropertyNameSet.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/DavPropertyNameSet.java
Wed Sep 29 14:11:53 2010
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.webdav.pro
 
 import org.apache.jackrabbit.webdav.xml.DomUtil;
 import org.apache.jackrabbit.webdav.xml.ElementIterator;
+import org.apache.jackrabbit.webdav.xml.Namespace;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
@@ -85,6 +86,18 @@ public class DavPropertyNameSet extends 
     }
 
     /**
+     * Creates a DavPropertyName from the given parameters and add it to this set.
+     *
+     * @param localName
+     * @param namespace
+     * @return <tt>true</tt> if the set did not already contain the specified
+     * property name.
+     */
+    public boolean add(String localName, Namespace namespace) {
+        return set.add(DavPropertyName.create(localName, namespace));
+    }
+
+    /**
      * Add the property names contained in the specified set to this set.
      *
      * @param propertyNames

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java?rev=1002639&r1=1002638&r2=1002639&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java
Wed Sep 29 14:11:53 2010
@@ -76,8 +76,30 @@ public class ReportInfo implements XmlSe
      * @param propertyNames
      */
     public ReportInfo(ReportType type, int depth, DavPropertyNameSet propertyNames) {
-        this.typeLocalName = type.getLocalName();
-        this.typeNamespace = type.getNamespace();
+        this(type.getLocalName(), type.getNamespace(), depth, propertyNames);
+    }
+
+    /**
+     * Create a new <code>ReportInfo</code>
+     * 
+     * @param typeLocalName
+     * @param typeNamespace
+     */
+    public ReportInfo(String typeLocalName, Namespace typeNamespace) {
+        this(typeLocalName, typeNamespace, DavConstants.DEPTH_0, null);
+    }
+
+    /**
+     * Create a new <code>ReportInfo</code>
+     * 
+     * @param typelocalName
+     * @param typeNamespace
+     * @param depth
+     * @param propertyNames
+     */
+    public ReportInfo(String typelocalName, Namespace typeNamespace, int depth, DavPropertyNameSet
propertyNames) {
+        this.typeLocalName = typelocalName;
+        this.typeNamespace = typeNamespace;
         this.depth = depth;
         if (propertyNames != null) {
             this.propertyNames = new DavPropertyNameSet(propertyNames);



Mime
View raw message