1 19 20 package com.sslexplorer.vfs; 21 22 import java.util.HashMap ; 23 import java.util.Map ; 24 25 import com.sslexplorer.core.CoreUtil; 26 import com.sslexplorer.vfs.actions.ShowUploadAction; 27 28 29 44 public class UploadManager { 45 46 private Map uploads = new HashMap (); 48 private int id = 0; 49 50 56 public synchronized int addUpload(UploadDetails upload) { 57 id++; 58 uploads.put(new Integer (id), upload); 59 return id; 60 } 61 62 68 public UploadDetails removeUpload(int id) { 69 return (UploadDetails)uploads.remove(new Integer (id)); 70 } 71 72 79 public UploadDetails getUpload(int id) { 80 return (UploadDetails)uploads.get(new Integer (id)); 81 } 82 83 88 public boolean isEmpty() { 89 return uploads.size() == 0; 90 } 91 92 } 93 | Popular Tags |