Examples of ReportProcessor


Examples of com.google.api.ads.adwords.awreporting.processors.ReportProcessor

          resource = new FileSystemResource(file);
        }
        DynamicPropertyPlaceholderConfigurer.setDynamicResource(resource);
        Properties properties = PropertiesLoaderUtils.loadProperties(resource);
       
        ReportProcessor processor = getApplicationContext().getBean(ReportProcessor.class);

        // Launching a new Service(Thread) to make the request async.
        RunnableReport runnableReport = new RunnableReport(topAccountId, processor, properties, dateStart, dateEnd);
       
        taskService.submit(runnableReport);
View Full Code Here

Examples of com.google.api.ads.adwords.awreporting.processors.ReportProcessor

      }

      Properties properties = initApplicationContextAndProperties(propertiesPath);

      LOGGER.debug("Creating ReportProcessor bean...");
      ReportProcessor processor = createReportProcessor();
      LOGGER.debug("... success.");

      String mccAccountId = properties.getProperty("mccAccountId").replaceAll("-", "");;

      if (cmdLine.hasOption("generatePdf")) {

        LOGGER.debug("GeneratePDF option detected.");

        // Get HTML template and output directory
        String[] pdfFiles = cmdLine.getOptionValues("generatePdf");
        File htmlTemplateFile = new File(pdfFiles[0]);
        File outputDirectory = new File(pdfFiles[1]);
        boolean sumAdExtensions = false;

        if (cmdLine.hasOption("sumAdExtensions")) {
          LOGGER.debug("sumAdExtensions option detected.");
          sumAdExtensions = true;
        }

        LOGGER.debug("Html template file to be used: " + htmlTemplateFile);
        LOGGER.debug("Output directory for PDF: " + outputDirectory);
       
        // Export Reports
        ReportExporterLocal reportExporter = createReportExporter();
        reportExporter.exportReports(
            createAuthenticator().getOAuth2Credential(null, mccAccountId, false),
            mccAccountId, cmdLine.getOptionValue("startDate"),
            cmdLine.getOptionValue("endDate"),
            processor.retrieveAccountIds(null, mccAccountId),
            properties, htmlTemplateFile,
            outputDirectory, sumAdExtensions);

      } else if (cmdLine.hasOption("startDate") && cmdLine.hasOption("endDate")) {
        // Generate Reports

        String dateStart = cmdLine.getOptionValue("startDate");
        String dateEnd = cmdLine.getOptionValue("endDate");

        LOGGER.info(
            "Starting report download for dateStart: " + dateStart + " and dateEnd: " + dateEnd);

        processor.generateReportsForMCC(null, mccAccountId, ReportDefinitionDateRangeType.CUSTOM_DATE, dateStart,
            dateEnd, accountIdsSet, properties, null, null);

      } else if (cmdLine.hasOption("dateRange")) {

        ReportDefinitionDateRangeType dateRangeType =
            ReportDefinitionDateRangeType.fromValue(cmdLine.getOptionValue("dateRange"));

        LOGGER.info("Starting report download for dateRange: " + dateRangeType.name());

        processor.generateReportsForMCC(null, mccAccountId, dateRangeType, null, null, accountIdsSet, properties, null, null);

      } else {
        errors = true;
        LOGGER.error("Configuration incomplete. Missing options for command line.");
      }
View Full Code Here

