HtmlTag listItem = new HtmlTag("li");
listItem.getChildren().add(outcomeTargetLink);
unorderedList.getChildren().add(listItem);
}
Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
unorderedList.write(writer);
Map<Object, Object> context = CollectionUtils.newHashMap();
context.put("appName", StringUtils.uncamelCase(this.origin.getRootDirectory().getName()));
context.put("navigation", writer.toString().trim());
context.put("targetDir", targetDir);
if (this.navigationTemplate == null)
{
loadTemplates();
}
try
{
return ScaffoldUtil.createOrOverwrite((FileResource<?>) getTemplateStrategy()
.getDefaultTemplate(),
this.templateProcessor.processTemplate(context, navigationTemplate),
true);
}
finally
{
writer.close();
}
}