List of usage examples for org.springframework.hateoas UriTemplate toString
String toString
To view the source code for org.springframework.hateoas UriTemplate toString.
Click Source Link
From source file:io.spring.initializr.web.mapper.InitializrMetadataV2JsonMapper.java
private String generateTemplatedUri(String appUrl, Type type) { String uri = appUrl != null ? appUrl + type.getAction() : type.getAction(); uri = uri + "?type=" + type.getId(); UriTemplate uriTemplate = new UriTemplate(uri, this.templateVariables); return uriTemplate.toString(); }
From source file:io.spring.initializr.web.mapper.InitializrMetadataV21JsonMapper.java
private Map<String, Object> dependenciesLink(String appUrl) { String uri = appUrl != null ? appUrl + "/dependencies" : "/dependencies"; UriTemplate uriTemplate = new UriTemplate(uri, this.dependenciesVariables); Map<String, Object> result = new LinkedHashMap<>(); result.put("href", uriTemplate.toString()); result.put("templated", true); return result; }
From source file:org.springframework.hateoas.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 v a 2 s .c o m*/ public Link(UriTemplate template, String rel) { Assert.notNull(template, "UriTemplate 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.springframework.hateoas.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. * @param profile must not be {@literal null} or empty. *//*from w w w.j ava2s . c o m*/ public Link(UriTemplate template, String rel, String profile) { Assert.notNull(template, "UriTemplate must not be null!"); Assert.hasText(rel, "Rel must not be null or empty!"); Assert.hasText(profile, "Profile must not be null or empty!"); this.template = template; this.href = template.toString(); this.rel = rel; this.profile = profile; }
From source file:org.springframework.hateoas.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. * @param profile must not be {@literal null} or empty. * @param name//ww w . ja va 2s . c o m */ public Link(UriTemplate template, String rel, String profile, String name) { Assert.notNull(template, "UriTemplate must not be null!"); Assert.hasText(rel, "Rel must not be null or empty!"); Assert.hasText(profile, "Profile must not be null or empty!"); this.template = template; this.href = template.toString(); this.rel = rel; this.profile = profile; this.name = name; }
From source file:org.springframework.hateoas.Link.java
/** * Creates a new Link from the given {@link UriTemplate} and rel. * * @param template template must not be {@literal null}. * @param rel must not be {@literal null} or empty. * @param name/*w w w .j ava 2s.com*/ * @param title must not be {@literal null} or empty. * @param type */ public Link(UriTemplate template, String rel, String name, String title, String type) { Assert.notNull(template, "UriTemplate must not be null!"); Assert.hasText(rel, "Rel must not be null or empty!"); this.template = template; this.href = template.toString(); this.rel = rel; this.name = name; this.title = title; this.type = type; }
From source file:org.springframework.hateoas.Link.java
/** * Creates a new Link from the given {@link UriTemplate} and rel. * * @param template template must not be {@literal null}. * @param rel must not be {@literal null} or empty. * @param name//from ww w .j a va2 s . c om * @param title must not be {@literal null} or empty. * @param type * @param profile */ public Link(UriTemplate template, String rel, String name, String title, String type, String profile) { Assert.notNull(template, "UriTemplate must not be null!"); Assert.hasText(rel, "Rel must not be null or empty!"); Assert.hasText(profile, "Profile must not be null or empty!"); this.template = template; this.href = template.toString(); this.rel = rel; this.name = name; this.title = title; this.type = type; this.profile = profile; }