Class ThingIdNotExplicitlySettableException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.ditto.base.model.exceptions.DittoRuntimeException
org.eclipse.ditto.things.model.signals.commands.exceptions.ThingIdNotExplicitlySettableException
All Implemented Interfaces:
Serializable, org.eclipse.ditto.base.model.headers.DittoHeadersSettable<org.eclipse.ditto.base.model.exceptions.DittoRuntimeException>, org.eclipse.ditto.base.model.headers.WithDittoHeaders, org.eclipse.ditto.base.model.headers.WithManifest, org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>, ThingException

@Immutable public final class ThingIdNotExplicitlySettableException extends org.eclipse.ditto.base.model.exceptions.DittoRuntimeException implements ThingException
Thrown if either for a REST POST or PUT request for creating a Thing it was tried to set an explicit thingId in the JSON body.
See Also:
  • Field Details

  • Method Details

    • forPostMethod

      public static ThingIdNotExplicitlySettableException.Builder forPostMethod()
    • forPutMethod

      public static ThingIdNotExplicitlySettableException.Builder forPutMethod()
    • forPutOrPatchMethod

      public static ThingIdNotExplicitlySettableException.Builder forPutOrPatchMethod()
    • forDittoProtocol

      public static ThingIdNotExplicitlySettableException.Builder forDittoProtocol()
    • fromJson

      public static ThingIdNotExplicitlySettableException fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Constructs a new ThingIdNotExplicitlySettableException object with the exception message extracted from the given JSON object.
      Parameters:
      jsonObject - the JSON to read the DittoRuntimeException.JsonFields.MESSAGE field from.
      dittoHeaders - the headers of the command which resulted in this exception.
      Returns:
      the new ThingIdNotExplicitlySettableException.
      Throws:
      NullPointerException - if any argument is null.
      org.eclipse.ditto.json.JsonMissingFieldException - if the jsonObject does not have the DittoRuntimeException.JsonFields.MESSAGE field.
      org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected format.
    • setDittoHeaders

      public org.eclipse.ditto.base.model.exceptions.DittoRuntimeException setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Specified by:
      setDittoHeaders in interface org.eclipse.ditto.base.model.headers.DittoHeadersSettable<org.eclipse.ditto.base.model.exceptions.DittoRuntimeException>