Interface ExtensionError
public interface ExtensionError
ExtensionError
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ExtensionError extensionError = ExtensionError.builder()
.code("{code}")
.message("{message}")
.extensionId("{extensionId}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionErrorBuilder
builder()
builder factory method for ExtensionErrorstatic ExtensionErrorBuilder
builder
(ExtensionError template) create builder for ExtensionError instancestatic ExtensionError
deepCopy
(ExtensionError template) factory method to create a deep copy of ExtensionError@NotNull String
getCode()
Error code caused by the Extension.@NotNull String
Unique identifier of the Extension.User-defined unique identifier of the Extension.@NotNull String
Plain text description of the error.static ExtensionError
of()
factory methodstatic ExtensionError
of
(ExtensionError template) factory method to create a shallow copy ExtensionErrorvoid
Error code caused by the Extension.void
setExtensionId
(String extensionId) Unique identifier of the Extension.void
setExtensionKey
(String extensionKey) User-defined unique identifier of the Extension.void
setMessage
(String message) Plain text description of the error.void
Error-specific additional fields.static com.fasterxml.jackson.core.type.TypeReference<ExtensionError>
gives a TypeReference for usage with Jackson DataBindvalues()
Error-specific additional fields.default <T> T
withExtensionError
(Function<ExtensionError, T> helper) accessor map function
-
Method Details
-
getCode
Error code caused by the Extension. For example,
InvalidField
.- Returns:
- code
-
getMessage
Plain text description of the error.
- Returns:
- message
-
getExtensionId
Unique identifier of the Extension.
- Returns:
- extensionId
-
getExtensionKey
String getExtensionKey()User-defined unique identifier of the Extension.
- Returns:
- extensionKey
-
values
Error-specific additional fields.
- Returns:
- map of the pattern property values
-
setCode
Error code caused by the Extension. For example,
InvalidField
.- Parameters:
code
- value to be set
-
setMessage
Plain text description of the error.
- Parameters:
message
- value to be set
-
setExtensionId
Unique identifier of the Extension.
- Parameters:
extensionId
- value to be set
-
setExtensionKey
User-defined unique identifier of the Extension.
- Parameters:
extensionKey
- value to be set
-
setValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value
-
of
factory method- Returns:
- instance of ExtensionError
-
of
factory method to create a shallow copy ExtensionError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ExtensionError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ExtensionError- Returns:
- builder
-
builder
create builder for ExtensionError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withExtensionError
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-