001 /*
002 * This file is part of the Echo Point Project. This project is a
003 * collection of Components that have extended the Echo Web Application
004 * Framework Version 3.
005 *
006 * Version: MPL 1.1
007 *
008 * The contents of this file are subject to the Mozilla Public License Version
009 * 1.1 (the "License"); you may not use this file except in compliance with
010 * the License. You may obtain a copy of the License at
011 * http://www.mozilla.org/MPL/
012 *
013 * Software distributed under the License is distributed on an "AS IS" basis,
014 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015 * for the specific language governing rights and limitations under the
016 * License.
017 */
018 package echopoint.tucana.event;
019
020 import echopoint.tucana.FileUploadSelector;
021
022 /**
023 * An upload event representing an upload that was cancelled.
024
025 * <p><b>Note:</b> Development of this component was sponsored by <a
026 * href='http://tcnbroadcasting.com/index.jsp' target='_top'>TCN
027 * Broadcasting</a>. We are grateful for their support and sponsorship.</p>
028 *
029 * @author Echo File Transfer Library
030 * @version $Id: UploadCancelEvent.java 90 2008-11-11 01:41:05Z sptrakesh $
031 */
032 public class UploadCancelEvent extends UploadEvent
033 {
034 private static final long serialVersionUID = 1l;
035
036 /** The exception that was trapped as a result of the cancel. */
037 private final Exception exception;
038
039 /**
040 * Creates a new {@link UploadEvent}.
041 *
042 * @param source the source of the event
043 * @param index the index of the upload
044 * @param fileName the name of the file, may not contain path information
045 * @param contentType the content type of the uploaded file
046 * @param exception The exception that was triggered by the cancel.
047 */
048 public UploadCancelEvent( final FileUploadSelector source,
049 final String index, final String fileName, final String contentType,
050 final Exception exception )
051 {
052 super( source, index, fileName, contentType );
053 this.exception = exception;
054 }
055
056 /**
057 * Accessor for property 'exception'.
058 *
059 * @return Value for property 'exception'.
060 */
061 public Exception getException()
062 {
063 return exception;
064 }
065 }