Class HeaderLinksResponseEntity<T extends RepresentationModel<?>>

java.lang.Object
org.springframework.http.HttpEntity<T>
org.springframework.http.ResponseEntity<T>
org.springframework.hateoas.server.core.HeaderLinksResponseEntity<T>

public class HeaderLinksResponseEntity<T extends RepresentationModel<?>> extends org.springframework.http.ResponseEntity<T>
Special ResponseEntity that exposes Link instances in the contained RepresentationModel 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 RepresentationModel instance anymore when RepresentationModelProcessors kick in.
Author:
Oliver Gierke
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.http.ResponseEntity

    org.springframework.http.ResponseEntity.BodyBuilder, org.springframework.http.ResponseEntity.HeadersBuilder<B extends org.springframework.http.ResponseEntity.HeadersBuilder<B>>
  • Field Summary

    Fields inherited from class org.springframework.http.HttpEntity

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    wrap(org.springframework.http.HttpEntity<S> entity)
    Wraps the given HttpEntity into a HeaderLinksResponseEntity.
    wrap(S entity)

    Methods inherited from class org.springframework.http.ResponseEntity

    accepted, badRequest, created, equals, getStatusCode, hashCode, internalServerError, noContent, notFound, of, of, ofNullable, ok, ok, status, status, toString, unprocessableContent, unprocessableEntity

    Methods inherited from class org.springframework.http.HttpEntity

    getBody, getHeaders, hasBody

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait