Class ThingPreconditionNotModifiedException

  • All Implemented Interfaces:
    Serializable, org.eclipse.ditto.model.base.headers.WithDittoHeaders<org.eclipse.ditto.model.base.exceptions.DittoRuntimeException>, org.eclipse.ditto.model.base.headers.WithManifest, org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.model.things.ThingException

    @Immutable
    public final class ThingPreconditionNotModifiedException
    extends org.eclipse.ditto.model.base.exceptions.DittoRuntimeException
    implements org.eclipse.ditto.model.things.ThingException
    Thrown when validating a precondition header on a Thing or one of its sub-entities leads to status HttpStatusCode.NOT_MODIFIED.
    See Also:
    Serialized Form
    • Method Detail

      • fromJson

        public static ThingPreconditionNotModifiedException fromJson​(org.eclipse.ditto.json.JsonObject jsonObject,
                                                                     org.eclipse.ditto.model.base.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.model.base.exceptions.DittoRuntimeException setDittoHeaders​(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
        Specified by:
        setDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<org.eclipse.ditto.model.base.exceptions.DittoRuntimeException>
        Overrides:
        setDittoHeaders in class org.eclipse.ditto.model.base.exceptions.DittoRuntimeException