public class Problem extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Problem.ExtendedProblem<T> |
| Constructor and Description |
|---|
Problem(URI type,
String title,
int status,
String detail,
URI instance) |
| Modifier and Type | Method and Description |
|---|---|
static Problem |
create()
Returns an empty
Problem instance. |
static <T> Problem.ExtendedProblem<T> |
create(T payload)
Returns an
Problem.ExtendedProblem with the given payload as additional properties. |
static Problem |
statusOnly(HttpStatus status)
|
Problem.ExtendedProblem<Map<String,Object>> |
withProperties(Consumer<Map<String,Object>> consumer)
Returns an
Problem.ExtendedProblem with a Map populated by the given consumer as payload. |
Problem.ExtendedProblem<Map<String,Object>> |
withProperties(Map<String,Object> properties)
Returns an
Problem.ExtendedProblem with the given Map unwrapping as additional properties. |
<T> Problem.ExtendedProblem<T> |
withProperties(T payload)
Creates a new
Problem.ExtendedProblem with the given payload as additional properties. |
public static Problem create()
Problem instance.Problem instance.public static <T> Problem.ExtendedProblem<T> create(T payload)
Problem.ExtendedProblem with the given payload as additional properties.T - payload - must not be null.public static Problem statusOnly(HttpStatus status)
status - must not be null.public <T> Problem.ExtendedProblem<T> withProperties(T payload)
Problem.ExtendedProblem with the given payload as additional properties.T - payload - must not be null.public Problem.ExtendedProblem<Map<String,Object>> withProperties(Consumer<Map<String,Object>> consumer)
Problem.ExtendedProblem with a Map populated by the given consumer as payload.consumer - must not be null.public Problem.ExtendedProblem<Map<String,Object>> withProperties(Map<String,Object> properties)
Problem.ExtendedProblem with the given Map unwrapping as additional properties.properties - must not be null.Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.