@Override public FeatureProperties setAll(final Iterable<JsonField> jsonFields) { return determineResult(() -> wrapped.setAll(jsonFields)); }
@Override public FeatureProperties setAll(final Iterable<JsonField> jsonFields) { return determineResult(() -> wrapped.setAll(jsonFields)); }
@Override public Attributes setAll(final Iterable<JsonField> jsonFields) { return determineResult(() -> wrapped.setAll(jsonFields)); }
@Override public Attributes setAll(final Iterable<JsonField> jsonFields) { return determineResult(() -> wrapped.setAll(jsonFields)); }
/** * A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". * This field has to be used as fallback for already persisted events with "things-model" < 3.0.0. * Removing this workaround is possible if we are sure that no "old" events are ever loaded again! */ private JsonObject migratePayload(final JsonObject jsonObject) { return jsonObject.getValue(PAYLOAD) .filter(JsonValue::isObject) .map(JsonValue::asObject) .map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj)) .orElse(jsonObject); }
/** * A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". * This field has to be used as fallback for already persisted events with "things-model" < 3.0.0. * Removing this workaround is possible if we are sure that no "old" events are ever loaded again! */ private JsonObject migratePayload(final JsonObject jsonObject) { return jsonObject.getValue(PAYLOAD) .filter(JsonValue::isObject) .map(JsonValue::asObject) .map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj)) .orElse(jsonObject); }
/** * A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". This field has * to be used as fallback for already persisted events with "things-model" < 3.0.0. Removing this workaround is * possible if we are sure that no "old" events are ever loaded again! */ private static JsonObject migratePayload(final JsonObject jsonObject) { return jsonObject.getValue(PAYLOAD) .map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj)) .orElse(jsonObject); }
/** * A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". This field has * to be used as fallback for already persisted events with "things-model" < 3.0.0. Removing this workaround is * possible if we are sure that no "old" events are ever loaded again! */ private static JsonObject migratePayload(final JsonObject jsonObject) { return jsonObject.getValue(PAYLOAD) .map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj)) .orElse(jsonObject); }
@Override public Attributes setAll(final Iterable<JsonField> jsonFields) { return ImmutableAttributes.of(JsonFactory.newObject().setAll(jsonFields)); }
@Override public Attributes setAll(final Iterable<JsonField> jsonFields) { return ImmutableAttributes.of(JsonFactory.newObject().setAll(jsonFields)); }