return templateName;
}
protected void processTemplate(final AnnotationWebScriptRequest request, final Map<String, Object> model, final int status,
final WebScriptResponse response, ResolutionParameters params) throws IOException {
final TemplateProcessor templateProcessor = getTemplateProcessor(request);
final String format = request.getFormat();
String templateName = getTemplate();
if (StringUtils.hasText(templateName) == false) {
templateName = generateTemplateName(templateProcessor, format, status, params);
}
if (templateProcessor.hasTemplate(templateName)) {
response.setContentType(Format.valueOf(format.toUpperCase()).mimetype());
response.setContentEncoding("utf-8");
addCacheControlHeaders(response, params);
templateProcessor.process(templateName, model, response.getWriter());
} else {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
response.getWriter().write(String.format("Could not find template: %s", templateName));
}
}