long defaultUid = event.getLong(senseiSchema.getUidField());
if (event.opt(SenseiSchema.EVENT_TYPE_FIELD) != null && event.optString(SenseiSchema.EVENT_TYPE_FIELD).equals(SenseiSchema.EVENT_TYPE_DELETE)) {
activityValues.delete(defaultUid);
return event;
}
ActivityFilteredResult activityFilteredResult = activityFilter.filter(event, senseiSchema, shardingStrategy, senseiCore);
onlyActivityUpdate = onlyActivityUpdate || activityFilteredResult.getFilteredObject() == null || activityFilteredResult.getFilteredObject().length() == 0 ||SenseiSchema.EVENT_TYPE_SKIP.equals(activityFilteredResult.getFilteredObject().opt(SenseiSchema.EVENT_TYPE_FIELD));
for (long uid : activityFilteredResult.getActivityValues().keySet()) {
if ( activityFilteredResult.getActivityValues().get(uid) == null || activityFilteredResult.getActivityValues().get(uid).size() == 0) {
continue;
}
int previousIndex = activityValues.getIndexByUID(uid);
int index = activityValues.update(uid, version, activityFilteredResult.getActivityValues().get(uid));
if (index >= 0 && previousIndex < 0 && (onlyActivityUpdate || defaultUid != uid)) {
updateExistingBoboIndexes(uid, index, activityFilteredResult.getActivityValues().get(uid).keySet());
}
}
return activityFilteredResult.getFilteredObject();
} catch (JSONException ex) {
throw new RuntimeException(ex);
}
}