jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r385540 [3/3] - in /incubator/jackrabbit/trunk/jcr-server: server/src/java/org/apache/jackrabbit/server/jcr/ server/src/java/org/apache/jackrabbit/webdav/jcr/ server/src/java/org/apache/jackrabbit/webdav/jcr/observation/ server/src/java/org...
Date Mon, 13 Mar 2006 13:07:07 GMT
Modified: incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java?rev=385540&r1=385539&r2=385540&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java
(original)
+++ incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java
Mon Mar 13 05:07:02 2006
@@ -23,7 +23,6 @@
 import org.apache.jackrabbit.webdav.MultiStatus;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.version.DeltaVConstants;
-import org.apache.jackrabbit.webdav.version.DeltaVResource;
 import org.apache.jackrabbit.webdav.version.VersionControlledResource;
 import org.apache.jackrabbit.webdav.version.VersionHistoryResource;
 import org.apache.jackrabbit.webdav.xml.DomUtil;
@@ -52,7 +51,7 @@
 
     private ReportInfo info;
     private HashSet vhHrefSet = new HashSet();
-    private DeltaVResource resource;
+    private DavResource resource;
 
     /**
      *
@@ -64,13 +63,13 @@
     }
 
     /**
-     * @see Report#init(org.apache.jackrabbit.webdav.version.DeltaVResource, ReportInfo)

+     * @see Report#init(DavResource, ReportInfo)
      */
-    public void init(DeltaVResource resource, ReportInfo info) throws DavException {
+    public void init(DavResource resource, ReportInfo info) throws DavException {
         if (resource == null || !(resource instanceof VersionControlledResource)) {
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "DAV:version-tree report
can only be created for version-controlled resources and version resources.");
         }
-            this.resource = resource;
+        this.resource = resource;
         setInfo(info);
     }
 
@@ -90,14 +89,14 @@
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "The DAV:locate-by-history
element must contain a DAV:version-history-set child.");
         }
         ElementIterator it = DomUtil.getChildren(versionHistorySet, DavConstants.XML_HREF,
DavConstants.NAMESPACE);
-            while (it.hasNext()) {
+        while (it.hasNext()) {
             String href = DomUtil.getText(it.nextElement());
             if (href != null && !"".equals(href)) {
-                    vhHrefSet.add(href);
-                }
+                vhHrefSet.add(href);
             }
-        this.info = info;
         }
+        this.info = info;
+    }
 
     /**
      * Always returns <code>true</code>.
@@ -119,7 +118,7 @@
      */
     public Element toXml(Document document) {
         return getMultiStatus().toXml(document);
-        }
+    }
 
     /**
      * Retrieve the <code>MultiStatus</code> that is returned in response to
a locate-by-history

Modified: incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/Report.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/Report.java?rev=385540&r1=385539&r2=385540&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/Report.java
(original)
+++ incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/Report.java
Mon Mar 13 05:07:02 2006
@@ -18,6 +18,7 @@
 import org.apache.jackrabbit.webdav.xml.XmlSerializable;
 import org.apache.jackrabbit.webdav.version.DeltaVResource;
 import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavResource;
 
 /**
  * The <code>Report</code> interface defines METHODS needed in order to respond
@@ -56,5 +57,5 @@
      * @param info
      * @throws DavException
      */
-    public void init(DeltaVResource resource, ReportInfo info) throws DavException;
+    public void init(DavResource resource, ReportInfo info) throws DavException;
 }

Modified: incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java?rev=385540&r1=385539&r2=385540&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java
(original)
+++ incubator/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java
Mon Mar 13 05:07:02 2006
@@ -18,7 +18,6 @@
 import org.apache.log4j.Logger;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
 import org.apache.jackrabbit.webdav.version.DeltaVConstants;
-import org.apache.jackrabbit.webdav.version.DeltaVResource;
 import org.apache.jackrabbit.webdav.version.VersionControlledResource;
 import org.apache.jackrabbit.webdav.version.VersionResource;
 import org.apache.jackrabbit.webdav.DavException;
@@ -40,7 +39,7 @@
     private static Logger log = Logger.getLogger(VersionTreeReport.class);
 
     private ReportInfo info;
-    private DeltaVResource resource;
+    private DavResource resource;
 
     /**
      * Returns {@link ReportType#VERSION_TREE}
@@ -68,9 +67,9 @@
      * @param resource
      * @param info
      * @throws org.apache.jackrabbit.webdav.DavException
-     * @see Report#init(org.apache.jackrabbit.webdav.version.DeltaVResource, ReportInfo)
+     * @see Report#init(DavResource, ReportInfo)
      */
-    public void init(DeltaVResource resource, ReportInfo info) throws DavException {
+    public void init(DavResource resource, ReportInfo info) throws DavException {
         setResource(resource);
         setInfo(info);
     }
@@ -80,9 +79,9 @@
      *
      * @param resource
      * @throws DavException if the given resource is neither
-     * {@link org.apache.jackrabbit.webdav.version.VersionControlledResource} nor {@link
org.apache.jackrabbit.webdav.version.VersionResource}.
+     * {@link VersionControlledResource} nor {@link VersionResource}.
      */
-    private void setResource(DeltaVResource resource) throws DavException {
+    private void setResource(DavResource resource) throws DavException {
         if (resource != null && (resource instanceof VersionControlledResource ||
resource instanceof VersionResource)) {
             this.resource = resource;
         } else {
@@ -144,13 +143,13 @@
     private void buildResponse(DavResource res, DavPropertyNameSet propNameSet,
                                int depth, MultiStatus ms) {
         try {
-        VersionResource[] versions = getVersions(res);
-        for (int i = 0; i < versions.length; i++) {
-            if (propNameSet.isEmpty()) {
-                ms.addResourceStatus(versions[i], DavServletResponse.SC_OK, 0);
-            } else {
-                ms.addResourceProperties(versions[i], propNameSet, 0);
-            }
+            VersionResource[] versions = getVersions(res);
+            for (int i = 0; i < versions.length; i++) {
+                if (propNameSet.isEmpty()) {
+                    ms.addResourceStatus(versions[i], DavServletResponse.SC_OK, 0);
+                } else {
+                    ms.addResourceProperties(versions[i], propNameSet, 0);
+                }
             }
         } catch (DavException e) {
             log.error(e);



Mime
View raw message