StateMap deltaState = StateMap.create();
deltaState.fromJsonObject(delta);
final String gadgetId = getOrGenerateGadgetId();
if (gadgetId != null) {
deltaState.each(new Each() {
@Override
public void apply(final String key, final String value) {
supplement.setGadgetState(gadgetId, key, value);
}
});