public class ControllerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Iterable<org.springframework.hateoas.Resource<?>> |
EMPTY_RESOURCE_LIST |
| Constructor and Description |
|---|
ControllerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ResponseEntity<org.springframework.hateoas.ResourceSupport> |
toEmptyResponse(HttpStatus status)
Return an empty response that is only comprised of a status
|
static ResponseEntity<org.springframework.hateoas.ResourceSupport> |
toEmptyResponse(HttpStatus status,
HttpHeaders headers)
Return an empty response that is only comprised of headers and a status
|
static <R extends org.springframework.hateoas.ResourceSupport> |
toResponseEntity(HttpStatus status,
HttpHeaders headers,
R resource)
Wrap a resource as a
ResourceEntity and attach given headers and status. |
public static final Iterable<org.springframework.hateoas.Resource<?>> EMPTY_RESOURCE_LIST
public static <R extends org.springframework.hateoas.ResourceSupport> ResponseEntity<org.springframework.hateoas.ResourceSupport> toResponseEntity(HttpStatus status, HttpHeaders headers, R resource)
ResourceEntity and attach given headers and status.R - status - headers - resource - public static ResponseEntity<org.springframework.hateoas.ResourceSupport> toEmptyResponse(HttpStatus status)
status - public static ResponseEntity<org.springframework.hateoas.ResourceSupport> toEmptyResponse(HttpStatus status, HttpHeaders headers)
status - headers - Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.