You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Ingo Brunberg <ib...@fiz-chemie.de> on 2003/02/10 13:52:27 UTC

WebdavResource and LabelMethod

Hi,

is there any reason why WebdavResource should not have a
labelMethod()-method, where you can give select an arbitrary path, on
which to execute the LabelMethod?
This would be analogous to nearly all the other WebDAV methods in
WebdavResource and I guess it is just an oversight.
It is no big change, so I have prepared a patch. Please apply.

Regards,
Ingo

Index: src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java
===================================================================
RCS file: /home/cvspublic/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v
retrieving revision 1.55
diff -u -r1.55 WebdavResource.java
--- src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java	7 Feb 2003 14:58:57 -0000	1.55
+++ src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java	10 Feb 2003 12:41:22 -0000
@@ -2613,6 +2613,15 @@
     public boolean labelMethod(String labelname, int type)
         throws HttpException, IOException
     {
+        return labelMethod(httpURL.getPath(), labelname, type);
+    }
+
+    /**
+     * Execute a LABEL method on the given path, setting the given label
+     */
+    public boolean labelMethod(String path, String labelname, int type)
+        throws HttpException, IOException
+    {
         int labeltype=0;
 
         switch(type) {
@@ -2628,8 +2637,7 @@
         }
 
         setClient();
-        LabelMethod method = new LabelMethod(httpURL.getPath(), labeltype,
-                labelname);
+        LabelMethod method = new LabelMethod(path, labeltype, labelname);
 
         int statusCode = client.executeMethod(method);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org