Package 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>
AResponseEntity
that offers anErrorModel
, which contains details about potential errors on the server side.- Author:
- Matthias Müller
-
-
Constructor Summary
Constructors Constructor 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 Description ErrorModel
getError()
The error, if anystatic <T> RestResponseEntity<T>
of(org.springframework.http.ResponseEntity<T> exchange)
-
-
-
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)
-
-