Package org.apache.juneau.bean.jsonapi
Class JsonApiError
java.lang.Object
org.apache.juneau.bean.jsonapi.JsonApiError
Represents a JSON:API Error Object as defined by
JSON:API v1.1 § Error Objects.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Bean property getter:code .Bean property getter:detail .getId()Bean property getter:id .getLinks()Bean property getter:links .getMeta()Bean property getter:meta .Bean property getter:source .Bean property getter:status .getTitle()Bean property getter:title .Convenience method to add a single link.Convenience method to add a single meta entry.Bean property setter:code .Bean property setter:detail .Bean property setter:id .Bean property setter:links .Bean property setter:meta .setSource(JsonApiErrorSource value) Bean property setter:source .Bean property setter:status .Bean property setter:title .toString()
-
Constructor Details
-
JsonApiError
public JsonApiError()Default constructor.
-
-
Method Details
-
getId
Bean property getter:id .- Returns:
- The value of the
id property, ornull if it is not set.
-
setId
Bean property setter:id .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getLinks
Bean property getter:links .Per spec, each
linksvalue can be either a JSON string URL or aJsonApiLinkobject.- Returns:
- The value of the
links property, ornull if it is not set.
-
setLinks
@BeanProp("links") @Swap(JsonApiLinkOrStringSwap.class) public JsonApiError setLinks(Map<String, Object> value) Bean property setter:links .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
putLink
Convenience method to add a single link.- Parameters:
name- The link name. Can benull (LinkedHashMaptolerates anull key).value- The link value (aStringURL or aJsonApiLinkobject). Can benull (stored asnull ).- Returns:
- This object.
-
getStatus
Bean property getter:status .Per spec, the HTTP status code as a string.
- Returns:
- The value of the
status property, ornull if it is not set.
-
setStatus
Bean property setter:status .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getCode
Bean property getter:code .An application-specific error code.
- Returns:
- The value of the
code property, ornull if it is not set.
-
setCode
Bean property setter:code .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getTitle
Bean property getter:title .- Returns:
- The value of the
title property, ornull if it is not set.
-
setTitle
Bean property setter:title .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getDetail
Bean property getter:detail .- Returns:
- The value of the
detail property, ornull if it is not set.
-
setDetail
Bean property setter:detail .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getSource
Bean property getter:source .- Returns:
- The value of the
source property, ornull if it is not set.
-
setSource
Bean property setter:source .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getMeta
Bean property getter:meta .- Returns:
- The value of the
meta property, ornull if it is not set.
-
setMeta
Bean property setter:meta .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
putMeta
Convenience method to add a single meta entry.- Parameters:
name- The meta key. Can benull (LinkedHashMaptolerates anull key).value- The meta value. Can benull (stored asnull ).- Returns:
- This object.
-
toString
-