Examples of com.ipc.oce.ReportProcessor

    System.out.println(table.listColumns());
   
    OCStructure structure = app.newStructure();
    structure.insert("ТаблицаДанных", table);
   
    ReportProcessor rProc = app.getReportProcessor();
    OCReportManager manager = rProc.getReport("ДоходыРасходы");
   
   
    OCReportObject report = manager.create();
   
    OCDataCompositionSchema dataCompositionSchema = report.getDataCompositionSchema();
    for (OCDataCompositionSchemaDataSet object : dataCompositionSchema.getDataSets()) {
      System.out.println(object);
      System.out.println(object.getClass().getName());
      if (object instanceof OCDataCompositionSchemaDataSetObject) {
        OCDataCompositionSchemaDataSetObject dsObject = (OCDataCompositionSchemaDataSetObject)object;
        System.out.println(dsObject.getObjectName());
      }
    }
    OCDataCompositionSettings defaultSettings = dataCompositionSchema.getDefaultSettings();
   
    OCDataCompositionDetailsData details = rProc.createDetailsData();
   
    OCDataCompositionTemplateComposer templateComposer = rProc.createTemplateComposer();
   
    OCDataCompositionTemplate template = templateComposer.execute(dataCompositionSchema, defaultSettings, details);
   
    OCDataCompositionProcessor processor = rProc.createCompositionProcessor();
    processor.initialize(template, structure, details, true);
   
    OCDataCompositionResultSpreadsheetDocumentOutputProcessor spreadSheetProcessor = rProc.createDataCompositionResultSpreadsheetDocumentOutputProcessor();
    OCSpreadsheetDocument spreadsheetDocument = rProc.createSpreadsheetDocument();
    spreadsheetDocument.clear();
    spreadSheetProcessor.setDocument(spreadsheetDocument);
    spreadsheetDocument = spreadSheetProcessor.output(processor);
   
    //==================
View Full Code Here

Examples of com.ipc.oce.ReportProcessor

 
  @Ignore
  @Test
  public void generateReport02() throws JIException, ParseException {
   
    ReportProcessor rProc = app.getReportProcessor();
    OCReportManager manager = rProc.getReport("КарточкаУчетаПоСтраховымВзносам");
   
    OCReportObject report = manager.create();
   
   
    OCDataCompositionSchema dataCompositionSchema = report.getDataCompositionSchema();
    for (OCDataCompositionSchemaDataSet object : dataCompositionSchema.getDataSets()) {
      System.out.println("==========================" + object.toString());
      System.out.println(object.getClass().getName());
      if (object instanceof OCDataCompositionSchemaDataSetObject) {
        OCDataCompositionSchemaDataSetObject dsObject = (OCDataCompositionSchemaDataSetObject)object;
        System.out.println(dsObject.getObjectName());
      }
    }
    System.out.println("======= PARAMETERS =============");
    OCDataCompositionSchemaParameters parameters = dataCompositionSchema.getParameters()
    for (OCDataCompositionSchemaParameter param : parameters) {
      System.out.println(param.toString());
    }
   
    System.out.println("================================");
    OCDataCompositionSettings defaultSettings = dataCompositionSchema.getDefaultSettings();
   
    System.out.println(defaultSettings.showXML());
   
    OCDataCompositionDetailsData details = rProc.createDetailsData();
   
    OCDataCompositionTemplateComposer templateComposer = rProc.createTemplateComposer();
   
    OCDataCompositionTemplate template = templateComposer.execute(dataCompositionSchema, defaultSettings, details);
   
    OCDataCompositionProcessor processor = rProc.createCompositionProcessor();
    processor.initialize(template, null, details, true);
   
    OCDataCompositionResultSpreadsheetDocumentOutputProcessor spreadSheetProcessor = rProc.createDataCompositionResultSpreadsheetDocumentOutputProcessor();
    OCSpreadsheetDocument spreadsheetDocument = rProc.createSpreadsheetDocument();
    spreadsheetDocument.clear();
    spreadSheetProcessor.setDocument(spreadsheetDocument);
    spreadsheetDocument = spreadSheetProcessor.output(processor);
   
    spreadsheetDocument.writeTXT("C:\\Developer\\Temp\\testRTXT01.txt");
View Full Code Here

Examples of com.ipc.oce.ReportProcessor

  }
 
  @Test
  public void commonTemplate() throws JIException {

    ReportProcessor rp = app.getReportProcessor();
    CommonTemplate ct = rp.getCommonTemplate("ЗаголовокОтчета");
    System.out.println(ct);
    System.out.println(ct.getClass().getName());
   
  }
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter4.recipe11.task.ReportProcessor

    ReportRequest onlineRequest=new ReportRequest("Online", service);
    Thread faceThread=new Thread(faceRequest);
    Thread onlineThread=new Thread(onlineRequest);
   
    // Create a ReportSender object and a Thread to execute  it
    ReportProcessor processor=new ReportProcessor(service);
    Thread senderThread=new Thread(processor);
   
    // Start the Threads
    System.out.printf("Main: Starting the Threads\n");
    faceThread.start();
    onlineThread.start();
    senderThread.start();
   
    // Wait for the end of the ReportGenerator tasks
    try {
      System.out.printf("Main: Waiting for the report generators.\n");
      faceThread.join();
      onlineThread.join();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
   
    // Shutdown the executor
    System.out.printf("Main: Shuting down the executor.\n");
    executor.shutdown();
    try {
      executor.awaitTermination(1, TimeUnit.DAYS);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    // End the execution of the ReportSender
    processor.setEnd(true);
    System.out.printf("Main: Ends\n");

  }
View Full Code Here

Examples of com.vladium.emma.report.ReportProcessor

    }
    for (int i = 0; i < coveragefiles.length; i++) {
      datapath.add(coveragefiles[i].toOSString());
      monitor.worked(1);
    }
    ReportProcessor processor = ReportProcessor.create();
    processor.setDataPath((String[]) datapath.toArray(new String[0]));
    processor.setSourcePath((String[]) sourcepath.toArray(new String[0]));
    processor.setReportTypes(new String[] { DEFAULT_EXTENSIONS[format] });
    Properties props = new Properties(options);
    props.setProperty(PROP_OUT_FILE, destination);
    processor.setPropertyOverrides(props);
    processor.run();
    monitor.done();
  }
