Ravi Nori has posted comments on this change.

Change subject: engine: Add infrastructure code for removal of parameter classes
......................................................................


Patch Set 11:

(2 comments)

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializer.java
Line 55:         
formattedMapper.getSerializationConfig().addMixInAnnotations(VmBase.class, 
JsonVmBaseMixIn.class);
Line 56:         
formattedMapper.getSerializationConfig().addMixInAnnotations(VmStatic.class, 
JsonVmStaticMixIn.class);
Line 57:         
formattedMapper.getSerializationConfig().addMixInAnnotations(VmPayload.class, 
JsonVmPayloadMixIn.class);
Line 58:         formattedMapper.configure(Feature.INDENT_OUTPUT, true);
Line 59:         SimpleModule module = new SimpleModule("VdcParameterModule", 
new Version(1, 0, 0, "M"));
No rule it is just needed, just Maven style
Line 60:         module.addKeySerializer(VdcParameter.class, new 
VdcParameterSerializer());
Line 61:         formattedMapper.registerModule(module);
Line 62:         formattedMapper.enableDefaultTyping();
Line 63:     }


Line 99:     public String serializeUnformattedJson(Serializable payload) 
throws SerializationExeption {
Line 100:         return writeJsonAsString(payload, unformattedMapper);
Line 101:     }
Line 102: 
Line 103:     private static class VdcParameterSerializer extends 
JsonSerializer<VdcParameter> {
We need it to serialize and deserialize Maps in Jackson. I think it is best 
left here
Line 104:         @Override
Line 105:         public void serialize(VdcParameter key, JsonGenerator jg, 
SerializerProvider sp) throws IOException {
Line 106:             jg.writeFieldName(VdcParameter.serialize(key));
Line 107:         }


-- 
To view, visit http://gerrit.ovirt.org/20414
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6a0970e492c0eff561888a46b02e47645ff68fc3
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: mooli tayer <mta...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to