Examples of UploadHandler


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

Examples of com.adito.core.UploadHandler

        }
        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

Examples of org.jboss.seam.wiki.core.upload.handler.UploadHandler

        this.upload = instance;
        if (!validateData()) return null;
        resolveContentType();

        UploadType newUploadType = uploadTypes.get(contentType);
        UploadHandler newupUploadHandler =
                newUploadType != null
                ? newUploadType.getUploadHandler()
                : uploadTypes.get(UploadTypes.GENERIC_UPLOAD_TYPE).getUploadHandler();

        if (forceSameHandler) {
            log.debug("using same upload handler as for the original, based on content type: " + instance.getContentType());
            UploadHandler previousUploadHandler;
            UploadType previousUploadType = uploadTypes.get(instance.getContentType());
            previousUploadHandler =
                    previousUploadType != null
                    ? previousUploadType.getUploadHandler()
                    : uploadTypes.get(UploadTypes.GENERIC_UPLOAD_TYPE).getUploadHandler();
            if (!previousUploadHandler.getClass().equals(newupUploadHandler.getClass())) {
                statusMessages.addFromResourceBundleOrDefault(
                    ERROR,
                    "lacewiki.msg.upload.HandlersDontMatch",
                    "Wrong file type uploaded, please try again with a different file."
                );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.