Package org.saiku.web.rest.resources

Examples of org.saiku.web.rest.resources.ExporterResource


     
      filename = filename + date;
     
      String mimeType = "text/plain";

      ExporterResource ex = (ExporterResource) appContext.getBean("exporterBean");
      if (ex != null) {
        String solution = requestParams.getStringParameter("solution", null);
        String path = requestParams.getStringParameter("path", null);
        String action = requestParams.getStringParameter("action", null);
        String schedule = requestParams.getStringParameter("schedule", null);
       
       
        if (schedule != null) {
          return;
        }

        String file = (solution != null ? solution + "/" : "")
            + (path != null  ? (path + "/") : "")
            + (action != null ? action : "");

        //      String exportType = requestParams.getStringParameter("export", null);
        String exportType = "XLS";
        try {
          Thread.currentThread().setContextClassLoader(tempLoader);
          Response r = null;

          if (exportType == null || "XLS".equals(exportType.toUpperCase())) {
            r = ex.exportExcel(file, null, null);
            mimeType = "application/vnd.ms-excel";
            filename += ".xls";
           
          } else if ("CSV".equals(exportType.toUpperCase())) {
            r = ex.exportCsv(file, null, null);
            mimeType = "application/csv";
            filename += ".csv";
          }
          setInstanceId(filename);
         
View Full Code Here

TOP

Related Classes of org.saiku.web.rest.resources.ExporterResource

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.