/** * Similar to {@link #getTemplate(String, Locale, Object, String, boolean)} with {@code null} * {@code customLookupCondition}. * * @return {@link MaybeMissingTemplate#getTemplate()} of the * {@link #getTemplate(String, Locale, Object, String, boolean)} return value. * * @deprecated Use {@link #getTemplate(String, Locale, Object, String, boolean)}, which can return more detailed * result when the template is missing. */ @Deprecated public Template getTemplate(String name, Locale locale, String encoding, boolean parseAsFTL) throws IOException { return getTemplate(name, locale, null, encoding, parseAsFTL).getTemplate(); }
final MaybeMissingTemplate maybeTemp = cache.getTemplate(name, locale, customLookupCondition, encoding, parseAsFTL); final Template temp = maybeTemp.getTemplate(); if (temp == null) {
/** * Retrieves a template specified by a name and locale, interpreted using * the specified character encoding, either parsed or unparsed. For the * exact semantics of parameters, see * {@link TemplateCache#getTemplate(String, Locale, String, boolean)}. * @return the requested template. * @throws FileNotFoundException if the template could not be found. * @throws IOException if there was a problem loading the template. * @throws ParseException (extends <code>IOException</code>) if the template is syntactically bad. */ public Template getTemplate(String name, Locale locale, String encoding, boolean parse) throws IOException { Template result = cache.getTemplate(name, locale, encoding, parse); if (result == null) { throw new FileNotFoundException("Template " + name + " not found."); } return result; }
/** * Similar to {@link #getTemplate(String, Locale, Object, String, boolean)} with {@code null} * {@code customLookupCondition}. * * @return {@link MaybeMissingTemplate#getTemplate()} of the * {@link #getTemplate(String, Locale, Object, String, boolean)} return value. * * @deprecated Use {@link #getTemplate(String, Locale, Object, String, boolean)}, which can return more detailed * result when the template is missing. */ @Deprecated public Template getTemplate(String name, Locale locale, String encoding, boolean parseAsFTL) throws IOException { return getTemplate(name, locale, null, encoding, parseAsFTL).getTemplate(); }
/** * Similar to {@link #getTemplate(String, Locale, Object, String, boolean)} with {@code null} * {@code customLookupCondition}. * * @return {@link MaybeMissingTemplate#getTemplate()} of the * {@link #getTemplate(String, Locale, Object, String, boolean)} return value. * * @deprecated Use {@link #getTemplate(String, Locale, Object, String, boolean)}, which can return more detailed * result when the template is missing. */ @Deprecated public Template getTemplate(String name, Locale locale, String encoding, boolean parseAsFTL) throws IOException { return getTemplate(name, locale, null, encoding, parseAsFTL).getTemplate(); }
result = getTemplate(mainLoader, name, locale, encoding, parse);
final MaybeMissingTemplate maybeTemp = cache.getTemplate(name, locale, customLookupCondition, encoding, parseAsFTL); final Template temp = maybeTemp.getTemplate(); if (temp == null) {
final MaybeMissingTemplate maybeTemp = cache.getTemplate(name, locale, customLookupCondition, encoding, parseAsFTL); final Template temp = maybeTemp.getTemplate(); if (temp == null) {