org.appng.api.rest

## Class RestResponseEntity<T>

- java.lang.Object
- - org.springframework.http.HttpEntity<T>
  - - org.springframework.http.ResponseEntity<T>
    - - org.appng.api.rest.RestResponseEntity<T>

- Type Parameters:
    `T` - the response's body type

      public class RestResponseEntity<T>
      extends org.springframework.http.ResponseEntity<T>

  A `ResponseEntity` that offers an `ErrorModel`, which contains details about potential errors on the server side.
  Author:
    Matthias Müller

- - ### 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RestResponseEntity(ErrorModel error, org.springframework.http.HttpStatus status)`
    `RestResponseEntity(ErrorModel error, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatus status)`
    `RestResponseEntity(org.springframework.http.HttpStatus status)`
    `RestResponseEntity(org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatus status)`
    `RestResponseEntity(T body, org.springframework.http.HttpStatus status)`
    `RestResponseEntity(T body, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatus status)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ErrorModel` | `getError()` The error, if any
    `static <T> RestResponseEntity<T>` | `of(org.springframework.http.ResponseEntity<T> exchange)`

    - ### Methods inherited from class org.springframework.http.ResponseEntity

      `accepted, badRequest, created, equals, getStatusCode, getStatusCodeValue, hashCode, noContent, notFound, ok, ok, status, status, toString, 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`

- - ### Constructor Detail

    - #### RestResponseEntity

          public RestResponseEntity(org.springframework.http.HttpStatus status)

    - #### RestResponseEntity

          public RestResponseEntity(org.springframework.util.MultiValueMap<String,String> headers,
                                    org.springframework.http.HttpStatus status)

    - #### RestResponseEntity

          public RestResponseEntity(T body,
                                    org.springframework.http.HttpStatus status)

    - #### RestResponseEntity

          public RestResponseEntity(T body,
                                    org.springframework.util.MultiValueMap<String,String> headers,
                                    org.springframework.http.HttpStatus status)

    - #### RestResponseEntity

          public RestResponseEntity(ErrorModel error,
                                    org.springframework.http.HttpStatus status)

    - #### RestResponseEntity

          public RestResponseEntity(ErrorModel error,
                                    org.springframework.util.MultiValueMap<String,String> headers,
                                    org.springframework.http.HttpStatus status)

  - ### Method Detail

    - #### getError

          public ErrorModel getError()

      The error, if any
      Returns:
        the error

    - #### of

          public static <T> RestResponseEntity<T> of(org.springframework.http.ResponseEntity<T> exchange)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.