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 org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> |
toEmptyResponse(org.springframework.http.HttpStatus status)
Return an empty response that is only comprised of a status
|
static org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> |
toEmptyResponse(org.springframework.http.HttpStatus status,
org.springframework.http.HttpHeaders headers)
Return an empty response that is only comprised of headers and a status
|
static <R extends org.springframework.hateoas.ResourceSupport> |
toResponseEntity(org.springframework.http.HttpStatus status,
org.springframework.http.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> org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> toResponseEntity(org.springframework.http.HttpStatus status, org.springframework.http.HttpHeaders headers, R resource)
ResourceEntity
and attach given headers and status.R
- status
- headers
- resource
- public static org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> toEmptyResponse(org.springframework.http.HttpStatus status)
status
- public static org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> toEmptyResponse(org.springframework.http.HttpStatus status, org.springframework.http.HttpHeaders headers)
status
- headers
- Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.