Gets the metadata template of specified template type.
@param api the API connection to be used.
@param templateName the metadata template type name.
@return the metadata template returned from the server.
181689
public static MetadataTemplate getMetadataTemplate(BoxAPIConnection api, String templateName) {
        String scope = scopeBasedOnType(templateName);
        return getMetadataTemplate(api, templateName, scope);
    }
348704
public Template getTemplate(String name, Locale locale, Object args) throws IOException, ParseException {
        if (args instanceof String)
            return getTemplate(name, locale, (String) args);
        return getTemplate(name, locale, null, args);
    }
1340512
async function getTemplate(templatesList, templateName = null) {
  if (!templateName) {
    const templatesArray = Object.entries(templatesList).map(([name, value]) => ({ name, value }))
    const { template } = await inquirer.prompt(templateQuestions.template(templatesArray))
    return template
  }
  if (templateName in templatesList) {
    return templatesList[templateName]
  }
  throw Error(`The template '${templateName}' does't exists`)
}
388991
def _get_template(self, root=None, **metadata_defaults):
        

        if root is None:
            if self._data_map is None:
                self._init_data_map()

            root = self._xml_root = self._data_map['_root']

        template_tree = self._xml_tree = create_element_tree(root)

        for prop, val in iteritems(metadata_defaults):
            path = self._data_map.get(prop)
            if path and val:
                setattr(self, prop, val)
                update_property(template_tree, None, path, prop, val)

        return template_tree
1201722
public BoxRequestsMetadata.GetItemMetadata getFolderMetadataRequest(String id, String template) {
        BoxRequestsMetadata.GetItemMetadata request = new BoxRequestsMetadata.GetItemMetadata(getFolderMetadataUrl(id, template), mSession);
        return request;
    }
532426
def _get_template(querystring_key, mapping):
    """"""
    default = None
    try:
        template_and_keys = mapping.items()
    except AttributeError:
        template_and_keys = mapping
    for template, key in template_and_keys:
        if key is None:
            key = PAGE_LABEL
            default = template
        if key == querystring_key:
            return template
    return default
1178302
public Template getAjaxTemplate(String key, String ajaxId, ResourceLoader loader)
	{
		Template template = this.getTemplateByLoader(key, loader,true);
		template.ajaxId = ajaxId;
		return template;
	}
341957
def get_template(self, template_name):
        """"""
        try:
            return self.loader.load(template_name, encoding=self.encoding)
        except self.not_found_exception, e:
            # catch the exception raised by Genshi, convert it into a werkzeug
            # exception (for the sake of consistency)
            raise TemplateNotFound(template_name)
765035
private DOMNode getExistingTemplate(final String name) {

		try (final Tx tx = app.tx()) {

			return Importer.findSharedComponentByName(name);

		} catch (FrameworkException fex) {
			logger.warn("Unable to determine if template {} already exists, ignoring.", name);
		}

		return null;
	}
677875
private Map<String, TemplateSourceInfo> retrieveTemplateMap() {
        Map<String, TemplateSourceInfo> templateMap = 
        	new TreeMap<String, TemplateSourceInfo>();
        
        String remoteSource = mRemoteSourceDir;
        if (!remoteSource.endsWith("/")) {
            remoteSource = remoteSource + "/";
        }
        
        try {
            HttpClient tsClient = getTemplateServerClient(remoteSource);

            HttpClient.Response response = tsClient.setURI(createTemplateServerRequest(remoteSource,null))
                .setPersistent(true).getResponse(); 

            if (response != null && response.getStatusCode() == 200) {

                Reader rin = new InputStreamReader
                    (new BufferedInputStream(response.getInputStream()));
            
                StreamTokenizer st = new StreamTokenizer(rin);
                st.resetSyntax();
                st.wordChars('!','{');
                st.wordChars('}','}');
                st.whitespaceChars(0,' ');
                st.parseNumbers();
                st.quoteChar('|');
                st.eolIsSignificant(true);
                String templateName = null; 
                int tokenID = 0;
                // ditching the headers by looking for "\r\n\r\n"
                /* 
                 * no longer needed now that HttpClient is being used but leave
                 * in for the moment.
                 *
                 * while (!((tokenID = st.nextToken()) == StreamTokenizer.TT_EOL 
                 *       && st.nextToken() == StreamTokenizer.TT_EOL) 
                 *       && tokenID != StreamTokenizer.TT_EOF) {
                 * }
                 */
                while ((tokenID = st.nextToken()) != StreamTokenizer.TT_EOF) {
                    if (tokenID == '|' || tokenID == StreamTokenizer.TT_WORD) {
                    
                        templateName = st.sval;
                    }
                    else if (tokenID == StreamTokenizer.TT_NUMBER 
                             && templateName != null) {
                        templateName = templateName.substring(1);
                        //System.out.println(templateName);
                        templateMap.put(templateName.replace('/','.'),
                                        new TemplateSourceInfo(
                                                               templateName,
                                                               remoteSource,
                                                               (long)st.nval));
                        templateName = null;
                    }
                }
            }
        }
        catch (IOException ioe) {
            ioe.printStackTrace();
        }

        return templateMap;
    }
1008878
public ApiResponse<Templates> deleteTemplatesWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = deleteTemplatesValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<Templates>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
717541
@JsonIgnore
	public HalFormsTemplate getTemplate(String key) {

		Assert.notNull(key, "Template key must not be null!");

		return this.templates.get(key);
	}
356936
public JsonResponse deleteTemplate(String template) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Template.PARAM_TEMPLATE, template);
        return apiDelete(ApiAction.template, data);
    }
1054351
@Override
    public String getTemplateURI(GroovyObject controller, String templateName) {
        return getTemplateURI(getLogicalControllerName(controller), templateName);
    }
1314718
public Template getTemplate(final String parentName, final String name) throws ResourceNotFoundException {
        return getTemplate(this.loader.concat(parentName, name));
    }
62927
public static HttpTemplate template(TemplateType type, String template) {
        return new HttpTemplate(type).withTemplate(template);
    }
200823
public static TemplateMetadata fromTemplate(TemplateNode template) {
    TemplateMetadata.Builder builder =
        builder()
            .setTemplateName(template.getTemplateName())
            .setSourceLocation(template.getSourceLocation())
            .setSoyFileKind(SoyFileKind.SRC)
            .setContentKind(template.getContentKind())
            .setStrictHtml(template.isStrictHtml())
            .setDelPackageName(template.getDelPackageName())
            .setVisibility(template.getVisibility())
            .setParameters(Parameter.directParametersFromTemplate(template))
            .setDataAllCallSituations(DataAllCallSituation.fromTemplate(template));
    switch (template.getKind()) {
      case TEMPLATE_BASIC_NODE:
        builder.setTemplateKind(Kind.BASIC);
        break;
      case TEMPLATE_DELEGATE_NODE:
        builder.setTemplateKind(Kind.DELTEMPLATE);
        TemplateDelegateNode deltemplate = (TemplateDelegateNode) template;
        builder.setDelTemplateName(deltemplate.getDelTemplateName());
        builder.setDelTemplateVariant(deltemplate.getDelTemplateVariant());
        break;
      case TEMPLATE_ELEMENT_NODE:
        builder.setTemplateKind(Kind.ELEMENT);
        break;
      default:
        throw new AssertionError("unexpected template kind: " + template.getKind());
    }
    return builder.build();
  }