View Full Code Here

Examples of com.vladium.emma.report.ReportProcessor

    }
    for (int i = 0; i < coveragefiles.length; i++) {
      datapath.add(coveragefiles[i].toOSString());
      monitor.worked(1);
    }
    ReportProcessor processor = ReportProcessor.create();
    processor.setDataPath((String[]) datapath.toArray(new String[0]));
    processor.setSourcePath((String[]) sourcepath.toArray(new String[0]));
    processor.setReportTypes(new String[] { DEFAULT_EXTENSIONS[format] });
    Properties props = new Properties(options);
    props.setProperty(PROP_OUT_FILE, destination);
    processor.setPropertyOverrides(props);
    processor.run();
    monitor.done();
  }
View Full Code Here

Examples of com.vladium.emma.report.ReportProcessor

    }
    for (int i = 0; i < coveragefiles.length; i++) {
      datapath.add(coveragefiles[i].toOSString());
      monitor.worked(1);
    }
    ReportProcessor processor = ReportProcessor.create();
    processor.setDataPath((String[]) datapath.toArray(new String[0]));
    processor.setSourcePath((String[]) sourcepath.toArray(new String[0]));
    processor.setReportTypes(new String[] { DEFAULT_EXTENSIONS[format] });
    Properties props = new Properties(options);
    props.setProperty(PROP_OUT_FILE, destination);
    props.setProperty(PROP_OUT_ENCODING, OUTPUT_ENCODING);
    processor.setPropertyOverrides(props);
    processor.run();
    monitor.done();
  }
View Full Code Here

Examples of com.vladium.emma.report.ReportProcessor

        properties.setProperty( "report.sort", "+name,+block,+method,+class" );
        properties.setProperty( "report.out.encoding", "UTF-8" );
        properties.setProperty( "report.xml.out.encoding", "UTF-8" );
        properties.setProperty( "report.html.out.encoding", "UTF-8" );

        ReportProcessor reporter = ReportProcessor.create();
        reporter.setAppName( IAppConstants.APP_NAME );
        reporter.setDataPath( PathUtil.paths( coverageFile ) );
        reporter.setSourcePath( PathUtil.paths( request.getSourcePaths() ) );
        try
        {
            reporter.setReportTypes( request.getFormats().toArray( new String[0] ) );
        }
        catch ( RuntimeException e )
        {
            throw new CoverageReportException( "Unsupported report format: " + request.getFormats(), e );
        }
        reporter.setPropertyOverrides( properties );

        reporter.run();
    }
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.