Skip to content

Commit 1b3ecf5

Browse files
authored
Merge pull request #90 from bosch-io/bugfix/persist-modified-created-for-events
adjusted Ditto Event API usage to Ditto metadata bugfix
2 parents 6d9ff84 + cd67e7b commit 1b3ecf5

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

java/src/main/java/org/eclipse/ditto/client/live/events/internal/ImmutableGlobalEventFactory.java

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,121 +82,122 @@ public static ImmutableGlobalEventFactory getInstance(final JsonSchemaVersion sc
8282

8383
@Override
8484
public ThingCreated thingCreated(final Thing thing) {
85-
return ThingCreated.of(thing, -1, Instant.now(), getDefaultDittoHeaders());
85+
return ThingCreated.of(thing, -1, Instant.now(), getDefaultDittoHeaders(), null);
8686
}
8787

8888
@Override
8989
public ThingDeleted thingDeleted(final ThingId thingId) {
90-
return ThingDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders());
90+
return ThingDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders(), null);
9191
}
9292

9393
@Override
9494
public ThingModified thingModified(final Thing thing) {
95-
return ThingModified.of(thing, -1, Instant.now(), getDefaultDittoHeaders());
95+
return ThingModified.of(thing, -1, Instant.now(), getDefaultDittoHeaders(), null);
9696
}
9797

9898
@Override
9999
public AttributeCreated attributeCreated(final ThingId thingId, final JsonPointer attributePointer,
100100
final JsonValue attributeValue) {
101101
return AttributeCreated.of(thingId, attributePointer, attributeValue, -1, Instant.now(),
102-
getDefaultDittoHeaders());
102+
getDefaultDittoHeaders(), null);
103103
}
104104

105105
@Override
106106
public AttributeDeleted attributeDeleted(final ThingId thingId, final JsonPointer attributePointer) {
107-
return AttributeDeleted.of(thingId, attributePointer, -1, Instant.now(), getDefaultDittoHeaders());
107+
return AttributeDeleted.of(thingId, attributePointer, -1, Instant.now(), getDefaultDittoHeaders(), null);
108108
}
109109

110110
@Override
111111
public AttributeModified attributeModified(final ThingId thingId, final JsonPointer attributePointer,
112112
final JsonValue attributeValue) {
113113
return AttributeModified.of(thingId, attributePointer, attributeValue, -1, Instant.now(),
114-
getDefaultDittoHeaders());
114+
getDefaultDittoHeaders(), null);
115115
}
116116

117117
@Override
118118
public AttributesCreated attributesCreated(final ThingId thingId, final Attributes attributes) {
119-
return AttributesCreated.of(thingId, attributes, -1, Instant.now(), getDefaultDittoHeaders());
119+
return AttributesCreated.of(thingId, attributes, -1, Instant.now(), getDefaultDittoHeaders(), null);
120120
}
121121

122122
@Override
123123
public AttributesDeleted attributesDeleted(final ThingId thingId) {
124-
return AttributesDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders());
124+
return AttributesDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders(), null);
125125
}
126126

127127
@Override
128128
public AttributesModified attributesModified(final ThingId thingId, final Attributes attributes) {
129-
return AttributesModified.of(thingId, attributes, -1, Instant.now(), getDefaultDittoHeaders());
129+
return AttributesModified.of(thingId, attributes, -1, Instant.now(), getDefaultDittoHeaders(), null);
130130
}
131131

132132
@Override
133133
public FeatureCreated featureCreated(final ThingId thingId, final Feature feature) {
134-
return FeatureCreated.of(thingId, feature, -1, Instant.now(), getDefaultDittoHeaders());
134+
return FeatureCreated.of(thingId, feature, -1, Instant.now(), getDefaultDittoHeaders(), null);
135135
}
136136

137137
@Override
138138
public FeatureDeleted featureDeleted(final ThingId thingId, final String featureId) {
139-
return FeatureDeleted.of(thingId, featureId, -1, Instant.now(), getDefaultDittoHeaders());
139+
return FeatureDeleted.of(thingId, featureId, -1, Instant.now(), getDefaultDittoHeaders(), null);
140140
}
141141

