Search in sources :

Example 6 with HtmlElementWriter

use of org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter in project camunda-bpm-platform by camunda.

the class SectionedHtmlReportBuilder method execute.

public String execute() {
    HtmlDocumentBuilder builder = new HtmlDocumentBuilder(new HtmlElementWriter("html"));
    addHtmlHead(builder);
    addHtmlBody(builder);
    return builder.endElement().getHtmlString();
}
Also used : HtmlElementWriter(org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter) HtmlDocumentBuilder(org.camunda.bpm.engine.impl.form.engine.HtmlDocumentBuilder)

Example 7 with HtmlElementWriter

use of org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter in project camunda-bpm-platform by camunda.

the class SectionedHtmlReportBuilder method addHtmlSection.

@SuppressWarnings("unchecked")
protected void addHtmlSection(HtmlDocumentBuilder builder, String title, Object section, int level) {
    // add heading
    builder.startElement(new HtmlElementWriter("h" + level).textContent(title)).endElement();
    if (section instanceof Map) {
        Map<String, Object> sections = (Map<String, Object>) section;
        addHtmlSections(builder, sections, level + 1);
    } else {
        TabularResultSet resultSet = (TabularResultSet) section;
        addHtmlTable(builder, resultSet);
    }
}
Also used : HtmlElementWriter(org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter) TabularResultSet(org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet) TreeMap(java.util.TreeMap) Map(java.util.Map)

Aggregations

HtmlElementWriter (org.camunda.bpm.engine.impl.form.engine.HtmlElementWriter)7 HtmlDocumentBuilder (org.camunda.bpm.engine.impl.form.engine.HtmlDocumentBuilder)5 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 TabularResultSet (org.camunda.bpm.qa.performance.engine.framework.aggregate.TabularResultSet)1