test_class.declarator: underTest
test_class.modifier: private final
test_class.original_string: private final ThingMongoEventAdapter underTest;
test_class.type: ThingMongoEventAdapter
test_class.var_name: underTest
test_class.file: services/things/persistence/src/test/java/org/eclipse/ditto/services/things/persistence/serializer/ThingMongoEventAdapterTest.java
test_class.identifier: ThingMongoEventAdapterTest
test_case.body: @Test
      public void deserializeAttributeDeletedV1() {
          final String attributePointer = "test1";
  
          final JsonObject eventJson = JsonFactory.newObjectBuilder()
                  .set("event", "thingAttributeDeleted")
                  .set("__schemaVersion", 1)
                  .set("payload", JsonFactory.newObjectBuilder()
                          .set("thingId", TestConstants.Thing.THING_ID.toString())
                          .set("attributeJsonPointer", attributePointer)
                          .build())
                  .build();
  
          final Object object = toDbObject(eventJson);
          final Object actual = underTest.fromJournal(object, null).events().head();
  
          assertThat(actual).isInstanceOf(ThingEvent.class);
          final ThingEvent event = (ThingEvent) actual;
          assertThat((CharSequence) event.getThingEntityId()).isEqualTo(TestConstants.Thing.THING_ID);
          assertThat(event.getName()).isEqualTo(AttributeDeleted.NAME);
          assertThat(event.getType()).isEqualTo(AttributeDeleted.TYPE);
          assertThat(event).isInstanceOf(AttributeDeleted.class);
          final AttributeDeleted attributeDeleted = (AttributeDeleted) event;
          assertThat((CharSequence) attributeDeleted.getThingEntityId()).isEqualTo(TestConstants.Thing.THING_ID);
          assertThat(attributeDeleted.getAttributePointer()).isEqualTo(JsonPointer.of(attributePointer));
      }
