This adds a template name to the templates variable.

@param template The new template name.
@ibm-private-in-use
509595
public void addTemplate(String template) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  if (template != null && !template.equals("")) {
		  templates.add(template);
	  }
   }
1358594
public function addTemplate(Template $template)
    {
        $key = $this->normalizeKey($template->getTemplateName());
        $this->templates[$key] = $template;
    }
775708
public EvaluatedTemplate evaluateTemplate(String template, EvaluationContext context) {
        return evaluateTemplate(template, context, false);
    }
929371
public void registerTemplate(String name, ITemplate template) {
        if (null == template) throw new NullPointerException();
//        if (_templates.containsKey(name)) {
//            return false;
//        }
        _templates.put(name, template);
        return;
    }
651152
private void genInternalTemplateNameHelper() {
    Preconditions.checkState(id != null);
    // encode all the deltemplate information into the name to get a unique string
    // though... it might make more sense for this to not have a user visible name given that the
    // calling convention is indirect.
    String variant = "";
    if (delTemplateVariantExpr != null) {
      // this is hacky.  perhaps we should come up with a less ambiguous strategy
      ExprNode expr = delTemplateVariantExpr.getRoot();
      if (expr instanceof StringNode) {
        variant = ((StringNode) expr).getValue();
      } else {
        variant = expr.toSourceString();
      }
    }
    String generatedPartialTemplateName =
        partialDeltemplateTemplateName(
            delTemplateName, soyFileHeaderInfo.getDelPackageName(), variant);
    String generatedTemplateName = soyFileHeaderInfo.getNamespace() + generatedPartialTemplateName;
    setTemplateNames(generatedTemplateName, generatedPartialTemplateName);
  }
548939
boolean declareTemplateTypeName(String newTemplateTypeName) {
    lazyInitInfo();

    if (isTypeTransformationName(newTemplateTypeName) || hasTypedefType()) {
      return false;
    }
    if (info.templateTypeNames == null){
      info.templateTypeNames = new ArrayList<>();
    } else if (info.templateTypeNames.contains(newTemplateTypeName)) {
      return false;
    }

    info.templateTypeNames.add(newTemplateTypeName);
    return true;
  }
365466
public void updateDebugTemplate(String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
	if (!hasAccess) throw new SecurityException("no access to change debugging settings");

	Element debugging = _getRootElement("debugging");
	// if(template.trim().length()>0)
	debugging.setAttribute("template", template);
    }
8104
public final void setTemplate() {
        template = new HashMap();
        if (isEventExist()) {
            template.putAll(events.get(next));
        }
        template.put("event", eventType);
    }
543638
public function setTemplate($template)
    {
        $this->templatePath = $this->getTemplatesDirectory() . '/' . ltrim($template, '/');
        if (!file_exists($this->templatePath)) {
            throw new \RuntimeException('View cannot render template `' . $this->templatePath . '`. Template does not exist.');
        }
    }
1115954
protected function _setTemplate($template)
    {
        if ($template !== null && !($template instanceof TemplateInterface)) {
            throw $this->_createInvalidArgumentException($this->__('Invalid template'), null, null, $template);
        }

        $this->template = $template;
    }
1278546
public void generate( String templateName,
                          Row row ) {
        try {
            CompiledTemplate template = getTemplate( templateName );
            VariableResolverFactory factory = new MapVariableResolverFactory();
            Map<String, Object> vars = new HashMap<String, Object>();

            initializePriorCommaConstraints( vars );
            initializeHasPriorJunctionConstraint( vars );

            vars.put( "row",
                      row );

            for ( Cell cell : row.getCells() ) {
                cell.addValue( vars );
            }

            String drl = String.valueOf( TemplateRuntime.execute( template,
                                                                  vars,
                                                                  factory,
                                                                  registry ) );

            rules.add( drl );
        } catch ( Exception e ) {
            throw new RuntimeException( e );
        }
    }
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);
    }
63905
public void setTemplateVars(List<TemplateVar> templateVars) {
		this.templateVars.clear();
		if(templateVars != null && !templateVars.isEmpty()) {
			this.templateVars.addAll(templateVars);
		}
	}
788996
public Writer withTemplate(File template) {
        if (null == template || !template.exists()) {
            throw new IllegalArgumentException("template file not exist");
        }
        this.template = template;
        return this;
    }
931171
public function setTemplate($template)
    {
        $this->template = is_string($template) ? trim($template) : $template;

        return $this;
    }
829103
public Renderable<?> render(Template template, Object... parameters) {
        Map<String, Object> map = Maps.newHashMap();
        String key = null;
        for (Object parameter : parameters) {
            if (key == null) {
                if (!(parameter instanceof String)) {
                    throw new IllegalArgumentException("The template variable name " + parameter + " must be a string");
                } else {
                    key = (String) parameter;
                }
            } else {
                map.put(key, parameter);
                key = null;
            }
        }
        if (key != null) {
            throw new IllegalArgumentException("Illegal number of parameter, the variable " + key + " has no value");
        }
        return template.render(this, map);
    }
246997
public function registerTemplate($template)
    {
        $template = $this->normalizeTemplateDuringRegistration($template);

        $this->templates[$template['name']] = $template;

        $this->registerTemplateAliases($template, $template['aliases']);
    }