juergen     2002/12/17 02:31:31

  Modified:    src/webdav/client/src/org/apache/webdav/lib/properties
                        AclProperty.java
  Log:
  organise import section: UrlUtil is not available any more in httpClient
  
  Revision  Changes    Path
  1.10      +18 -25    
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java
  
  Index: AclProperty.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AclProperty.java  16 Dec 2002 15:17:30 -0000      1.9
  +++ AclProperty.java  17 Dec 2002 10:31:31 -0000      1.10
  @@ -63,22 +63,15 @@
   
   package org.apache.webdav.lib.properties;
   
  -import java.util.Enumeration;
   import java.util.ArrayList;
  -
  -import org.w3c.dom.Element;
  -import org.w3c.dom.NodeList;
  -import org.w3c.dom.Node;
  -
   import org.apache.util.DOMUtils;
   import org.apache.util.URLUtil;
  -
  -import org.apache.commons.httpclient.URIUtil;
  -
   import org.apache.webdav.lib.Ace;
   import org.apache.webdav.lib.BaseProperty;
   import org.apache.webdav.lib.Privilege;
   import org.apache.webdav.lib.ResponseEntity;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.NodeList;
   
   /**
    * This interface models the <code>&lt;D:acl&gt;</code> property, which is
  @@ -116,7 +109,7 @@
   
       /**
        * Returns the Aces present in this acl property.
  -     * 
  +     *
        * @return Ace[] An ace array or null when there is no ace.
        */
       public Ace[] getAces() {
  @@ -156,24 +149,24 @@
               System.err.println("element: " + element);
               return null;
           }
  -        
  +
           Element href = DOMUtils.getFirstElement(child, "DAV:", "href");
  -        if (href!=null) 
  +        if (href!=null)
           {
               principal = URLUtil.URLDecode(DOMUtils.getTextValue(href));
           }
   
           String[] types={"all","authenticated","unauthenticated","property","self"};
  -        for (int i=0 ; i<types.length && principal==null ; i++)        
  +        for (int i=0 ; i<types.length && principal==null ; i++)
           {
               Element type = DOMUtils.getFirstElement(child, "DAV:", types[i]);
  -            if (type!=null) 
  +            if (type!=null)
               {
                   principal=types[i];
               }
           }
   
  -        if (principal==null) 
  +        if (principal==null)
           {
               System.err.println("Error: unknown type of principal");
               System.err.println("element: " + element);
  @@ -208,20 +201,20 @@
                   ace.setInherited(true);
                   ace.setInheritedFrom(DOMUtils.getTextValue(href));
               }
  -            else 
  +            else
               {
                   System.err.println("Error: mandatory element <href> is missing !");
                   return null;
               }
           }
  -        
  +
           child = DOMUtils.getFirstElement(element, "DAV:", "protected");
           if (child != null) {
               ace.setProtected(true);
           }
  -        
  +
           return ace;
  -        
  +
       }
   
   
  @@ -235,10 +228,10 @@
   
       public String getPropertyAsString() {
           Ace[] aces = getAces();
  -        
  +
           if ((aces==null) || (aces.length==0))
               return "";
  -        
  +
           StringBuffer tmp = new StringBuffer(aces[0].toString());
           for (int i=1; i<aces.length ; i++) {
               tmp.append(", ");
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to