Example usage for org.springframework.restdocs.hypermedia Link getRel

List of usage examples for org.springframework.restdocs.hypermedia Link getRel

Introduction

In this page you can find the example usage for org.springframework.restdocs.hypermedia Link getRel.

Prototype

public String getRel() 

Source Link

Document

Returns the link's rel .

Usage

From source file:org.springframework.restdocs.operation.preprocess.LinkMaskingContentModifierTests.java

private HalPayload createHalPayload(Link... links) {
    HalPayload payload = new HalPayload();
    Map<String, Object> linksMap = new LinkedHashMap<>();
    for (Link link : links) {
        Map<String, String> linkMap = new HashMap<>();
        linkMap.put("href", link.getHref());
        linksMap.put(link.getRel(), linkMap);
    }/*from   w  w w  . ja v a2  s.  com*/
    payload.setLinks(linksMap);
    return payload;
}