List of usage examples for org.springframework.web.util UriTemplate toString
@Override
public String toString()
From source file:com.kuba.skateagramclient.domain.Link.java
/** * Creates a new Link from the given {@link UriTemplate} and rel. * * @param template must not be {@literal null}. * @param rel must not be {@literal null} or empty. *//*w w w. j a va2s . c om*/ public Link(UriTemplate template, String rel) { Assert.notNull(template, "UriTempalte must not be null!"); Assert.hasText(rel, "Rel must not be null or empty!"); this.template = template; this.href = template.toString(); this.rel = rel; }
From source file:org.craftercms.engine.controller.rest.RestScriptsController.java
protected String parseScriptUrlForVariables(SiteContext siteContext, String scriptUrl, Map<String, Object> variables) { ContentStoreService storeService = siteContext.getStoreService(); if (!storeService.exists(siteContext.getContext(), scriptUrl) && urlTemplateScanner != null) { List<UriTemplate> urlTemplates = urlTemplateScanner.scan(siteContext); if (CollectionUtils.isNotEmpty(urlTemplates)) { for (UriTemplate template : urlTemplates) { if (template.matches(scriptUrl)) { Map<String, String> pathVars = template.match(scriptUrl); String actualScriptUrl = template.toString(); variables.put(GroovyScriptUtils.VARIABLE_PATH_VARS, pathVars); return actualScriptUrl; }//from w w w. j a va2s . com } } } return scriptUrl; }