public class HeaderLinksResponseEntity<T extends ResourceSupport> extends ResponseEntity<T>
ResponseEntity that exposes Link instances in the contained ResourceSupport as link
headers instead of in the body. Note, that this class is not intended to be used directly from user code but by
support code that will transparently invoke the header exposure. If you use this class from a controller directly,
the Links will not be present in the ResourceSupport instance anymore when ResourceProcessors
kick in.ResponseEntity.BodyBuilder, ResponseEntity.HeadersBuilder<B extends ResponseEntity.HeadersBuilder<B>>EMPTY| Modifier and Type | Method and Description |
|---|---|
static <S extends ResourceSupport> |
wrap(HttpEntity<S> entity)
Wraps the given
HttpEntity into a HeaderLinksResponseEntity. |
accepted, badRequest, created, equals, getStatusCode, hashCode, noContent, notFound, ok, ok, status, status, toString, unprocessableEntitygetBody, getHeaders, hasBodypublic static <S extends ResourceSupport> HeaderLinksResponseEntity<S> wrap(HttpEntity<S> entity)
HttpEntity into a HeaderLinksResponseEntity. Will default the status code to
HttpStatus.OK if the given value is not a ResponseEntity.entity - must not be null.Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.