use of org.xwiki.job.event.status.JobStatus.State in project xwiki-platform by xwiki.
the class DistributionInternalScriptService method renderCurrentStepToXHTML.
public String renderCurrentStepToXHTML(String transformationId) {
DistributionJob job = this.distributionManager.getCurrentDistributionJob();
if (job != null) {
JobStatus jobStatus = job.getStatus();
if (jobStatus != null) {
State jobState = jobStatus.getState();
if (jobState == State.RUNNING || jobState == State.WAITING) {
Block block = job.getCurrentStep().executeInteractive();
WikiPrinter printer = new DefaultWikiPrinter();
this.xhtmlRenderer.render(block, printer);
return printer.toString();
}
}
}
return null;
}
Aggregations