Class ThingMerged

  • All Implemented Interfaces:
    org.eclipse.ditto.base.model.entity.id.WithEntityId, org.eclipse.ditto.base.model.headers.DittoHeadersSettable<ThingMerged>, 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>, org.eclipse.ditto.base.model.signals.events.Event<ThingMerged>, org.eclipse.ditto.base.model.signals.events.EventsourcedEvent<ThingMerged>, org.eclipse.ditto.base.model.signals.Signal<ThingMerged>, org.eclipse.ditto.base.model.signals.SignalWithEntityId<ThingMerged>, org.eclipse.ditto.base.model.signals.WithName, org.eclipse.ditto.base.model.signals.WithOptionalEntity, org.eclipse.ditto.base.model.signals.WithResource, org.eclipse.ditto.base.model.signals.WithType, ThingEvent<ThingMerged>, ThingModifiedEvent<ThingMerged>, WithThingId

    @Immutable
    public final class ThingMerged
    extends AbstractThingEvent<ThingMerged>
    implements ThingModifiedEvent<ThingMerged>
    This event is emitted after a Thing was merged.
    Since:
    2.0.0
    • Nested Class Summary

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

        org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends java.lang.Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME
      Name of the "Thing Merged" event.
      static java.lang.String TYPE
      Type of this event.
      • Fields inherited from interface org.eclipse.ditto.base.model.signals.events.Event

        DEFAULT_REVISION, TYPE_QUALIFIER
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void appendPayloadAndBuild​(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, java.util.function.Predicate<org.eclipse.ditto.json.JsonField> thePredicate)  
      boolean equals​(java.lang.Object o)  
      static ThingMerged fromJson​(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new ThingMerged event from a JSON object.
      org.eclipse.ditto.json.JsonPointer getResourcePath()  
      org.eclipse.ditto.base.model.json.JsonSchemaVersion[] getSupportedSchemaVersions()  
      org.eclipse.ditto.json.JsonValue getValue()  
      int hashCode()  
      static ThingMerged of​(ThingId thingId, org.eclipse.ditto.json.JsonPointer path, org.eclipse.ditto.json.JsonValue value, long revision, java.time.Instant timestamp, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders, org.eclipse.ditto.base.model.entity.metadata.Metadata metadata)
      Creates an event of merged thing.
      ThingMerged setDittoHeaders​(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)  
      ThingMerged setRevision​(long revision)  
      java.lang.String toString()  
      • Methods inherited from class org.eclipse.ditto.base.model.signals.events.AbstractEventsourcedEvent

        getRevision, toJson
      • Methods inherited from class org.eclipse.ditto.base.model.signals.events.AbstractEvent

        getDittoHeaders, getManifest, getMetadata, getTimestamp, getType
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.events.Event

        getImplementedSchemaVersion, getMetadata, getTimestamp, getType, toJson
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.events.EventsourcedEvent

        getRevision
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

        getLatestSchemaVersion, implementsSchemaVersion, implementsSchemaVersion, toJsonString
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate

        toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.Signal

        getName
      • Methods inherited from interface org.eclipse.ditto.base.model.headers.WithDittoHeaders

        getDittoHeaders
      • Methods inherited from interface org.eclipse.ditto.base.model.headers.WithManifest

        getManifest
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.WithOptionalEntity

        getEntity, getEntity
    • Field Detail

      • NAME

        public static final java.lang.String NAME
        Name of the "Thing Merged" event.
        See Also:
        Constant Field Values
    • Method Detail

      • of

        public static ThingMerged of​(ThingId thingId,
                                     org.eclipse.ditto.json.JsonPointer path,
                                     org.eclipse.ditto.json.JsonValue value,
                                     long revision,
                                     @Nullable
                                     java.time.Instant timestamp,
                                     org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders,
                                     @Nullable
                                     org.eclipse.ditto.base.model.entity.metadata.Metadata metadata)
        Creates an event of merged thing.
        Parameters:
        thingId - the thing id.
        path - the path where the changes were applied.
        value - the value describing the changes that were merged into the existing thing.
        dittoHeaders - the ditto headers.
        Returns:
        the created ThingMerged event.
      • fromJson

        public static ThingMerged fromJson​(org.eclipse.ditto.json.JsonObject jsonObject,
                                           org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
        Creates a new ThingMerged event from a JSON object.
        Parameters:
        jsonObject - the JSON object of which the event is to be created.
        dittoHeaders - the headers of the command.
        Returns:
        the ThingMerged event created from JSON.
        Throws:
        java.lang.NullPointerException - if jsonObject is null.
        org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected format.
        org.eclipse.ditto.json.JsonMissingFieldException - if jsonObject did not contain a field for ThingEvent.JsonFields.THING_ID, ThingMerged.JsonFields.JSON_PATH or ThingMerged.JsonFields.JSON_VALUE.
      • appendPayloadAndBuild

        protected void appendPayloadAndBuild​(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
                                             org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion,
                                             java.util.function.Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
        Specified by:
        appendPayloadAndBuild in class org.eclipse.ditto.base.model.signals.events.AbstractEvent<ThingMerged>
      • setRevision

        public ThingMerged setRevision​(long revision)
        Specified by:
        setRevision in class org.eclipse.ditto.base.model.signals.events.AbstractEventsourcedEvent<ThingMerged>
      • getResourcePath

        public org.eclipse.ditto.json.JsonPointer getResourcePath()
        Specified by:
        getResourcePath in interface org.eclipse.ditto.base.model.signals.WithResource
        Returns:
        the path where the changes were applied.
      • getValue

        public org.eclipse.ditto.json.JsonValue getValue()
        Returns:
        the value describing the changes that were applied to the existing thing.
      • getSupportedSchemaVersions

        public org.eclipse.ditto.base.model.json.JsonSchemaVersion[] getSupportedSchemaVersions()
        Specified by:
        getSupportedSchemaVersions in interface org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>