/** * Get template resource. * * @param name - template name * @return template resource * @throws IOException - If an I/O error occurs * @see #getEngine() */ public Resource getResource(String name) throws IOException { return getResource(name, null, null); }
/** * Get template resource. * * @param name - template name * @param encoding - template encoding * @return template resource * @throws IOException - If an I/O error occurs * @see #getEngine() */ public Resource getResource(String name, String encoding) throws IOException { return getResource(name, null, encoding); }
/** * Get template resource. * * @see #getEngine() * @param name - template name * @return template resource * @throws IOException - If an I/O error occurs */ public Resource getResource(String name) throws IOException { return getResource(name, null, null); }
/** * Get template resource. * * @param name - template name * @param locale - template locale * @return template resource * @throws IOException - If an I/O error occurs * @see #getEngine() */ public Resource getResource(String name, Locale locale) throws IOException { return getResource(name, locale, null); }
/** * Get template resource. * * @see #getEngine() * @param name - template name * @param encoding - template encoding * @return template resource * @throws IOException - If an I/O error occurs */ public Resource getResource(String name, String encoding) throws IOException { return getResource(name, null, encoding); }
/** * Get template resource. * * @see #getEngine() * @param name - template name * @param locale - template locale * @return template resource * @throws IOException - If an I/O error occurs */ public Resource getResource(String name, Locale locale) throws IOException { return getResource(name, locale, null); }
public Resource read(String name, Locale locale, String encoding) throws IOException { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException("display template name == null"); } Template template = Context.getContext().getTemplate(); if (template != null) { if (StringUtils.isEmpty(encoding)) { encoding = template.getEncoding(); } name = UrlUtils.relativeUrl(name, template.getName()); if (locale == null) { locale = template.getLocale(); } } return engine.getResource(name, locale, encoding); }
public Resource read(String name, Locale locale, String encoding) throws IOException { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException("display template name == null"); } Template template = Context.getContext().getTemplate(); if (template != null) { if (StringUtils.isEmpty(encoding)) { encoding = template.getEncoding(); } name = UrlUtils.relativeUrl(name, template.getName()); if (locale == null) { locale = template.getLocale(); } } return engine.getResource(name, locale, encoding); }
Resource resource = engine.getResource(file); if (properties.getLastModified() < resource.getLastModified()) { String encoding = (StringUtils.isEmpty(messageEncoding) ? "UTF-8" : messageEncoding);
Resource resource = engine.getResource(file); if (properties.getLastModified() < resource.getLastModified()) { String encoding = (StringUtils.isEmpty(messageEncoding) ? "UTF-8" : messageEncoding);