public final class ApiError extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ApiError.Builder
Builder for the ApiError.
|
Modifier and Type | Field and Description |
---|---|
static org.forgerock.api.models.ApiError.ErrorComparator |
ERROR_COMPARATOR
ApiError Comparator , which sorts by code and description. |
Modifier and Type | Method and Description |
---|---|
static ApiError.Builder |
apiError()
New apiError builder.
|
boolean |
equals(Object o) |
static ApiError |
fromAnnotation(ApiError apiError,
ApiDescription descriptor,
Class<?> relativeType)
Builds an ApiError object from the data in the annotation.
|
Integer |
getCode()
Getter of the error code.
|
LocalizableString |
getDescription()
Getter of the error description.
|
Reference |
getReference()
Getter of the reference.
|
Schema |
getSchema()
Getter of the error schema.
|
int |
hashCode() |
String |
toString() |
public static final org.forgerock.api.models.ApiError.ErrorComparator ERROR_COMPARATOR
ApiError
Comparator
, which sorts by code and description.public Integer getCode()
public LocalizableString getDescription()
public Schema getSchema()
public Reference getReference()
public static ApiError.Builder apiError()
public static ApiError fromAnnotation(ApiError apiError, ApiDescription descriptor, Class<?> relativeType)
ApiError
has an id
defined, the
ApiError will be defined in the top-level descriptor
, and a reference to that definition will be
returned.apiError
- The annotation that holds the datadescriptor
- The root descriptor, for adding definitions to.relativeType
- The type relative to which schema resources should be resolved.Copyright © 2010-2018, ForgeRock All Rights Reserved.