Examples of JrxmlFileUploaderClient


Examples of org.wso2.carbon.reporting.ui.client.JrxmlFileUploaderClient

                                                          webContext +
                                                          "/create-reports/list-reports.jsp");

            return false;
        }
        JrxmlFileUploaderClient uploaderClient = new JrxmlFileUploaderClient(cookie, serverURL,
                                                                             configurationContext);
        List<FileItemData> fileItems = fileItemsMap.get("upload");
        String errorRedirect = null;

        try {
            for (FileItemData fileItem : fileItems) {
                String filename = getFileName(fileItem.getFileItem().getName());
                try {
                    checkServiceFileExtensionValidity(filename, ALLOWED_FILE_EXTENSIONS);
                } catch (FileUploadException e) {
                    log.error("Failed to validate format of file : " +filename ,e);
                    throw e;
                }
                if (!filename.endsWith(".jrxml")) {
                    throw new CarbonException("File with extension " +
                                              getFileName(fileItem.getFileItem().getName())
                                              + " is not supported!");
                }
                String uploadStatue = uploaderClient.uploadJrxmlFile(filename.split(".jrxml")[0], fileItem.getFileItem().getString());
                if(uploadStatue.equals("success")){
                    status=true;
                }
                response.setContentType("text/html; charset=utf-8");
                String msg = "Successfully uploaded jrxml 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.