jericho 01/03/26 03:09:26
Modified: src/webdav/client/src/org/apache/webdav/cmd Slide.java
Log:
- Fix a bug to print wrong information.
- Some method change reflected.
Revision Changes Path
1.12 +42 -44
jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java
Index: Slide.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Slide.java 2001/03/23 05:06:31 1.11
+++ Slide.java 2001/03/26 11:09:25 1.12
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v 1.11
2001/03/23 05:06:31 remm Exp $
- * $Revision: 1.11 $
- * $Date: 2001/03/23 05:06:31 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v 1.12
2001/03/26 11:09:25 jericho Exp $
+ * $Revision: 1.12 $
+ * $Date: 2001/03/26 11:09:25 $
*
* ====================================================================
*
@@ -103,7 +103,7 @@
/**
* The http URL on the client connection.
*/
- private HttpURL httpUrl;
+ private HttpURL httpURL;
/**
@@ -205,8 +205,8 @@
if (stringUrl != null) {
// Set up for processing WebDAV resources from command line.
try {
- httpUrl = new HttpURL(stringUrl);
- webdavResource = new WebdavResource(httpUrl);
+ httpURL = new HttpURL(stringUrl);
+ webdavResource = new WebdavResource(httpURL);
setPath(webdavResource.getPath());
} catch (WebdavException we) {
// Check authorization and try it again.
@@ -222,34 +222,34 @@
if (password != null)
password= password.trim();
try {
- httpUrl.setUserInfo(userName, password);
+ httpURL.setUserInfo(userName, password);
if (webdavResource != null) {
- webdavResource.setHttpUrl(httpUrl);
+ webdavResource.setHttpURL(httpURL);
} else {
webdavResource =
- new WebdavResource(httpUrl);
+ new WebdavResource(httpURL);
}
setPath(webdavResource.getPath());
} catch (WebdavException e) {
System.err.println("Warning: "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
} catch (IOException e) {
System.err.println("Error: Check! "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
} else {
// Make the prompt display by default.
- httpUrl = null;
+ httpURL = null;
}
} else {
System.err.println("Warning: " + we.getMessage());
- httpUrl = null;
+ httpURL = null;
}
} catch (IOException e) {
System.err.println("Error: Check! " + e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
}
updatePrompt(getPath());
@@ -286,12 +286,12 @@
try {
// Set up for processing WebDAV resources
- httpUrl = new HttpURL(inputUrl);
+ httpURL = new HttpURL(inputUrl);
if (webdavResource == null) {
- webdavResource = new WebdavResource(httpUrl);
+ webdavResource = new WebdavResource(httpURL);
} else {
webdavResource.close();
- webdavResource.setHttpUrl(inputUrl);
+ webdavResource.setHttpURL(inputUrl);
}
setPath(webdavResource.getPath());
} catch (WebdavException we) {
@@ -312,38 +312,38 @@
webdavResource.close();
} catch (IOException e) {
} finally {
- httpUrl = null;
+ httpURL = null;
webdavResource = null;
}
- httpUrl = new HttpURL(inputUrl);
- httpUrl.setUserInfo(userName, password);
+ httpURL = new HttpURL(inputUrl);
+ httpURL.setUserInfo(userName, password);
if (webdavResource != null) {
- webdavResource.setHttpUrl(inputUrl);
+ webdavResource.setHttpURL(inputUrl);
} else {
webdavResource =
- new WebdavResource(httpUrl);
+ new WebdavResource(httpURL);
}
setPath(webdavResource.getPath());
} catch (WebdavException e) {
System.err.println("Warning: "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
} catch (IOException e) {
System.err.println("Error: Check! "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
} else {
// make the prompt display by default.
- httpUrl = null;
+ httpURL = null;
}
} else {
System.err.println("Error: " + we.getMessage());
- httpUrl = null;
+ httpURL = null;
}
} catch (IOException e) {
System.err.println("Error: Check! " + e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
updatePrompt(getPath());
} else
@@ -471,12 +471,12 @@
boolean succeeded = false;
if (param != null) {
if (!param.startsWith("/")) {
- httpUrl = new HttpURL(param);
+ httpURL = new HttpURL(param);
Enumeration enum = null;
try {
// OPTIONS business logic
enum =
- WebdavResource.optionsMethod(httpUrl);
+ WebdavResource.optionsMethod(httpURL);
while (enum.hasMoreElements()) {
System.out.print(enum.nextElement());
if (enum.hasMoreElements()) {
@@ -500,10 +500,10 @@
password= password.trim();
try {
// OPTIONS business logic
- httpUrl.setUserInfo(userName,
+ httpURL.setUserInfo(userName,
password);
enum = WebdavResource.
- optionsMethod(httpUrl);
+ optionsMethod(httpURL);
while (
enum.hasMoreElements()) {
System.out.print
@@ -529,7 +529,7 @@
System.err.println(
"Error: Check! " + e.getMessage());
}
- httpUrl = null;
+ httpURL = null;
continue;
} else
if (webdavResource != null) {
@@ -584,14 +584,15 @@
} catch (IOException e) {
} finally {
// Make sure the connection closed.
- httpUrl = null;
+ httpURL = null;
webdavResource = null;
}
updatePrompt(getPath());
} else
if (todo.equalsIgnoreCase("url")) {
try {
- System.out.println(webdavResource.getURL());
+ System.out.println
+
(webdavResource.getHttpURLExceptForUserInfo());
} catch (MalformedURLException mue) {
System.err.println("Warning: " + mue.getMessage());
}
@@ -637,20 +638,20 @@
if (password != null)
password= password.trim();
try {
- httpUrl.setUserInfo(userName,
+ httpURL.setUserInfo(userName,
password);
webdavResource.close();
webdavResource =
- new WebdavResource(httpUrl);
+ new WebdavResource(httpURL);
setPath(webdavResource.getPath());
} catch (WebdavException e) {
System.err.println("Warning: "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
} catch (IOException e) {
System.err.println("Error: Check! "
+ e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
updatePrompt(getPath());
}
@@ -662,7 +663,7 @@
} catch (IOException e) {
System.err.println(
"Error: Check! " + e.getMessage());
- httpUrl = null;
+ httpURL = null;
}
updatePrompt(getPath());
}
@@ -697,9 +698,6 @@
}
if (webdavResource.exists()) {
setPath(webdavResource.getPath());
- } else {
- System.err.println
- ("Warning: Not found the path");
}
} catch (WebdavException we) {
if (webdavResource.getStatusCode() ==
@@ -718,7 +716,7 @@
switch (options[o]) {
case 'l':
try {
- Vector list = webdavResource.listCollection();
+ Vector list = webdavResource.listInDetail();
for (int i = 0; i < list.size(); i++) {
String[] longFormat =
(String []) list.elementAt(i);
@@ -1131,7 +1129,7 @@
StringBuffer buff = new StringBuffer();
try {
- buff.append("[" + httpUrl.getHost().toUpperCase() + "] ");
+ buff.append("[" + httpURL.getHost().toUpperCase() + "] ");
buff.append(path);
} catch (Exception e) {
buff.append("[ Slide ]");
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... remm
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... juergen
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... remm
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... remm
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
- cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we... jericho
