Class ThingIdInvalidException

  • 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>, ThingException

    @Immutable
    public final class ThingIdInvalidException
    extends org.eclipse.ditto.model.base.exceptions.DittoRuntimeException
    implements ThingException
    Thrown if the Thing's ID is not valid (for example if it does not comply to the Thing ID REGEX).
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ThingIdInvalidException.Builder
      A mutable builder with a fluent API for a ThingIdInvalidException.
      • Nested classes/interfaces inherited from class org.eclipse.ditto.model.base.exceptions.DittoRuntimeException

        org.eclipse.ditto.model.base.exceptions.DittoRuntimeException.JsonFields
      • Nested classes/interfaces inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, 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 extends Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ThingIdInvalidException​(String thingId)
      Constructs a new ThingIdInvalidException object.
    • Constructor Detail

      • ThingIdInvalidException

        public ThingIdInvalidException​(String thingId)
        Constructs a new ThingIdInvalidException object.
        Parameters:
        thingId - the invalid Thing ID.
    • Method Detail

      • fromMessage

        public static ThingIdInvalidException fromMessage​(String message,
                                                          org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
        Constructs a new ThingIdInvalidException object with the given exception message.
        Parameters:
        message - detail message. This message can be later retrieved by the Throwable.getMessage() method.
        dittoHeaders - the headers of the command which resulted in this exception.
        Returns:
        the new ThingIdInvalidException.
      • fromJson

        public static ThingIdInvalidException fromJson​(org.eclipse.ditto.json.JsonObject jsonObject,
                                                       org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
        Constructs a new ThingIdInvalidException 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 ThingIdInvalidException.
        Throws:
        org.eclipse.ditto.json.JsonMissingFieldException - if the jsonObject does not have the DittoRuntimeException.JsonFields.MESSAGE field.