Package com.adito.core

Examples of com.adito.core.UploadHandler


            throw new Exception("No file upload details configured for upload id " + uploadId + ".");
        }
        int sessionTimeoutBlockId = LogonControllerFactory.getInstance().addSessionTimeoutBlock(request.getSession(),
            "Upload request.");
        try {
            UploadHandler handler = UploadHandlerFactory.getInstance().getUploader(upload.getType());
            if (handler == null) {
                throw new Exception("No handler for upload type " + upload.getType());
            }
            request.setAttribute(Constants.REQ_ATTR_UPLOAD_DETAILS, new Integer(uploadId));
           
            boolean isFileExist = handler.checkFileToUpload(request, response, upload, uploadForm.getUploadFile());
            if (isFileExist) {
                request.getSession().setAttribute("uploadForm", uploadForm);
                return new ActionForward("/confirmFileUpload.do?arg0=" + uploadForm.getUploadFile().getFileName());
            } else {
                return confirmUpload(mapping, form, request, response);
View Full Code Here


        }
        int sessionTimeoutBlockId = LogonControllerFactory.getInstance().addSessionTimeoutBlock(request.getSession(),
            "Upload request.");
       
        try {
            UploadHandler handler = UploadHandlerFactory.getInstance().getUploader(upload.getType());
            if (handler == null) {
                throw new Exception("No handler for upload type " + upload.getType());
            }
            request.setAttribute(Constants.REQ_ATTR_UPLOAD_DETAILS, new Integer(uploadId));

            ActionForward fwd = handler.performUpload(request, response, upload, uploadForm.getUploadFile());
            ActionMessages msgs = new ActionMessages();
            if(upload.getResourcePath()==null) {
                msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("vfs", "upload.info.fileUploadedNoPath", uploadForm.getUploadFile()
                        .getFileName()));
            } else {
View Full Code Here

TOP

Related Classes of com.adito.core.UploadHandler

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.