--- jakarta-slide\src\webdav\client\src\org\apache\webdav\lib\WebdavResource.java	Mon May 21 10:38:42 2001
+++ jakarta-slide\src\webdav\client\src\org\apache\webdav\lib\WebdavResource.java	Fri Jun 08 14:59:09 2001
@@ -91,6 +91,7 @@
 import org.apache.webdav.lib.methods.*;
 import org.apache.webdav.lib.properties.ResourceTypeProperty;
 import org.apache.webdav.lib.properties.LockDiscoveryProperty;
+import org.apache.webdav.lib.properties.AclProperty;
 
 /**
  * The class <code>WebdavResource</code> is an abstract representation
@@ -195,6 +196,7 @@
  * </pre>
  *
  * @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a>
+ * @author Dirk Verbeeck
  */
 public class WebdavResource extends WebdavSession {
 
@@ -1863,6 +1865,65 @@
 
     // --------------------------------- WebDAV Request-method Public Methods
 
+    public boolean aclMethod(String path,Ace[] aces) throws HttpException, IOException
+    {
+        setClient();
+        
+        AclMethod method = new AclMethod(path);
+        for (int i=0; i<aces.length ; i++) 
+        {
+            Ace ace=aces[i];
+            method.addAce(ace);
+        }
+        method.setDebug(debug);
+        client.executeMethod( method );
+
+        int statusCode = method.getStatusCode();
+        setStatusCode(statusCode);
+        return (statusCode >= 200 && statusCode < 300) ? true : false;
+    }
+    
+    public AclProperty aclfindMethod(String path) throws HttpException, IOException
+    {
+        setClient();
+        
+        AclProperty acl=null;
+
+        Vector properties = new Vector();
+        properties.addElement("acl");
+        
+        // Default depth=0, type=by_name
+        PropFindMethod method =
+            new PropFindMethod(HttpURL.getPath(path), DepthSupport.DEPTH_0,properties.elements());
+        method.setDebug(debug);
+        client.executeMethod(method);
+
+        Enumeration responses = method.getResponses();
+        if (responses.hasMoreElements()) {
+            ResponseEntity response =
+                (ResponseEntity) responses.nextElement();
+            String href = (String) response.getHref();
+
+            // Set status code for this resource.
+            if ((thisResource == true) && (response.getStatusCode() > 0))
+                setStatusCode(response.getStatusCode());
+            thisResource = false;
+
+            Enumeration responseProperties =
+                method.getResponseProperties(href);
+            while (responseProperties.hasMoreElements()) {
+                Property property =
+                    (Property) responseProperties.nextElement();
+                if (property instanceof AclProperty) 
+                {
+                    acl=(AclProperty)property;
+                }
+
+            }
+        }
+
+        return acl;
+    }
 
     /*
      * Get InputStream for the GET method.
