[jboss-svn-commits] JBL Code SVN: r8943 - in labs/jbossesb/trunk/product/core/rosetta/src/org/jboss: soa/esb/util and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Jan 20 17:22:35 EST 2007


Author: mark.little at jboss.com
Date: 2007-01-20 17:22:35 -0500 (Sat, 20 Jan 2007)
New Revision: 8943

Modified:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
Log:
Method signature changes for finer granularity exceptions.

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java	2007-01-20 17:57:31 UTC (rev 8942)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java	2007-01-20 22:22:35 UTC (rev 8943)
@@ -316,7 +316,10 @@
 		}
 
 		File oNew = new File(oLocalDir, p_sFinalName);
-		if (oNew.exists()) oNew.delete();
+		
+		if (oNew.exists()) 
+			oNew.delete();
+		
 		oLclFile.renameTo(oNew);
 	}
 

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java	2007-01-20 17:57:31 UTC (rev 8942)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java	2007-01-20 22:22:35 UTC (rev 8943)
@@ -23,8 +23,10 @@
 package org.jboss.soa.esb.util;
 
 import java.io.File;
+import java.io.IOException;
 
-public interface RemoteFileSystem {
+public interface RemoteFileSystem
+{
 
 	public static final String FTP_PROTOCOL = "ftp";
 
@@ -33,7 +35,7 @@
 	public static final String FTPS_PROTOCOL = "ftps";
 
 	public static final String PARMS_PROTOCOL = "protocol";
-	
+
 	public static final String PARMS_FTP_SERVER = "ftpServer";
 
 	public static final String PARMS_USER = "ftpUser";
@@ -51,14 +53,14 @@
 	public static final String PARMS_PASSIVE = "ftpPassive";
 
 	public static final String PARMS_CERTIFICATE = "certificate";
-	
-	public String getRemoteDir();
 
+	public String getRemoteDir ();
+
 	/**
 	 * Terminates ftp session and frees resources
 	 * <li>Well behaved programs should make sure to call this method </li>
 	 */
-	public void quit(); // _________________________________
+	public void quit (); // _________________________________
 
 	/**
 	 * Deletes specified file in remote directory
@@ -67,13 +69,13 @@
 	 *            String : filename to delete. Method will attempt to delete
 	 *            file with rightmost node of argument within remote directory
 	 *            specified in 'remoteDirURI'
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or file cannot be
 	 *             deleted in remote directory
 	 */
-	public void deleteRemoteFile(String p_sFile) throws Exception; // _________________________________
+	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException; // _________________________________
 
-	public void remoteDelete(File p_oFile) throws Exception; // _________________________________
+	public void remoteDelete (File p_oFile) throws RemoteFileSystemException; // _________________________________
 
 	/**
 	 * Gets the list of files in the remote directory that end with arg0
@@ -81,22 +83,23 @@
 	 * @param p_sSuffix
 	 *            String : retrieve only files that end with that suffix - all
 	 *            files if null
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or problems
 	 *             encountered
 	 */
-	public String[] getFileListFromRemoteDir(String p_sSuffix) throws Exception; // _________________________________
+	public String[] getFileListFromRemoteDir (String p_sSuffix)
+			throws IOException, RemoteFileSystemException; // _________________________________
 
 	/**
 	 * Change remote directory
 	 * 
 	 * @param p_sDir
 	 *            String : directory to set
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or problems
 	 *             encountered
 	 */
-	public void setRemoteDir(String p_sDir) throws Exception; // _________________________________
+	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException; // _________________________________
 
 	/**
 	 * Renames specified file in remote directory to specified new name
@@ -105,17 +108,24 @@
 	 *            String : filename to rename
 	 * @param p_sTo
 	 *            String : new filename
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or file cannot be
 	 *             renamed to new name in remote directory
 	 *             <li>Method will attempt to rename file with rightmost node
 	 *             of argument within remote directory specified in
 	 *             'remoteDirURI', to new name inside the SAME remote directory
 	 */
-	public void renameInRemoteDir(String p_sFrom, String p_sTo)
-			throws Exception; // _________________________________
+	public void renameInRemoteDir (String p_sFrom, String p_sTo)
+			throws RemoteFileSystemException; // _________________________________
 
-	public void remoteRename(File p_oFrom, File p_oTo) throws Exception; // _________________________________
+	/**
+	 * 
+	 * @param p_oFrom
+	 * @param p_oTo
+	 * @throws IOException if file not found.
+	 * @throws RemoteFileSystemException
+	 */
+	public void remoteRename (File p_oFrom, File p_oTo) throws IOException, RemoteFileSystemException; // _________________________________
 
 	/**
 	 * Uploads specified file from local directory (localDirURI) to remote
@@ -123,7 +133,7 @@
 	 * 
 	 * @param p_sFile
 	 *            String : filename to upload
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or file cannot be
 	 *             uploaded
 	 *             <li> local file will be renamed during transfer
@@ -131,7 +141,8 @@
 	 *             <li> upon successful completion. the suffix '.xferDone' will
 	 *             be appended to the original filename </li>
 	 */
-	public void uploadFile(File p_oFile, String p_sRemoteName) throws Exception; // _________________________________
+	public void uploadFile (File p_oFile, String p_sRemoteName)
+			throws RemoteFileSystemException; // _________________________________
 
 	/**
 	 * Downloads specified file from remote directory (remoteDirURI) to local
@@ -139,7 +150,7 @@
 	 * 
 	 * @param p_sFile
 	 *            String : filename to download
-	 * @throws Exception :
+	 * @throws RemoteFileSystemException :
 	 *             if ftp connection cannot be established, or file cannot be
 	 *             downloaded
 	 *             <li> local file is assigned a temporary name during transfer
@@ -149,7 +160,7 @@
 	 *             will be appended to the original filename in the remote
 	 *             directory </li>
 	 */
-	public void downloadFile(String p_sFile, String p_sFinalName)
-			throws Exception; // _________________________________
+	public void downloadFile (String p_sFile, String p_sFinalName)
+			throws IOException, RemoteFileSystemException; // _________________________________
 
 }
\ No newline at end of file




More information about the jboss-svn-commits mailing list