本文整理汇总了Java中org.apache.commons.jelly.XMLOutput类的典型用法代码示例。如果您正苦于以下问题:Java XMLOutput类的具体用法?Java XMLOutput怎么用?Java XMLOutput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XMLOutput类属于org.apache.commons.jelly包,在下文中一共展示了XMLOutput类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: writeLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
/**
* Used from <tt>console.jelly</tt> to write annotated log to the given output.
*
*/
public void writeLogTo(long offset, XMLOutput out) throws IOException {
try {
getLogText().writeHtmlTo(offset, out.asWriter());
} catch (IOException e) {
// try to fall back to the old getLogInputStream()
// mainly to support .gz compressed files
// In this case, console annotation handling will be turned off.
InputStream input = getLogInputStream();
try {
IOUtils.copy(input, out.asWriter());
} finally {
IOUtils.closeQuietly(input);
}
}
}
开发者ID:jenkinsci,项目名称:deployer-framework-plugin,代码行数:20,代码来源:DeployNowRunAction.java
示例2: generateHtmlReport
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
private void generateHtmlReport(File checkmarxBuildDir, CxScanResult cxScanResult) {
jobConsoleLogger.info("Generating HTML report");
try {
//create output file report.html
File reportFile = new File(checkmarxBuildDir, "report.html");
OutputStream output = new FileOutputStream(reportFile);
XMLOutput xmlOutput = XMLOutput.createXMLOutput(output);
//jelly template file to set vars in
InputSource jellyTemplate = new InputSource(this.getClass().getClassLoader().getResourceAsStream("com/checkmarx/jenkins/CxScanResult/summary.jelly"));
//create jelly context for setting variables
JellyContext context = new JellyContext();
context.setVariable("it", cxScanResult);
context.setVariable("app", Jenkins.getInstance());
//run script
context.runScript(jellyTemplate, xmlOutput);
xmlOutput.flush();
jobConsoleLogger.info("HTML report created successfully");
} catch (Exception e) {
jobConsoleLogger.error("Failed to generate HTML report", e);
}
}
开发者ID:jenkinsci,项目名称:checkmarx-plugin,代码行数:28,代码来源:CxScanBuilder.java
示例3: writeLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
public void writeLogTo(long offset, XMLOutput out) throws IOException {
try {
obtainLog().writeHtmlTo(offset, out.asWriter());
} catch (IOException e) {
// try to fall back to the old getLogInputStream()
// mainly to support .gz compressed files
// In this case, console annotation handling will be turned off.
InputStream input = getLogInputStream();
try {
IOUtils.copy(input, out.asWriter());
} finally {
IOUtils.closeQuietly(input);
}
}
}
开发者ID:jenkinsci,项目名称:docker-build-step-plugin,代码行数:16,代码来源:DockerContainerConsoleAction.java
示例4: getHtml
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
public String getHtml(ProjectConfigInfo projectConfigInfo) throws IOException, ClassNotFoundException, JellyException {
String name = getClass().getName().replace('.', '/').replace('$', '/') + "/" + "index.jelly";
URL actionTemplate = getClass().getClassLoader().getResource(name);
JellyContext context = new JellyContext();
context.setVariable("p", projectConfigInfo);
context.setVariable("it", this);
OutputStream outputStream = new ByteArrayOutputStream();
XMLOutput output = XMLOutput.createXMLOutput(outputStream);
context.runScript(actionTemplate, output);
output.flush();
return "<p>" + outputStream.toString() + " </p>";
}
开发者ID:groupon,项目名称:DotCi,代码行数:13,代码来源:GithubRepoAction.java
示例5: writeLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
@Override
public void writeLogTo(long offset, XMLOutput out) throws IOException {
initPython();
if (pexec.isImplemented(50)) {
pexec.execPythonVoid("write_log_to", DataConvertor.fromLong(offset), out);
} else {
super.writeLogTo(offset, out);
}
}
开发者ID:conyx,项目名称:jenkins.py,代码行数:10,代码来源:RunPW.java
示例6: writePollingLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
/**
* Writes the annotated log to the given output.
*/
public void writePollingLogTo(XMLOutput out) throws IOException {
new AnnotatedLargeText<>(getPollingLogFile(), Charset.defaultCharset(), true, this).writeHtmlTo(0, out.asWriter());
}
开发者ID:KostyaSha,项目名称:github-integration-plugin,代码行数:7,代码来源:GitHubPollingLogAction.java
示例7: superWriteLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
public void superWriteLogTo(long offset, XMLOutput out) throws IOException {
super.writeLogTo(offset, out);
}
开发者ID:conyx,项目名称:jenkins.py,代码行数:4,代码来源:RunPW.java
示例8: writeLogTo
import org.apache.commons.jelly.XMLOutput; //导入依赖的package包/类
/**
* Writes the annotated log to the given output.
*
* @param out XML output
* @throws IOException pudh up stack
*/
public void writeLogTo(XMLOutput out) throws IOException {
new AnnotatedLargeText<P4TriggerAction>(getLogFile(job), Charset.defaultCharset(), true, this).writeHtmlTo(0,
out.asWriter());
}
开发者ID:p4paul,项目名称:p4-jenkins,代码行数:11,代码来源:P4Trigger.java
注:本文中的org.apache.commons.jelly.XMLOutput类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论