Class ThingPreconditionNotModifiedException

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.ThingPreconditionNotModifiedException
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 ThingPreconditionNotModifiedException extends org.eclipse.ditto.base.model.exceptions.DittoRuntimeException implements ThingException
Thrown when validating a precondition header on a Thing or one of its sub-entities leads to status HttpStatus.NOT_MODIFIED.
See Also:
  • Field Details

  • Method Details

    • newBuilder

      A mutable builder for a ThingPreconditionNotModifiedException.
      Returns:
      the builder.
      Since:
      3.3.0
    • newBuilder

      public static ThingPreconditionNotModifiedException.Builder newBuilder(String expectedNotToMatch, String matched)
      A mutable builder for a ThingPreconditionNotModifiedException.
      Parameters:
      expectedNotToMatch - the value which was expected not to match matched value.
      matched - the matched value.
      Returns:
      the builder.
    • fromJson

      public static ThingPreconditionNotModifiedException fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Constructs a new ThingPreconditionNotModifiedException 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 ConditionalHeadersNotModifiedException.
      Throws:
      NullPointerException - if any argument is null.
      org.eclipse.ditto.json.JsonMissingFieldException - if this JsonObject did not contain an error message.
      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>