/** * Gets a template for importing; used with {@link #importLib(Template importedTemplate, String namespace)}. The * advantage over simply using <code>config.getTemplate(...)</code> is that it chooses the encoding as the * <code>import</code> directive does. * * @param name * the name of the template, relatively to the template root directory (not the to the directory of the * currently executing template file!). (Note that you can use * {@link freemarker.cache.TemplateCache#getFullTemplatePath} to convert paths to template root relative * paths.) */ public Template getTemplateForImporting(String name) throws IOException { return getTemplateForInclusion(name, null, true); }
/** * Same as {@link #getTemplateForInclusion(String, String, boolean, boolean)} with {@code false} * {@code ignoreMissing} argument. */ public Template getTemplateForInclusion(String name, String encoding, boolean parse) throws IOException { return getTemplateForInclusion(name, encoding, parse, false); }
/** * Emulates <code>include</code> directive, except that <code>name</code> must be template root relative. * * <p> * It's the same as <code>include(getTemplateForInclusion(name, encoding, parse))</code>. But, you may want to * separately call these two methods, so you can determine the source of exceptions more precisely, and thus achieve * more intelligent error handling. * * @see #getTemplateForInclusion(String name, String encoding, boolean parse) * @see #include(Template includedTemplate) */ public void include(String name, String encoding, boolean parse) throws IOException, TemplateException { include(getTemplateForInclusion(name, encoding, parse)); }
template = env.getTemplateForInclusion(absTemplateName, encoding, parse, true); } catch (IOException e) { throw new _TemplateModelException(
includedTemplate = env.getTemplateForInclusion(fullIncludedTemplateName, encoding, parse, ignoreMissing); } catch (IOException e) { throw new _MiscTemplateException(e, env,
/** * Same as {@link #getTemplateForInclusion(String, String, boolean, boolean)} with {@code false} * {@code ignoreMissing} argument. */ public Template getTemplateForInclusion(String name, String encoding, boolean parse) throws IOException { return getTemplateForInclusion(name, encoding, parse, false); }
/** * Same as {@link #getTemplateForInclusion(String, String, boolean, boolean)} with {@code false} * {@code ignoreMissing} argument. */ public Template getTemplateForInclusion(String name, String encoding, boolean parse) throws IOException { return getTemplateForInclusion(name, encoding, parse, false); }
/** * Gets a template for importing; used with {@link #importLib(Template importedTemplate, String namespace)}. The * advantage over simply using <code>config.getTemplate(...)</code> is that it chooses the encoding as the * <code>import</code> directive does. * * @param name * the name of the template, relatively to the template root directory (not the to the directory of the * currently executing template file!). (Note that you can use * {@link freemarker.cache.TemplateCache#getFullTemplatePath} to convert paths to template root relative * paths.) */ public Template getTemplateForImporting(String name) throws IOException { return getTemplateForInclusion(name, null, true); }
/** * Gets a template for importing; used with {@link #importLib(Template importedTemplate, String namespace)}. The * advantage over simply using <code>config.getTemplate(...)</code> is that it chooses the encoding as the * <code>import</code> directive does. * * @param name * the name of the template, relatively to the template root directory (not the to the directory of the * currently executing template file!). (Note that you can use * {@link freemarker.cache.TemplateCache#getFullTemplatePath} to convert paths to template root relative * paths.) */ public Template getTemplateForImporting(String name) throws IOException { return getTemplateForInclusion(name, null, true); }
/** * Gets a template for importing; used with * {@link #importLib(Template importedTemplate, String namespace)}. The advantage * over simply using <code>config.getTemplate(...)</code> is that it chooses the encoding * as the <code>import</code> directive does. * * @param name the name of the template, relatively to the template root directory * (not the to the directory of the currently executing template file!). * (Note that you can use {@link freemarker.cache.TemplateCache#getFullTemplatePath} * to convert paths to template root relative paths.) */ public Template getTemplateForImporting(String name) throws IOException { return getTemplateForInclusion(name, null, true); }
/** * Emulates <code>include</code> directive, except that <code>name</code> must be tempate * root relative. * * <p>It's the same as <code>include(getTemplateForInclusion(name, encoding, parse))</code>. * But, you may want to separately call these two methods, so you can determine the source of * exceptions more precisely, and thus achieve more intelligent error handling. * * @see #getTemplateForInclusion(String name, String encoding, boolean parse) * @see #include(Template includedTemplate) */ public void include(String name, String encoding, boolean parse) throws IOException, TemplateException { include(getTemplateForInclusion(name, encoding, parse)); }
/** * Emulates <code>include</code> directive, except that <code>name</code> must be template root relative. * * <p> * It's the same as <code>include(getTemplateForInclusion(name, encoding, parse))</code>. But, you may want to * separately call these two methods, so you can determine the source of exceptions more precisely, and thus achieve * more intelligent error handling. * * @see #getTemplateForInclusion(String name, String encoding, boolean parse) * @see #include(Template includedTemplate) */ public void include(String name, String encoding, boolean parse) throws IOException, TemplateException { include(getTemplateForInclusion(name, encoding, parse)); }
/** * Emulates <code>include</code> directive, except that <code>name</code> must be template root relative. * * <p> * It's the same as <code>include(getTemplateForInclusion(name, encoding, parse))</code>. But, you may want to * separately call these two methods, so you can determine the source of exceptions more precisely, and thus achieve * more intelligent error handling. * * @see #getTemplateForInclusion(String name, String encoding, boolean parse) * @see #include(Template includedTemplate) */ public void include(String name, String encoding, boolean parse) throws IOException, TemplateException { include(getTemplateForInclusion(name, encoding, parse)); }
Template template = env.getTemplateForInclusion( svInfo.getTemplateName(), null, true); env.include(template);
includedTemplate = env.getTemplateForInclusion(fullIncludedTemplateName, encoding, parse, ignoreMissing); } catch (IOException e) { throw new _MiscTemplateException(e, env,
includedTemplate = env.getTemplateForInclusion(fullIncludedTemplateName, encoding, parse, ignoreMissing); } catch (IOException e) { throw new _MiscTemplateException(e, env,
template = env.getTemplateForInclusion(absTemplateName, encoding, parse, true); } catch (IOException e) { throw new _TemplateModelException(
template = env.getTemplateForInclusion(absTemplateName, encoding, parse, true); } catch (IOException e) { throw new _TemplateModelException(
try { templateNameString = TemplateCache.getFullTemplatePath(env, templatePath, templateNameString); includedTemplate = env.getTemplateForInclusion(templateNameString, enc, parse);