jericho 01/04/10 03:54:35
Modified: src/webdav/client/src/org/apache/webdav/util
WebdavResource.java
Log:
- Fix to set newly fresh properties after changing resource and property for this
class.
Revision Changes Path
1.33 +49 -15
jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java
Index: WebdavResource.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- WebdavResource.java 2001/04/07 21:28:57 1.32
+++ WebdavResource.java 2001/04/10 10:54:32 1.33
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
1.32 2001/04/07 21:28:57 jericho Exp $
- * $Revision: 1.32 $
- * $Date: 2001/04/07 21:28:57 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
1.33 2001/04/10 10:54:32 jericho Exp $
+ * $Revision: 1.33 $
+ * $Date: 2001/04/10 10:54:32 $
*
* ====================================================================
*
@@ -1404,7 +1404,10 @@
public boolean putMethod(String data)
throws WebdavException, IOException {
- return putMethod(httpURL.getPath(), data);
+ boolean result = putMethod(httpURL.getPath(), data);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1444,7 +1447,10 @@
public boolean putMethod(File file)
throws WebdavException, IOException {
- return putMethod(httpURL.getPath(), file);
+ boolean result = putMethod(httpURL.getPath(), file);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1724,7 +1730,7 @@
// It contains the results.
Vector results = new Vector();
HttpURL httpURL = new HttpURL(this.httpURL.getAuthority() + path);
- String href = httpURL.toURL().toString();
+ String href = httpURL.getHttpURLExceptForUserInfo().toString();
Enumeration enum = method.getResponseProperties(href);
while (enum.hasMoreElements()) {
Property property = (Property) enum.nextElement();
@@ -1757,8 +1763,11 @@
public boolean proppatchMethod(String propertyName, String propertyValue)
throws WebdavException, IOException {
- return proppatchMethod
+ boolean result = proppatchMethod
(httpURL.getPath(), propertyName, propertyValue);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1793,7 +1802,10 @@
public boolean proppatchMethod(Hashtable property)
throws WebdavException, IOException {
- return proppatchMethod(httpURL.getPath(), property);
+ boolean result = proppatchMethod(httpURL.getPath(), property);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1886,7 +1898,10 @@
public boolean deleteMethod()
throws WebdavException, IOException {
- return deleteMethod(httpURL.getPath());
+ boolean result = deleteMethod(httpURL.getPath());
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1924,7 +1939,11 @@
public boolean moveMethod(String destination)
throws WebdavException, IOException {
- return moveMethod(httpURL.getPath(), HttpURL.getPath(destination));
+ boolean result = moveMethod(httpURL.getPath(),
+ HttpURL.getPath(destination));
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -1966,7 +1985,10 @@
public boolean copyMethod(String destination)
throws WebdavException, IOException {
- return copyMethod(HttpURL.getPath(destination));
+ boolean result = copyMethod(HttpURL.getPath(destination));
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -2007,7 +2029,10 @@
public boolean mkcolMethod()
throws WebdavException, IOException {
- return mkcolMethod(httpURL.getPath());
+ boolean result = mkcolMethod(httpURL.getPath());
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -2055,7 +2080,10 @@
owner = defaultOwner + "@" + httpURL.getHost();
}
- return lockMethod(httpURL.getPath(), owner, (short) 120);
+ boolean result = lockMethod(httpURL.getPath(), owner, (short) 120);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -2072,7 +2100,10 @@
public boolean lockMethod(String owner, short timeout)
throws WebdavException, IOException {
- return lockMethod(httpURL.getPath(), owner, (short) 120);
+ boolean result = lockMethod(httpURL.getPath(), owner, (short) 120);
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}
@@ -2149,7 +2180,10 @@
public boolean unlockMethod()
throws WebdavException, IOException {
- return unlockMethod(httpURL.getPath());
+ boolean result = unlockMethod(httpURL.getPath());
+ if (result)
+ setAllProp(httpURL, DepthSupport.DEPTH_0);
+ return result;
}