001 /**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016 package org.kuali.student.common.ui.client.dto;
017
018 import java.io.Serializable;
019 import java.util.ArrayList;
020 import java.util.List;
021
022 /**
023 * Simple class used to store upload progress information for the UploadServlet
024 *
025 * @author Kuali Student Team
026 *
027 */
028 public class UploadStatus implements Serializable{
029
030 private static final long serialVersionUID = 1L;
031
032 public static enum UploadTransferStatus{IN_PROGRESS, UPLOAD_FINISHED, COMMIT_FINISHED, ERROR, FILE_ERROR}
033
034 private Long totalSize;
035 private Long progress;
036 private UploadTransferStatus status = UploadTransferStatus.IN_PROGRESS;
037 private int itemsRead = 0;
038 private List<String> createdDocIds = new ArrayList<String>();
039 private List<FileStatus> fileStatusList = new ArrayList<FileStatus>();
040
041 public Long getTotalSize() {
042 return totalSize;
043 }
044 public void setTotalSize(Long totalSize) {
045 this.totalSize = totalSize;
046 }
047 public Long getProgress() {
048 return progress;
049 }
050 public void setProgress(Long progress) {
051 this.progress = progress;
052 }
053 public UploadTransferStatus getStatus() {
054 return status;
055 }
056 public void setStatus(UploadTransferStatus status) {
057 this.status = status;
058 }
059 public int getItemsRead() {
060 return itemsRead;
061 }
062 public void setItemsRead(int itemsRead) {
063 this.itemsRead = itemsRead;
064 }
065 public List<String> getCreatedDocIds() {
066 return createdDocIds;
067 }
068 public void setCreatedDocIds(List<String> createdDocIds) {
069 this.createdDocIds = createdDocIds;
070 }
071 public List<FileStatus> getFileStatusList() {
072 return fileStatusList;
073 }
074 public void setFileStatusList(List<FileStatus> fileStatusList) {
075 this.fileStatusList = fileStatusList;
076 }
077
078
079
080
081 }