File;
    
    /** True if the file was successfully copied to the remote location */
    private boolean succeeded;
    
    /** An optional error message if the remote file copy was not successful */
    private String errorMessage;
    
    /** An optional exception describing why this attempt failed */
    private Exception error;

    /**
     * An optional string containing the external output from the copy command
     * such as any error messages from the command used for the copy
     */
    private String externalOutput;

    /**
     * Creates a new RemoteFileCopyResults object describing the results of
     * copying the specified local file to the specified remote file location.
     * 
     * @param localFile
     *            The local file being copied.
     * @param remoteFile
     *            The remote file location.
     */
    public RemoteFileCopyResults(String localFile, String remoteFile) {
        this.localFile = localFile;
        this.remoteFile = remoteFile;
    }

    /**
     * @return The local file location.
     */
    public String getLocalFile() {
        return localFile;
    }

    /**
     * @return The remote file location.
     */
    public String getRemoteFile() {
        return remoteFile;
    }

    /**
     * @param errorMessage
     *            the error message describing how this remote file copy failed.
     */
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    /**
     * @return the error message describing how this remote file copy attempt
     *         failed.
     */
    public String getErrorMessage() {
        if (externalOutput == null || externalOutput.trim().length() == 0) {
            return errorMessage;
        }
        
        return errorMessage + ":\n\t" + externalOutput;
    }

    /**
     * @param wasSuccessful
     *            True if the file was successfully copied to the remote file
     *            location.
     */
    public void setSucceeded(boolean wasSuccessful) {
        