Package org.milyn.event.report

Examples of org.milyn.event.report.HtmlReportGenerator


        Source streamSource = new StreamSource(new InputStreamReader(dataStream, encoding));

        if(reportPath != null) {
            ExecutionContext execContext = smooks.createExecutionContext();

            execContext.setEventListener(new HtmlReportGenerator(reportPath));
            smooks.filterSource(execContext, streamSource);
        } else {
            smooks.filterSource(streamSource);           
        }
    }
View Full Code Here


        final String messageProfofile = (String) message.getProperties().getProperty(Properties.MESSAGE_PROFILE, defaultMessageProfile);
        final ExecutionContext executionContext = smooks.createExecutionContext(messageProfofile);

        if(reportPath != null) {
            try {
                executionContext.setEventListener(new HtmlReportGenerator(reportPath));
            } catch (IOException e) {
                throw new ActionProcessingException("Failed to create HtmlReportGenerator instance.", e);
            }
        }
View Full Code Here

    }
     
  ExecutionContext executionContext = smooks.createExecutionContext();
  // Configure the execution context to generate a report...
  if (this.getSmooksReport() != null) {
      executionContext.setEventListener(new HtmlReportGenerator(this.getSmooksReport()));
  }
  org.milyn.container.plugin.PayloadProcessor payloadProcessor = new PayloadProcessor(smooks, org.milyn.container.plugin.ResultType.JAVA);
  // smooks should return a map
  // TODO: verify with some unit tests
  return (Map<String, Object>) payloadProcessor.process(originalObjects, executionContext);
View Full Code Here

        Smooks smooks = new Smooks(getClass().getResourceAsStream("jndi-ds-lifecycle.xml"));

        ExecutionContext ec = smooks.createExecutionContext(profile);

        if (report) {
            ec.setEventListener(new HtmlReportGenerator("target/report/" + testName + ".html"));
        }

        smooks.filterSource(ec, source);
    }
View Full Code Here

        try {
            ExecutionContext executionContext = smooks.createExecutionContext();
            StringWriter writer = new StringWriter();

            // Configure the execution context to generate a report...
            executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));

            smooks.filterSource(executionContext, new StreamSource(new InputStreamReader(new ByteArrayInputStream(messageIn), "UTF-8")), new StreamResult(writer));

            return writer.toString();
        } finally {
View Full Code Here

        JavaResult javaResult = new JavaResult();
        ExecutionContext executionContext = smooks.createExecutionContext();

        if (reportPath != null) {
            executionContext.setEventListener(new HtmlReportGenerator(reportPath));
        }

        smooks.filterSource(executionContext, inputSource, javaResult);

        return javaResult.getBean(toType);
View Full Code Here

    ExecutionContext executionContext = descriptor.getSmooks().createExecutionContext();
        Map<Class<?>, Map<String, BeanWriter>> beanWriters = descriptor.getBeanWriters();
    BeanTracker beanTracker = new BeanTracker(beanWriters);

        if(reportPath != null) {
            executionContext.setEventListener(new HtmlReportGenerator(reportPath));           
        }

    executionContext.getBeanContext().addObserver(beanTracker);
   
    if(validate && descriptor.getSchema() != null) {
View Full Code Here

    String packagePath = ClassUtil.toFilePath(getClass().getPackage());
        Smooks smooks = new Smooks(packagePath + "/" + configFile);
        ExecutionContext executionContext = smooks.createExecutionContext();
       
        if(REPORT_EXECUTION) {
          executionContext.setEventListener(new HtmlReportGenerator("target/report/" + dataFile + "-" + configFile + "/index.html"));
        }
       
      String resource = StreamUtils.readStream(new InputStreamReader(getClass().getResourceAsStream(dataFile)));
      JavaResult result = new JavaResult();
View Full Code Here

    String packagePath = ClassUtil.toFilePath(getClass().getPackage());
        Smooks smooks = new Smooks(packagePath + "/" + configFile);
        ExecutionContext executionContext = smooks.createExecutionContext();
   
        if(REPORT_EXECUTION) {
          executionContext.setEventListener(new HtmlReportGenerator("target/report/" + dataFile + "-" + configFile + "/index.html"));
        }
       
      String resource = StreamUtils.readStream(new InputStreamReader(getClass().getResourceAsStream(dataFile)));
      JavaResult result = new JavaResult();
View Full Code Here

    return EntityInserterTest.class.getResourceAsStream(resource);
  }

  private void enableReporting(ExecutionContext executionContext, String reportFilePath) throws IOException {
    if(ENABLE_REPORTING) {
      executionContext.setEventListener(new HtmlReportGenerator("target/" + reportFilePath));
    }
  }
View Full Code Here

TOP

Related Classes of org.milyn.event.report.HtmlReportGenerator

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.