@Immutable public final class ThingNotCreatableException extends org.eclipse.ditto.model.base.exceptions.DittoRuntimeException implements org.eclipse.ditto.model.things.ThingException
| Modifier and Type | Class and Description |
|---|---|
static class |
ThingNotCreatableException.Builder
A mutable builder with a fluent API for a
ThingNotCreatableException. |
org.eclipse.ditto.model.base.exceptions.DittoRuntimeException.JsonFieldsorg.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T>| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_CODE
Error code of this exception.
|
| Modifier and Type | Method and Description |
|---|---|
static ThingNotCreatableException |
fromJson(org.eclipse.ditto.json.JsonObject jsonObject,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Constructs a new
ThingNotCreatableException object with the exception message extracted from the
given JSON object. |
static ThingNotCreatableException |
fromMessage(String message,
String description,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Constructs a new
ThingNotCreatableException object with the given exception message. |
static ThingNotCreatableException.Builder |
newBuilderForPolicyExisting(String thingId,
String policyId)
A mutable builder for a
ThingNotCreatableException thrown if a Thing could not be created because an
implicitly created Policy would collide with an already existing Policy with such an ID. |
static ThingNotCreatableException.Builder |
newBuilderForPolicyMissing(String thingId,
String policyId)
A mutable builder for a
ThingNotCreatableException thrown if a Thing could not be created because a
referenced Policy in the Thing to be created is missing. |
appendToJson, equals, getBuilder, getDescription, getDittoHeaders, getEmptyBuilder, getErrorCode, getHref, getImplementedSchemaVersion, getManifest, getStatusCode, hashCode, newBuilder, newBuilder, readDescription, readMessage, setDittoHeaders, toJson, toJsonaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final String ERROR_CODE
public static ThingNotCreatableException.Builder newBuilderForPolicyMissing(String thingId, String policyId)
ThingNotCreatableException thrown if a Thing could not be created because a
referenced Policy in the Thing to be created is missing.thingId - the ID of the Thing.policyId - the ID of the Policy which was used when creating the Thing.public static ThingNotCreatableException.Builder newBuilderForPolicyExisting(String thingId, String policyId)
ThingNotCreatableException thrown if a Thing could not be created because an
implicitly created Policy would collide with an already existing Policy with such an ID.thingId - the ID of the Thing.policyId - the ID of the Policy which was used when creating the Thing.public static ThingNotCreatableException fromMessage(String message, @Nullable String description, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
ThingNotCreatableException object with the given exception message.message - detail message. This message can be later retrieved by the Throwable.getMessage() method.description - the description which may be null.dittoHeaders - the headers of the command which resulted in this exception.public static ThingNotCreatableException fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
ThingNotCreatableException object with the exception message extracted from the
given JSON object.jsonObject - the JSON to read the JsonFields#MESSAGE field from.dittoHeaders - the headers of the command which resulted in this exception.org.eclipse.ditto.json.JsonMissingFieldException - if the jsonObject does not have the JsonFields#MESSAGE field.Copyright © 2017–2018 Eclipse Foundation. All rights reserved.