Get template information
@param template template name
@throws IOException
518536
public JsonResponse getTemplate(String template) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Template.PARAM_TEMPLATE, template);
        return apiGet(ApiAction.template, data);
    }
400659
protected String mergeTemplate (String template, Map<String, Object> data)
        throws IOException
    {
        Reader reader =
            new InputStreamReader(getClass().getClassLoader().getResourceAsStream(template), UTF_8);
        return convertEols(Mustache.compiler().escapeHTML(false).compile(reader).execute(data));
    }
509595
public void addTemplate(String template) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  if (template != null && !template.equals("")) {
		  templates.add(template);
	  }
   }
323944
def get_template(self, template_name, **parameters):
        """"""
        template_path = pathlib.Path(self.template_dir).joinpath(template_name)
        return get_template(template_path, **parameters)
111254
public synchronized List<VariableDescription> getUsedVariableDescriptions(String template) {
		Template templateImpl = getTemplate(template, null);
		return templateImpl.getUsedVariableDescriptions();
	}
1113408
public T getTemplateFromCache(String filename) {

        LRUCache.CacheEntry<String, T> cachedTemplate = cache.get(filename);

        // this is to avoid null pointer exception in case of the layout composite template
        if (cachedTemplate == null) {
            return null;
        }

        return cachedTemplate.compiled;
    }
264266
private void generate(TemplateFile input, List<OutputFile> outputs, TemplateOptions templateOptions) throws IOException {
    final String targetFileName = targetFileName(templatesPath.relativize(input.path).toString(), templateOptions);
    final OutputFile output = new OutputFile(outputPath.resolve(targetFileName).toAbsolutePath().normalize());

    if (incremental &&
        Files.exists(output.path) &&
        Files.getLastModifiedTime(output.path).toMillis() >= Files.getLastModifiedTime(input.path).toMillis()) {
      // No need to re-render but mark as generated.
      output.upToDate = true;
      outputs.add(output);
      return;
    }

    String template = new String(Files.readAllBytes(input.path), StandardCharsets.UTF_8);

    timeVelocity.start();
    template = filterVelocity(input, template, templateOptions);
    timeVelocity.stop();

    // Check if template requested ignoring a given type combination.
    if (templateOptions.isIgnored()) {
      return;
    }

    getLog().debug("Processing: " + input.getFileName() + " => " + output.path);
    try {
      timeIntrinsics.start();
      template = filterIntrinsics(template, templateOptions);
      timeIntrinsics.stop();
  
      timeComments.start();
      template = filterComments(template);
      timeComments.stop();
  
      timeTypeClassRefs.start();
      template = filterTypeClassRefs(template, templateOptions);
      template = filterStaticTokens(template, templateOptions);
      timeTypeClassRefs.stop();
    } catch (RuntimeException e) {
      getLog().error("Error processing: " + input.getFileName() + " => " + output.path + ":\n\t" + e.getMessage());
      throw e;
    }

    Files.createDirectories(output.path.getParent());
    Files.write(output.path, template.getBytes(StandardCharsets.UTF_8));

    outputs.add(output);
  }
1215103
public static String readTemplate(String root, String template) throws IOException {
		if (root == null) {
			return readTemplate(template);
		}
		String settingsFile = root + "/" + Defaults.TemplateDir + "/" + template + Defaults.JsonFileExtension;
		return readFileFromClasspath(settingsFile);
	}
1186856
@Override
	public Template getTemplate(String resource) {
		if(ObjectUtil.equal(ResourceMode.STRING, this.resourceMode)) {
			return EnjoyTemplate.wrap(this.engine.getTemplateByString(resource));
		}
		return EnjoyTemplate.wrap(this.engine.getTemplate(resource));
	}
1064431
public void addTemplate( String templateName, URLTemplate template )
    {
        if ( templateName == null || templateName.length() == 0 )
        {
            throw new IllegalArgumentException( "Template name cannot be null or empty." );
        }

        if ( template == null )
        {
            throw new IllegalArgumentException( "URLTemplate cannot be null." );
        }

        _templates.put( templateName, template );
    }
1124661
private List<OutputFile> processTemplates(List<TemplateFile> inputs) throws IOException {
    List<OutputFile> outputs = new ArrayList<>();
    for (TemplateFile f : inputs) {
      String fileName = f.getFileName();
      if (!fileName.contains("VType") && fileName.contains("KType")) {
        for (Type ktype : Type.values()) {
          TemplateOptions options = new TemplateOptions(ktype);
          options.templateFile = f.path;
          generate(f, outputs, options);
        }
      }
      if (fileName.contains("KTypeVType")) {
        for (Type ktype : Type.values()) {
          for (Type vtype : Type.values()) {
            TemplateOptions options = new TemplateOptions(ktype, vtype);
            options.templateFile = f.path;
            generate(f, outputs, options);
          }
        }
      }
    }
    return outputs;
  }
1285224
public void readWMF(PdfTemplate template) throws IOException, DocumentException {
        setTemplateData(template);
        template.setWidth(getWidth());
        template.setHeight(getHeight());
        InputStream is = null;
        try {
            if (rawData == null){
                is = url.openStream();
            }
            else{
                is = new java.io.ByteArrayInputStream(rawData);
            }
            MetaDo meta = new MetaDo(is, template);
            meta.readAll();
        }
        finally {
            if (is != null) {
                is.close();
            }
        }
    }
507114
public Response andTemplate(String template) {
        Objects.requireNonNull(template, Required.TEMPLATE.toString());
        this.template = template;

        return this;
    }
62927
public static HttpTemplate template(TemplateType type, String template) {
        return new HttpTemplate(type).withTemplate(template);
    }
96644
public static PredicateTemplate predicateTemplate(String template, List<?> args) {
        return predicateTemplate(TemplateFactory.DEFAULT.create(template), args);
    }
311168
public OvhTemplateModem templateModem_name_GET(String name) throws IOException {
		String qPath = "/xdsl/templateModem/{name}";
		StringBuilder sb = path(qPath, name);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTemplateModem.class);
	}
111602
public void registerTemplate(ITemplate template) {
        //TemplateResourceManager rm = resourceManager();
        String name;
        if (template instanceof JavaTagBase) {
            name = template.__getName();
        } else {
            name = template.__getTemplateClass(false).getTagName();
        }
        registerTemplate(name, template);
    }