Package com.adito.vfs

Examples of com.adito.vfs.UploadManager


     * @param upload upload
     * @return id;
     */
    public static int addUpload(HttpSession session, UploadDetails upload) {
        synchronized (session) {
            UploadManager mgr = (UploadManager) session.getAttribute(Constants.UPLOAD_MANAGER);
            if (mgr == null) {
                mgr = new UploadManager();
                session.setAttribute(Constants.UPLOAD_MANAGER, mgr);
            }
            return mgr.addUpload(upload);
        }
    }
View Full Code Here


     * @param session session
     * @param uploadId upload id
     * @return removed upload details
     */
    public static UploadDetails removeUpload(HttpSession session, int uploadId) {
        UploadManager mgr = (UploadManager) session.getAttribute(Constants.UPLOAD_MANAGER);
        if (mgr != null) {
            UploadDetails details = mgr.removeUpload(uploadId);
            if (mgr.isEmpty()) {
                session.removeAttribute(Constants.UPLOAD_MANAGER);
            }
            return details;
        }
        return null;
View Full Code Here

     * @param session session
     * @param id
     * @return upload
     */
    public static UploadDetails getUpload(HttpSession session, int id) {
        UploadManager mgr = (UploadManager) session.getAttribute(Constants.UPLOAD_MANAGER);
        if (mgr != null) {
            return mgr.getUpload(id);
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.adito.vfs.UploadManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.