Package org.jboss.seam.wiki.core.upload.handler

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

Related Classes of org.jboss.seam.wiki.core.upload.handler.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.