142142
@Override
143143
public FeatureModified featureModified(final ThingId thingId, final Feature feature) {
144-
return FeatureModified.of(thingId, feature, -1, Instant.now(), getDefaultDittoHeaders());
144+
return FeatureModified.of(thingId, feature, -1, Instant.now(), getDefaultDittoHeaders(), null);
145145
}
146146

147147
@Override
148148
public FeaturesCreated featuresCreated(final ThingId thingId, final Features features) {
149-
return FeaturesCreated.of(thingId, features, -1, Instant.now(), getDefaultDittoHeaders());
149+
return FeaturesCreated.of(thingId, features, -1, Instant.now(), getDefaultDittoHeaders(), null);
150150
}
151151

152152
@Override
153153
public FeaturesDeleted featuresDeleted(final ThingId thingId) {
154-
return FeaturesDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders());
154+
return FeaturesDeleted.of(thingId, -1, Instant.now(), getDefaultDittoHeaders(), null);
155155
}
156156

157157
@Override
158158
public FeaturesModified featuresModified(final ThingId thingId, final Features features) {
159-
return FeaturesModified.of(thingId, features, -1, Instant.now(), getDefaultDittoHeaders());
159+
return FeaturesModified.of(thingId, features, -1, Instant.now(), getDefaultDittoHeaders(), null);
160160
}
161161

162162
@Override
163163
public FeaturePropertiesCreated featurePropertiesCreated(final ThingId thingId, final String featureId,
164164
final FeatureProperties properties) {
165165
return FeaturePropertiesCreated.of(thingId, featureId, properties, -1, Instant.now(),
166-
getDefaultDittoHeaders());
166+
getDefaultDittoHeaders(), null);
167167
}
168168

169169
@Override
170170
public FeaturePropertiesDeleted featurePropertiesDeleted(final ThingId thingId, final String featureId) {
171-
return FeaturePropertiesDeleted.of(thingId, featureId, -1, Instant.now(), getDefaultDittoHeaders());
171+
return FeaturePropertiesDeleted.of(thingId, featureId, -1, Instant.now(), getDefaultDittoHeaders(),
172+
null);
172173
}
173174

174175
@Override
175176
public FeaturePropertiesModified featurePropertiesModified(final ThingId thingId, final String featureId,
176177
final FeatureProperties properties) {
177178
return FeaturePropertiesModified.of(thingId, featureId, properties, -1, Instant.now(),
178-
getDefaultDittoHeaders());
179+
getDefaultDittoHeaders(), null);
179180
}
180181

181182
@Override
182183
public FeaturePropertyCreated featurePropertyCreated(final ThingId thingId, final String featureId,
183184
final JsonPointer propertyJsonPointer, final JsonValue propertyJsonValue) {
184185
return FeaturePropertyCreated.of(thingId, featureId, propertyJsonPointer, propertyJsonValue, -1,
185-
Instant.now(), getDefaultDittoHeaders());
186+
Instant.now(), getDefaultDittoHeaders(), null);
186187
}
187188

188189
@Override
189190
public FeaturePropertyDeleted featurePropertyDeleted(final ThingId thingId, final String featureId,
190191
final JsonPointer propertyJsonPointer) {
191192
return FeaturePropertyDeleted.of(thingId, featureId, propertyJsonPointer, -1, Instant.now(),
192-
getDefaultDittoHeaders());
193+
getDefaultDittoHeaders(), null);
193194
}
194195

195196
@Override
196197
public FeaturePropertyModified featurePropertyModified(final ThingId thingId, final String featureId,
197198
final JsonPointer propertyJsonPointer, final JsonValue propertyJsonValue) {
198199
return FeaturePropertyModified.of(thingId, featureId, propertyJsonPointer, propertyJsonValue, -1,
199-
Instant.now(), getDefaultDittoHeaders());
200+
Instant.now(), getDefaultDittoHeaders(), null);
200201
}
201202

202203
@Override

0 commit comments

Comments
 (0)