test_case.class_method_signature: ThingMongoEventAdapterTest.deserializeAttributeDeletedV1()
test_case.full_signature: @Test public void deserializeAttributeDeletedV1()
test_case.identifier: deserializeAttributeDeletedV1
test_case.invocations: build set set set newObjectBuilder build set set newObjectBuilder toString toDbObject head events fromJournal isInstanceOf assertThat isEqualTo assertThat getThingEntityId isEqualTo assertThat getName isEqualTo assertThat getType isInstanceOf assertThat isEqualTo assertThat getThingEntityId isEqualTo assertThat getAttributePointer of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void deserializeAttributeDeletedV1()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(ThingMongoEventAdapter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(ThingMongoEventAdapter.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: THING_ACL_MODIFIED = "thingAclModified"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ACL_MODIFIED = "thingAclModified";
focal_class.type: String
focal_class.var_name: THING_ACL_MODIFIED
focal_class.declarator: THING_ACL_ENTRY_DELETED = "thingAclEntryDeleted"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ACL_ENTRY_DELETED = "thingAclEntryDeleted";
focal_class.type: String
focal_class.var_name: THING_ACL_ENTRY_DELETED
focal_class.declarator: THING_ACL_ENTRY_MODIFIED = "thingAclEntryModified"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ACL_ENTRY_MODIFIED = "thingAclEntryModified";
focal_class.type: String
focal_class.var_name: THING_ACL_ENTRY_MODIFIED
focal_class.declarator: THING_ATTRIBUTES_DELETED = "thingAttributesDeleted"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ATTRIBUTES_DELETED = "thingAttributesDeleted";
focal_class.type: String
focal_class.var_name: THING_ATTRIBUTES_DELETED
focal_class.declarator: THING_ATTRIBUTES_MODIFIED = "thingAttributesModified"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ATTRIBUTES_MODIFIED = "thingAttributesModified";
focal_class.type: String
focal_class.var_name: THING_ATTRIBUTES_MODIFIED
focal_class.declarator: THING_ATTRIBUTE_MODIFIED = "thingAttributeModified"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ATTRIBUTE_MODIFIED = "thingAttributeModified";
focal_class.type: String
focal_class.var_name: THING_ATTRIBUTE_MODIFIED
focal_class.declarator: THING_ATTRIBUTE_DELETED = "thingAttributeDeleted"
focal_class.modifier: private static final
focal_class.original_string: private static final String THING_ATTRIBUTE_DELETED = "thingAttributeDeleted";
focal_class.type: String
focal_class.var_name: THING_ATTRIBUTE_DELETED
focal_class.declarator: ATTRIBUTE = "attribute"
focal_class.modifier: private static final
focal_class.original_string: private static final String ATTRIBUTE = "attribute";
focal_class.type: String
focal_class.var_name: ATTRIBUTE
focal_class.declarator: PROPERTY = "property"
focal_class.modifier: private static final
focal_class.original_string: private static final String PROPERTY = "property";
focal_class.type: String
focal_class.var_name: PROPERTY
focal_class.declarator: IS_REVISION = field -> field.getDefinition()
              .map(definition -> Objects.equals(definition, Event.JsonFields.REVISION))
              .orElse(false)
focal_class.modifier: private static final
focal_class.original_string: private static final Predicate<JsonField> IS_REVISION = field -> field.getDefinition()
              .map(definition -> Objects.equals(definition, Event.JsonFields.REVISION))
              .orElse(false);
focal_class.type: Predicate<JsonField>
focal_class.var_name: IS_REVISION
focal_class.declarator: POLICY_IN_THING_EVENT_PAYLOAD = ThingEvent.JsonFields.THING.getPointer()
              .append(JsonPointer.of(Policy.INLINED_FIELD_NAME))
focal_class.modifier: private static final
focal_class.original_string: private static final JsonPointer POLICY_IN_THING_EVENT_PAYLOAD = ThingEvent.JsonFields.THING.getPointer()
              .append(JsonPointer.of(Policy.INLINED_FIELD_NAME));
focal_class.type: JsonPointer
focal_class.var_name: POLICY_IN_THING_EVENT_PAYLOAD
focal_class.declarator: PAYLOAD =
              JsonFactory.newJsonObjectFieldDefinition("payload", FieldType.REGULAR, JsonSchemaVersion.V_1,
                      JsonSchemaVersion.V_2)
focal_class.modifier: private static final
focal_class.original_string: private static final JsonFieldDefinition<JsonObject> PAYLOAD =
              JsonFactory.newJsonObjectFieldDefinition("payload", FieldType.REGULAR, JsonSchemaVersion.V_1,
                      JsonSchemaVersion.V_2);
focal_class.type: JsonFieldDefinition<JsonObject>
focal_class.var_name: PAYLOAD
focal_class.declarator: migrationMappings
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Function<JsonObject, JsonObject>> migrationMappings;
focal_class.type: Map<String, Function<JsonObject, JsonObject>>
focal_class.var_name: migrationMappings
focal_class.declarator: system
focal_class.modifier: private final
focal_class.original_string: private final ExtendedActorSystem system;
focal_class.type: ExtendedActorSystem
focal_class.var_name: system
focal_class.declarator: eventRegistry
focal_class.modifier: private final
focal_class.original_string: private final GlobalEventRegistry eventRegistry;
focal_class.type: GlobalEventRegistry
focal_class.var_name: eventRegistry
focal_class.file: services/things/persistence/src/main/java/org/eclipse/ditto/services/things/persistence/serializer/ThingMongoEventAdapter.java
focal_class.identifier: ThingMongoEventAdapter
focal_class.interfaces: implements EventAdapter
focal_class.class_method_signature: ThingMongoEventAdapter.ThingMongoEventAdapter(@Nullable final ExtendedActorSystem system)
focal_class.full_signature: public  ThingMongoEventAdapter(@Nullable final ExtendedActorSystem system)
focal_class.identifier: ThingMongoEventAdapter
focal_class.modifiers: public
focal_class.parameters: (@Nullable final ExtendedActorSystem system)
focal_class.signature:  ThingMongoEventAdapter(@Nullable final ExtendedActorSystem system)
focal_class.class_method_signature: ThingMongoEventAdapter.manifest(final Object event)
focal_class.full_signature: @Override public String manifest(final Object event)
focal_class.identifier: manifest
focal_class.modifiers: @Override public
focal_class.parameters: (final Object event)
focal_class.return: String
focal_class.signature: String manifest(final Object event)
focal_class.class_method_signature: ThingMongoEventAdapter.toJournal(final Object event)
focal_class.full_signature: @Override public Object toJournal(final Object event)
focal_class.identifier: toJournal
focal_class.modifiers: @Override public
focal_class.parameters: (final Object event)
focal_class.return: Object
focal_class.signature: Object toJournal(final Object event)
focal_class.class_method_signature: ThingMongoEventAdapter.fromJournal(final Object event, final String manifest)
focal_class.full_signature: @Override public EventSeq fromJournal(final Object event, final String manifest)
focal_class.identifier: fromJournal
focal_class.modifiers: @Override public
focal_class.parameters: (final Object event, final String manifest)
focal_class.return: EventSeq
focal_class.signature: EventSeq fromJournal(final Object event, final String manifest)
focal_class.class_method_signature: ThingMongoEventAdapter.tryToCreateEventFrom(final JsonValue json)
focal_class.full_signature: @Nullable private Event tryToCreateEventFrom(final JsonValue json)
focal_class.identifier: tryToCreateEventFrom
focal_class.modifiers: @Nullable private
focal_class.parameters: (final JsonValue json)
focal_class.return: Event
focal_class.signature: Event tryToCreateEventFrom(final JsonValue json)
focal_class.class_method_signature: ThingMongoEventAdapter.createEventFrom(final JsonValue json)
focal_class.full_signature: private Event createEventFrom(final JsonValue json)
focal_class.identifier: createEventFrom
focal_class.modifiers: private
focal_class.parameters: (final JsonValue json)
focal_class.return: Event
focal_class.signature: Event createEventFrom(final JsonValue json)
focal_class.class_method_signature: ThingMongoEventAdapter.migratePayload(final JsonObject jsonObject)
focal_class.full_signature: private JsonObject migratePayload(final JsonObject jsonObject)
focal_class.identifier: migratePayload
focal_class.modifiers: private
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject migratePayload(final JsonObject jsonObject)
focal_class.class_method_signature: ThingMongoEventAdapter.migrateId(final JsonObject jsonObject)
focal_class.full_signature: @SuppressWarnings("squid:CallToDeprecatedMethod") private static JsonObject migrateId(final JsonObject jsonObject)
focal_class.identifier: migrateId
focal_class.modifiers: @SuppressWarnings("squid:CallToDeprecatedMethod") private static
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject migrateId(final JsonObject jsonObject)
focal_class.class_method_signature: ThingMongoEventAdapter.migrateComplex(final JsonObject jsonObject)
focal_class.full_signature: @SuppressWarnings("squid:CallToDeprecatedMethod") private JsonObject migrateComplex(final JsonObject jsonObject)
focal_class.identifier: migrateComplex
focal_class.modifiers: @SuppressWarnings("squid:CallToDeprecatedMethod") private
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject migrateComplex(final JsonObject jsonObject)
focal_class.class_method_signature: ThingMongoEventAdapter.migrateModifiedToCreated(final JsonObject jsonObject, final String createdType)
focal_class.full_signature: private static JsonObject migrateModifiedToCreated(final JsonObject jsonObject, final String createdType)
focal_class.identifier: migrateModifiedToCreated
focal_class.modifiers: private static
focal_class.parameters: (final JsonObject jsonObject, final String createdType)
focal_class.return: JsonObject
focal_class.signature: JsonObject migrateModifiedToCreated(final JsonObject jsonObject, final String createdType)
focal_class.class_method_signature: ThingMongoEventAdapter.renameField(final CharSequence oldFieldName, final CharSequence newFieldName,
              final JsonObject jsonObject)
focal_class.full_signature: private static JsonObject renameField(final CharSequence oldFieldName, final CharSequence newFieldName,
              final JsonObject jsonObject)
focal_class.identifier: renameField
focal_class.modifiers: private static
focal_class.parameters: (final CharSequence oldFieldName, final CharSequence newFieldName,
              final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject renameField(final CharSequence oldFieldName, final CharSequence newFieldName,
              final JsonObject jsonObject)
focal_class.class_method_signature: ThingMongoEventAdapter.renameJsonPointer(final String fieldName, final JsonObject jsonObject)
focal_class.full_signature: private static JsonObject renameJsonPointer(final String fieldName, final JsonObject jsonObject)
focal_class.identifier: renameJsonPointer
focal_class.modifiers: private static
focal_class.parameters: (final String fieldName, final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject renameJsonPointer(final String fieldName, final JsonObject jsonObject)
focal_class.class_method_signature: ThingMongoEventAdapter.renameValue(final String fieldName, final JsonObject jsonObject)
focal_class.full_signature: private static JsonObject renameValue(final String fieldName, final JsonObject jsonObject)
focal_class.identifier: renameValue
focal_class.modifiers: private static
focal_class.parameters: (final String fieldName, final JsonObject jsonObject)
focal_class.return: JsonObject
focal_class.signature: JsonObject renameValue(final String fieldName, final JsonObject jsonObject)
focal_method.body: @Override
      public EventSeq fromJournal(final Object event, final String manifest) {
          if (event instanceof BsonValue) {
              return EventSeq.single(tryToCreateEventFrom(DittoBsonJson.getInstance().serialize((BsonValue) event)));
          } else {
              throw new IllegalArgumentException(
                      "Unable to fromJournal a non-'BsonValue' object! Was: " + event.getClass());
          }
      }
focal_method.class_method_signature: ThingMongoEventAdapter.fromJournal(final Object event, final String manifest)
focal_method.full_signature: @Override public EventSeq fromJournal(final Object event, final String manifest)
focal_method.identifier: fromJournal
focal_method.invocations: single tryToCreateEventFrom serialize getInstance getClass
focal_method.modifiers: @Override public
focal_method.parameters: (final Object event, final String manifest)
focal_method.return: EventSeq
focal_method.signature: EventSeq fromJournal(final Object event, final String manifest)