/* * Provided by CSTI Consulting * Following GNU LESSER GENERAL PUBLIC LICENSE * You may obtain more details at * * http://www.csticonsulting.com * Copyright (c) 2006-2010 Consultation CS-TI inc. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.salesmanager.central.util.upload; import java.io.Serializable; /** * Created by IntelliJ IDEA. * * @author Original : plosson on 06-janv.-2006 12:19:14 - Last modified by * $Author: vde $ on $Date: 2004/11/26 22:43:57 $ * @version 1.0 - Rev. $Revision: 1.2 $ */ public class UploadInfo implements Serializable { private long totalSize = 0; private long bytesRead = 0; private long elapsedTime = 0; private String status = "done"; private int fileIndex = 0; public UploadInfo() { } public UploadInfo(int fileIndex, long totalSize, long bytesRead, long elapsedTime, String status) { this.fileIndex = fileIndex; this.totalSize = totalSize; this.bytesRead = bytesRead; this.elapsedTime = elapsedTime; this.status = status; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public long getTotalSize() { return totalSize; } public void setTotalSize(long totalSize) { this.totalSize = totalSize; } public long getBytesRead() { return bytesRead; } public void setBytesRead(long bytesRead) { this.bytesRead = bytesRead; } public long getElapsedTime() { return elapsedTime; } public void setElapsedTime(long elapsedTime) { this.elapsedTime = elapsedTime; } public boolean isInProgress() { return "progress".equals(status) || "start".equals(status); } public int getFileIndex() { return fileIndex; } public void setFileIndex(int fileIndex) { this.fileIndex = fileIndex; } }