0)) for (int i = 0; i < subsList.length; i++)
+ makeSub(i + 1, subsList[i]);
// save subs
- subs=subsList;
+ subs = subsList;
return this;
}
-
+
/**
* retrieves an array of substitution variables
* @return Object[] array of substitution variables used
@@ -332,130 +328,107 @@ public class SystemMessage
public Object[] getSubVariables() {
return subs;
}
+
/**
* private method to make a substitution
*/
- private void makeSub(int subNumber, Object sub)
- {
- if (sub == null)
- return;
+ private void makeSub(int subNumber, Object sub) {
+ if (sub == null) return;
String subValue = getSubValue(sub);
-
- // check that substitution is needed
- if (subNumber>getNumSubstitutionVariables())
- return;
- String subVar=subPrefix+new Integer(subNumber).toString();
+ // check that substitution is needed
+ if (subNumber > getNumSubstitutionVariables()) return;
+
+ String subVar = subPrefix + new Integer(subNumber).toString();
int subLoc = -1;
-
+
// set level 1
// - quick test added by Phil
if (level1WS.equals(subVar))
- level1WS = subValue;
- else
- {
- subLoc=level1WS.indexOf(subVar);
-
- // FIXES BY PHIL
- // 1.
- // in the following code we were doing toCharArray only to index and get the first char.
- // this is not required! there is a charAt method in String for this. Phil. EG:
- //!Character.isDigit(level1WS.substring(subVar.length()).toCharArray()[0])) ||
-
- // 2. compared subLoc to gt zero, vs gte zero
- // 3. fixing that exposed a bug for the case when level one or two is only '%1'
- //
- // This code is hard to read and maintain and should be fixed up someday.
- // -- why do we check if the next or previous char is a digit? For double digit sub vars like %11?
-
- //while (subLoc>0) fixed. phil
- while (subLoc>=0)
- {
- // in first position
- if ((subLoc==0 &&
- !Character.isDigit(level1WS.substring(subVar.length()).charAt(0))) ||
- // in last position
- (subLoc==level1WS.length()-subVar.length() &&
- level1WS.substring(subLoc-1).charAt(0)!=subPrefix) ||
- // somewhere in the middle
- (!Character.isDigit(level1WS.substring(subLoc+subVar.length()).charAt(0)) &&
- level1WS.substring(subLoc-1).charAt(0)!=subPrefix))
- level1WS=level1WS.substring(0,subLoc)+subValue+level1WS.substring(subLoc+subVar.length());
- subLoc=level1WS.indexOf(subVar, subLoc + subValue.length() );
- }
+ level1WS = subValue;
+ else {
+ subLoc = level1WS.indexOf(subVar);
+
+ // FIXES BY PHIL
+ // 1.
+ // in the following code we were doing toCharArray only to index and get the first char.
+ // this is not required! there is a charAt method in String for this. Phil. EG:
+ //!Character.isDigit(level1WS.substring(subVar.length()).toCharArray()[0])) ||
+
+ // 2. compared subLoc to gt zero, vs gte zero
+ // 3. fixing that exposed a bug for the case when level one or two is only '%1'
+ //
+ // This code is hard to read and maintain and should be fixed up someday.
+ // -- why do we check if the next or previous char is a digit? For double digit sub vars like %11?
+
+ //while (subLoc>0) fixed. phil
+ while (subLoc >= 0) {
+ // in first position
+ if ((subLoc == 0 && !Character.isDigit(level1WS.substring(subVar.length()).charAt(0))) ||
+ // in last position
+ (subLoc == level1WS.length() - subVar.length() && level1WS.substring(subLoc - 1).charAt(0) != subPrefix) ||
+ // somewhere in the middle
+ (!Character.isDigit(level1WS.substring(subLoc + subVar.length()).charAt(0)) && level1WS.substring(subLoc - 1).charAt(0) != subPrefix))
+ level1WS = level1WS.substring(0, subLoc) + subValue + level1WS.substring(subLoc + subVar.length());
+ subLoc = level1WS.indexOf(subVar, subLoc + subValue.length());
+ }
}
// set level 2
// - quick test added by Phil
if (level2WS.equals(subVar))
- level2WS = subValue;
- else
- {
- subLoc=level2WS.indexOf(subVar);
- //while (subLoc>0) fixed. phil
- while (subLoc>=0)
- {
- // in first position
- if ((subLoc==0 &&
- //!Character.isDigit(level2WS.substring(subVar.length()).charAt(0))) ||
- !Character.isDigit(level2WS.charAt(subVar.length()))) ||
- // in last position
- (subLoc==level2WS.length()-subVar.length() &&
- level2WS.substring(subLoc-1).charAt(0)!=subPrefix) ||
- // somewhere in the middle
- (!Character.isDigit(level2WS.substring(subLoc+subVar.length()).charAt(0)) &&
- level2WS.substring(subLoc-1).charAt(0)!=subPrefix))
- level2WS=level2WS.substring(0,subLoc)+subValue+level2WS.substring(subLoc+subVar.length());
- subLoc=level2WS.indexOf(subVar, subLoc + subValue.length() );
- }
+ level2WS = subValue;
+ else {
+ subLoc = level2WS.indexOf(subVar);
+ //while (subLoc>0) fixed. phil
+ while (subLoc >= 0) {
+ // in first position
+ if ((subLoc == 0 &&
+ //!Character.isDigit(level2WS.substring(subVar.length()).charAt(0))) ||
+ !Character.isDigit(level2WS.charAt(subVar.length())))
+ ||
+ // in last position
+ (subLoc == level2WS.length() - subVar.length() && level2WS.substring(subLoc - 1).charAt(0) != subPrefix) ||
+ // somewhere in the middle
+ (!Character.isDigit(level2WS.substring(subLoc + subVar.length()).charAt(0)) && level2WS.substring(subLoc - 1).charAt(0) != subPrefix))
+ level2WS = level2WS.substring(0, subLoc) + subValue + level2WS.substring(subLoc + subVar.length());
+ subLoc = level2WS.indexOf(subVar, subLoc + subValue.length());
+ }
}
- }
-
-
-
- public void setPrefixChar(char prefixChar) {
+ }
+
+ public void setPrefixChar(char prefixChar) {
subPrefix = prefixChar;
- }
-
+ }
+
/**
- * Do message variable substitution. Using you are replacing &1 (say) with
- * a string.
- * Still need this for non-message substitution capability. Phil.
- * @param string - string containing substring to be substituted.
+ * Replace a string with another string throughout a target string.
+ * @param target - string containing substring to be substituted.
* @param subOld - substitution variable. Eg "%1"
* @param subNew - substitution data. Eg "001"
* @return message with all occurrences of subOld substituted with subNew.
*/
- public static String sub(String msg, String subOld, String subNew)
- {
+ public static String sub(String target, String subOld, String subNew) {
StringBuffer temp = new StringBuffer();
int lastHit = 0;
int newHit = 0;
- for (newHit = msg.indexOf(subOld,lastHit); newHit != -1;
- lastHit = newHit, newHit = msg.indexOf(subOld,lastHit))
- {
- if (newHit >= 0)
- temp.append(msg.substring(lastHit,newHit));
- temp.append(subNew);
- newHit += subOld.length();
- }
- if (lastHit >= 0)
- temp.append(msg.substring(lastHit));
+ for (newHit = target.indexOf(subOld, lastHit); newHit != -1; lastHit = newHit, newHit = target.indexOf(subOld, lastHit)) {
+ if (newHit >= 0) temp.append(target.substring(lastHit, newHit));
+ temp.append(subNew);
+ newHit += subOld.length();
+ }
+ if (lastHit >= 0) temp.append(target.substring(lastHit));
return temp.toString();
}
-
- // Housekeeping...
+
/**
* Convert this message to a string.
* Returns string of the form: msgId + severity + ":" + first-level-text
*/
- public String toString()
- {
- return getFullMessageID() + ": " + getLevelOneText();
+ public String toString() {
+ return getFullMessageID() + ": " + getLevelOneText();
}
-
-
/**
* used to determine the string value of the object
* it calls toString for all object types except for Exceptions
@@ -463,48 +436,42 @@ public class SystemMessage
* @param sub the substitution object
* @return the string value for the object
*/
- public String getSubValue(Object sub)
- {
-
+ public String getSubValue(Object sub) {
+
// the following code caused a crash so I changed it. Phil.
/*
- Class subClass=sub.getClass();
- // loop through all the classes for the object
- try {
- while (subClass!=null) {
- if (subClass.equals(Class.forName("Exception"))) {
- Exception exc=(Exception)sub;
- StringWriter excWriter = new StringWriter();
- exc.printStackTrace(new PrintWriter(excWriter));
- return exc.toString()+"\n"+ excWriter.toString();
- }
- subClass=subClass.getSuperclass();
- }
+ Class subClass=sub.getClass();
+ // loop through all the classes for the object
+ try {
+ while (subClass!=null) {
+ if (subClass.equals(Class.forName("Exception"))) {
+ Exception exc=(Exception)sub;
+ StringWriter excWriter = new StringWriter();
+ exc.printStackTrace(new PrintWriter(excWriter));
+ return exc.toString()+"\n"+ excWriter.toString();
+ }
+ subClass=subClass.getSuperclass();
+ }
+ }
+ catch(ClassNotFoundException e) {
+ // class was not found
+ SystemBasePlugin.logError("SystemMessge: getSubValue (Class not found) "+e.toString(), e);
+ }
+ */
+
+ if (sub == null) return "";
+
+ if (sub instanceof Exception) {
+ Exception exc = (Exception) sub;
+ StringWriter excWriter = new StringWriter();
+ exc.printStackTrace(new PrintWriter(excWriter));
+ String msg = exc.toString();
+ //String msg = exc.getMessage();
+ if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName();
+ return msg + "\n" + excWriter.toString();
}
- catch(ClassNotFoundException e) {
- // class was not found
- SystemBasePlugin.logError("SystemMessge: getSubValue (Class not found) "+e.toString(), e);
- }
- */
-
- if (sub == null)
- return "";
-
- if (sub instanceof Exception)
- {
- Exception exc=(Exception)sub;
- StringWriter excWriter = new StringWriter();
- exc.printStackTrace(new PrintWriter(excWriter));
- String msg = exc.toString();
- //String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- return msg+"\n"+ excWriter.toString();
- }
-
-
+
return sub.toString();
}
-
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
index 1cc10928fef..ef0bd43c0b9 100644
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
+++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
@@ -20,10 +20,13 @@ package org.eclipse.rse.services.clientserver.messages;
*/
public class SystemMessageException extends Exception
{
- /**
- *
+
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
*/
- private static final long serialVersionUID = 6695260563678942200L;
+ private static final long serialVersionUID = 6695260563678942200L;
private SystemMessage msg;
/**
@@ -46,7 +49,7 @@ public class SystemMessageException extends Exception
}
/**
- * Return the SystemMessage we wrap
+ * @return the SystemMessage wrapped by this SystemMessageException
*/
public SystemMessage getSystemMessage()
{
@@ -65,6 +68,7 @@ public class SystemMessageException extends Exception
/**
* Set the SystemMessage being wrapped
+ * @param msg the SystemMessage wrapped by this SystemMessageException
*/
public void setSystemMessage(SystemMessage msg)
{
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
index 15c74d6ab97..c273e9845c9 100644
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
+++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
@@ -109,7 +109,10 @@ public class SystemMessageFile implements ErrorHandler
/**
* Constructor
- * @param messageFileName - name of xml file which will contain the messages
+ * @param messageFileName - a key used to determine if a message file has already been loaded.
+ * Usually the name of the xml file containing the message file.
+ * @param messageFile the stream containing the message file.
+ * @param dtdStream the stream containing the dtd for this message file.
*/
public SystemMessageFile (String messageFileName, InputStream messageFile, InputStream dtdStream)
{
@@ -131,7 +134,7 @@ public class SystemMessageFile implements ErrorHandler
* If the named message file has already been loaded return its
* MessageFileInfo
* @param messageFileName
- * @return
+ * @return the MessageFileInfo for this message file
*/
protected MessageFileInfo getFromCache(String messageFileName)
{
@@ -305,14 +308,15 @@ public class SystemMessageFile implements ErrorHandler
/**
* Override this to provide different extended SystemMessage implementation
- * @param componentAbbr
- * @param subComponentAbbr
- * @param msgNumber
- * @param msgIndicator
- * @param msgL1
- * @param msgL2
- * @return
- * @throws IndicatorException
+ * @param componentAbbr a three letter component name
+ * @param subComponentAbbr a one letter subcomponent name
+ * @param msgNumber a four digit message number
+ * @param msgIndicator a single character message type indicator
+ * @param msgL1 the first level text that describes the error
+ * @param msgL2 the second level text that provides details about the error and possible recovery
+ * @return the SystemMessage
+ * @throws IndicatorException if the message type indicator is invalid.
+ * @see SystemMessage for message type indicator constants
*/
protected SystemMessage loadSystemMessage(String componentAbbr, String subComponentAbbr, String msgNumber, char msgIndicator,
String msgL1, String msgL2) throws IndicatorException
@@ -406,7 +410,7 @@ public class SystemMessageFile implements ErrorHandler
/**
* Use this method to generate html documentation for the messages in the message file.
* This is useful for reference information, or to give to Level 2 for service support.
- * @param htmlFile - the fully qualified name of the file to write to. Overwrites current contents.
+ * @param fullFileName - the fully qualified name of the file to write to. Overwrites current contents.
* @return true if it went well, false if it failed for some reason, such as given a bad file name. Errors written to standard out.
*/
public boolean printHTML(String fullFileName)
@@ -566,51 +570,6 @@ public class SystemMessageFile implements ErrorHandler
return false;
}
- /**
- * loadAndParseXMLFile:
- * tries to load and parse the specified XML file.
- * @param String messageFileName: name of xml file which will contain the messages
- */
- private Document loadAndParseXMLFile (String messageFileName)
- {
- DocumentBuilder parser = createXmlParser();
-
- try
- {
- Document document = parser.parse(messageFileName);
- return document;
- }
- catch (SAXException e)
- {
- // the parser was unable to parse the file.
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("SystemMessageFile: loadAndParseXMLFile "+e.toString(), e);
-
- MessageBox mb = new MessageBox(SystemPlugin.getActiveWorkbenchShell());
- mb.setText("Unexpected Error");
- mb.setMessage("Unable to load message file " + messageFileName );
- mb.open();
- */
- return null;
- }
- catch (IOException e)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- // there was an error reading the file
- SystemBasePlugin.logError("SystemMessageFile: loadAndParseXMLFile "+e.toString(), e);
-
- MessageBox mb = new MessageBox(SystemPlugin.getActiveWorkbenchShell());
- mb.setText("Unexpected Error");
- mb.setMessage("Unable to load message file " + messageFileName );
- mb.open();
- */
- return null;
- }
-
- // the file was successfully opened and parsed
-// return parser.getDocument();
- }
-
/**
* Create the XML parser
* Set its entity resolver and error handler.
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
index 2a449ed7b55..00453c48501 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
@@ -43,18 +43,22 @@ public interface IFileService extends IService
/**
* Copy a file to the remote file system. The remote target is denoted by a
* string representing the parent and a string representing the file.
+ * @param monitor the monitor for this potentially long running operation
* @param stream input stream to transfer
* @param remoteParent - a string designating the parent folder of the target for this file.
* @param remoteFile - a string designating the name of the file to be written on the remote system.
* @param isBinary - indicates whether the file is text or binary
* @param hostEncoding - the tgt encoding of the file (if text)
* @return true if the file was uploaded
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
/**
* Copy a file to the remote file system. The remote target is denoted by a
* string representing the parent and a string representing the file.
+ * @param monitor the monitor for this potentially long running operation
* @param localFile - a real file in the local file system.
* @param remoteParent - a string designating the parent folder of the target for this file.
* @param remoteFile - a string designating the name of the file to be written on the remote system.
@@ -62,11 +66,14 @@ public interface IFileService extends IService
* @param srcEncoding - the src encoding of the file (if text)
* @param hostEncoding - the tgt encoding of the file (if text)
* @return true if the file was uploaded
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException;
/**
* Copy a file from the remote file system to the local system.
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent - a String designating the remote parent.
* @param remoteFile - a String designating the remote file residing in the parent.
* @param localFile - The file that is to be written. If the file exists it is
@@ -74,51 +81,66 @@ public interface IFileService extends IService
* @param isBinary - indicates whether the file is text on binary
* @param hostEncoding - the encoding on the host (if text)
* @return true if the file was copied from the remote system.
- * @throws SystemMessageException
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
/**
- * Return the host file given the parent path and file name
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent
* @param name
- * @return
+ * @return the host file given the parent path and file name
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name) throws SystemMessageException;
/**
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
* @return the list of host files.
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
/**
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
* @return the list of host files.
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
/**
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent - the name of the parent directory on the remote file
* system from which to retrieve the child list.
* @param fileFilter - a string that can be used to filter the children. Only
* those files matching the filter make it into the list. The interface
* does not dictate where the filtering occurs.
* @return the list of host files.
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
/**
+ * @param monitor the monitor for this potentially long running operation
* Return the list of roots for this system
* @return the list of host files.
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile[] getRoots(IProgressMonitor monitor) throws SystemMessageException;
@@ -130,10 +152,12 @@ public interface IFileService extends IService
/**
* Create a file on the host
- * @param monitor the progress monitor
+ * @param monitor the monitor for this potentially long running operation
* @param remoteParent the parent directory
* @param fileName the name of the new file
* @return the newly created file
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
@@ -143,6 +167,8 @@ public interface IFileService extends IService
* @param remoteParent the parent directory
* @param folderName the name of the new folder
* @return the newly created folder
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException;
@@ -152,6 +178,8 @@ public interface IFileService extends IService
* @param remoteParent the folder containing the file to delete
* @param fileName the name of the file or folder to delete
* @return true if successful
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
@@ -161,6 +189,8 @@ public interface IFileService extends IService
* @param remoteParents the array of folders containing the files to delete
* @param fileNames the names of the files or folders to delete
* @return true iff all deletes are successful
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException;
@@ -171,6 +201,8 @@ public interface IFileService extends IService
* @param oldName the old name of the file or folder to rename
* @param newName the new name for the file
* @return true if successful
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException;
@@ -182,6 +214,8 @@ public interface IFileService extends IService
* @param newName the new name for the file
* @param oldFile the file to update with the change
* @return true if successful
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException;
@@ -192,7 +226,9 @@ public interface IFileService extends IService
* @param srcName the new of the file or folder to move
* @param tgtParent the destination folder for the move
* @param tgtName the name of the moved file or folder
- * @return
+ * @return true if the file was moved
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
@@ -203,7 +239,9 @@ public interface IFileService extends IService
* @param srcName the new of the file or folder to copy
* @param tgtParent the destination folder for the copy
* @param tgtName the name of the copied file or folder
- * @return
+ * @return true if the file was copied successfully
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
@@ -213,13 +251,15 @@ public interface IFileService extends IService
* @param srcParents the folders containing each file or folder to copy
* @param srcNames the names of the files or folders to copy
* @param tgtParent the destination folder for the copy
- * @return
+ * @return true if all files were copied
+ * @throws SystemMessageException if an error occurs.
+ * Typically this would be one of those in the RemoteFileException family.
*/
public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException;
/**
* Indicates whether the file system is case sensitive
- * @return
+ * @return true if the file system has case sensitive file names
*/
public boolean isCaseSensitive();
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCancelledException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
similarity index 50%
rename from rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCancelledException.java
rename to rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
index efa5649feb8..c0a6b8d878a 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCancelledException.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
@@ -14,11 +14,11 @@
* {Name} (company) - description of contribution.
********************************************************************************/
-package org.eclipse.rse.subsystems.files.core.subsystems;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
+package org.eclipse.rse.services.files;
+import org.eclipse.rse.services.clientserver.messages.IndicatorException;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
/**
* Exception thrown when attempting an operation and it fails for IO reasons, such as
@@ -27,14 +27,40 @@ import org.eclipse.rse.ui.RSEUIPlugin;
* The original remote system's io message is always embedded and retrievable
* via getRemoteException().
*/
-public class RemoteFileCancelledException extends RemoteFileIOException
-{
+public class RemoteFileCancelledException extends RemoteFileIOException {
+
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
+ */
+ private static final long serialVersionUID = 1L;
+ private static SystemMessage myMessage = null;
/**
* Constructor
*/
- public RemoteFileCancelledException()
- {
- super(new SystemMessageException(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED)));
+ public RemoteFileCancelledException() {
+ super(new SystemMessageException(getMyMessage()));
}
+
+ /*
+ * TODO dwd update this to retrieve the new messages when those are created
+ * myMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED);
+ * public static final String MSG_OPERATION_CANCELLED = "RSEG1067";
+ *
+ * Operation cancelled.
+ *
+ *
+ */
+ private static SystemMessage getMyMessage() {
+ String l1 = "Operation cancelled.";
+ String l2 = "";
+ try {
+ myMessage = new SystemMessage("RSE", "G", "1067", SystemMessage.ERROR, l1, l2);
+ } catch (IndicatorException e) {
+ }
+ return myMessage;
+ }
+
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
similarity index 92%
rename from rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileException.java
rename to rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
index 63bf2ce953d..19dca2a167e 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileException.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
@@ -14,7 +14,7 @@
* {Name} (company) - description of contribution.
********************************************************************************/
-package org.eclipse.rse.subsystems.files.core.subsystems;
+package org.eclipse.rse.services.files;
import java.util.ResourceBundle;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
@@ -34,6 +34,12 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
*/
public class RemoteFileException extends SystemMessageException
{
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
+ */
+ private static final long serialVersionUID = 1L;
private Exception wrappedException = null;
/**
@@ -96,7 +102,7 @@ public class RemoteFileException extends SystemMessageException
wrappedException = remoteException;
}
/**
- * Return the wrapped exception
+ * @return the original remote exception
*/
public Exception getRemoteException()
{
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java
new file mode 100644
index 00000000000..870577c61de
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java
@@ -0,0 +1,71 @@
+/********************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.rse.services.files;
+
+import org.eclipse.rse.services.clientserver.messages.IndicatorException;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+
+/**
+ * Exception thrown when attempting an operation and it fails for IO reasons, such as
+ * the file is read-only.
+ *
+ * The original remote system's io message is always embedded and retrievable
+ * via getRemoteException().
+ */
+public class RemoteFileIOException extends RemoteFileException {
+
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
+ */
+ private static final long serialVersionUID = 1L;
+ private static SystemMessage myMessage = null;
+
+ /**
+ * Constructor for RemoteFileIOException
+ * @param remoteException the initial cause of this exception
+ */
+ public RemoteFileIOException(Exception remoteException) {
+ super(getMyMessage(), remoteException);
+ String secondLevel = remoteException.getMessage();
+ if (secondLevel == null) {
+ secondLevel = remoteException.getClass().getName();
+ }
+ getSystemMessage().makeSubstitution(secondLevel);
+ }
+
+ /*
+ * TODO dwd update this to retrieve the new messages when those are created
+ * myMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR);
+ * public static final String FILEMSG_IO_ERROR = "RSEF1002";
+ *
+ * Operation failed. File system input or output error
+ * Message reported from file system: %1
+ *
+ */
+ private static SystemMessage getMyMessage() {
+ String l1 = "Operation failed. File system input or output error";
+ String l2 = "Message reported from file system: %1";
+ try {
+ myMessage = new SystemMessage("RSE", "F", "1002", SystemMessage.ERROR, l1, l2);
+ } catch (IndicatorException e) {
+ }
+ return myMessage;
+ }
+
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java
new file mode 100644
index 00000000000..83807f8ace2
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java
@@ -0,0 +1,70 @@
+/********************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.rse.services.files;
+
+import org.eclipse.rse.services.clientserver.messages.IndicatorException;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+
+/**
+ * Exception thrown when attempting an operation and it fails for security reasons.
+ * The original remote system's security message is always embedded and retrievable
+ * via getRemoteException().
+ */
+public class RemoteFileSecurityException extends RemoteFileException {
+
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
+ */
+ private static final long serialVersionUID = 1L;
+ private static SystemMessage myMessage = null;
+
+ /**
+ * Constructor
+ * @param remoteException the original cause of this exception.
+ */
+ public RemoteFileSecurityException(Exception remoteException) {
+ super(getMyMessage(), remoteException);
+ String secondLevel = remoteException.getMessage();
+ if (secondLevel == null) {
+ secondLevel = remoteException.getClass().getName();
+ }
+ getSystemMessage().makeSubstitution(secondLevel);
+ }
+
+ /*
+ * TODO dwd update this to retrieve the new messages when those are created
+ * super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR), remoteException);
+ * public static final String FILEMSG_SECURITY_ERROR = "RSEF1001";
+ *
+ * Operation failed. Security violation
+ * Message reported from file system: %1
+ *
+ */
+ private static SystemMessage getMyMessage() {
+ if (myMessage == null) {
+ String l1 = "Operation failed. File system input or output error";
+ String l2 = "Message reported from file system: %1";
+ try {
+ myMessage = new SystemMessage("RSE", "F", "1002", SystemMessage.ERROR, l1, l2);
+ } catch (IndicatorException e) {
+ }
+ }
+ return myMessage;
+ }
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java
new file mode 100644
index 00000000000..dd976b13228
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java
@@ -0,0 +1,71 @@
+/********************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.rse.services.files;
+
+import org.eclipse.rse.services.clientserver.messages.IndicatorException;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+
+/**
+ * Exception thrown when attempting to delete a folder, and the folder is not empty.
+ */
+public class RemoteFolderNotEmptyException extends RemoteFileException {
+
+ /**
+ * A serialVersionUID is recommended for all serializable classes.
+ * This trait is inherited from Throwable.
+ * This should be updated if there is a schema change for this class.
+ */
+ private static final long serialVersionUID = 1L;
+ private static SystemMessage myMessage = null;
+
+ /**
+ * Constructor for RemoteFolderNotEmptyException when there is no remote exception to wrap
+ */
+ public RemoteFolderNotEmptyException() {
+ this(null);
+ }
+
+ /**
+ * Constructor for RemoteFolderNotEmptyException when there is a remote exception to wrap
+ * @param remoteException the exception that caused this one to be constructed.
+ */
+ public RemoteFolderNotEmptyException(Exception remoteException) {
+ super(getMyMessage(), remoteException);
+ }
+
+ /*
+ * TODO dwd update this to retrieve the new messages when those are created
+ * super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTEMPTY), remoteException);
+ * public static final String FILEMSG_FOLDER_NOTEMPTY = "RSEF1003";
+ *
+ * Folder is not empty. Cannot delete
+ * The operation failed. One possible reason is that the folder is not empty
+ *
+ */
+ private static SystemMessage getMyMessage() {
+ if (myMessage == null) {
+ String l1 = "Folder is not empty. Cannot delete";
+ String l2 = "The operation failed. One possible reason is that the folder is not empty";
+ try {
+ myMessage = new SystemMessage("RSE", "F", "1003", SystemMessage.ERROR, l1, l2);
+ } catch (IndicatorException e) {
+ }
+ }
+ return myMessage;
+ }
+
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
index 2551b1a04d6..fd840740c11 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
@@ -35,6 +35,9 @@ import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile;
+import org.eclipse.rse.services.files.RemoteFileIOException;
+import org.eclipse.rse.services.files.RemoteFileSecurityException;
+import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
import org.eclipse.rse.services.search.IHostSearchResultSet;
import org.eclipse.rse.services.search.ISearchService;
@@ -42,10 +45,7 @@ import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistr
import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException;
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFolderNotEmptyException;
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
index ea6055d9d21..64591a1c7c3 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
@@ -26,6 +26,9 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
import org.eclipse.rse.model.SystemRemoteResourceSet;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.files.RemoteFileIOException;
+import org.eclipse.rse.services.files.RemoteFileSecurityException;
+import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileIOException.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileIOException.java
deleted file mode 100644
index 0787db46d37..00000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileIOException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * Exception thrown when attempting an operation and it fails for IO reasons, such as
- * the file is read-only.
- *
- * The original remote system's io message is always embedded and retrievable
- * via getRemoteException().
- */
-public class RemoteFileIOException extends RemoteFileException
-{
- /**
- * Constructor
- */
- public RemoteFileIOException(Exception remoteException)
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR), remoteException);
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null)
- secondLevel = remoteException.getClass().getName();
- getSystemMessage().makeSubstitution(secondLevel);
- }
-}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSecurityException.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSecurityException.java
deleted file mode 100644
index ecdce85f501..00000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSecurityException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * Exception thrown when attempting an operation and it fails for security reasons.
- * The original remote system's security message is always embedded and retrievable
- * via getRemoteException().
- */
-public class RemoteFileSecurityException extends RemoteFileException
-{
- /**
- * Constructor
- */
- public RemoteFileSecurityException(Exception remoteException)
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR), remoteException);
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null)
- secondLevel = remoteException.getClass().getName();
- getSystemMessage().makeSubstitution(secondLevel);
- }
-}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
index b7ad4528a59..c112c722c51 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
@@ -56,6 +56,9 @@ import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.files.RemoteFileIOException;
+import org.eclipse.rse.services.files.RemoteFileSecurityException;
+import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
import org.eclipse.rse.services.search.IHostSearchResult;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderNotEmptyException.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderNotEmptyException.java
deleted file mode 100644
index 6eee9b2c9dd..00000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderNotEmptyException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * Exception thrown when attempting to delete a folder, and the folder is not empty.
- */
-public class RemoteFolderNotEmptyException extends RemoteFileException
-{
- /**
- * Constructor for RemoteFolderNotEmptyException when there is no remote exception to wrap
- */
- public RemoteFolderNotEmptyException()
- {
- this(null);
- }
- /**
- * Constructor for RemoteFolderNotEmptyException when there is a remote exception to wrap
- */
- public RemoteFolderNotEmptyException(Exception remoteException)
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTEMPTY), remoteException);
- }
-}
\ No newline at end of file