https://wiki.cdot.senecacollege.ca/w/index.php?title=JSON_Integration_Adapter_Code_Review_3_Changes&feed=atom&action=history
JSON Integration Adapter Code Review 3 Changes - Revision history
2024-03-29T10:26:07Z
Revision history for this page on the wiki
MediaWiki 1.30.0
https://wiki.cdot.senecacollege.ca/w/index.php?title=JSON_Integration_Adapter_Code_Review_3_Changes&diff=104154&oldid=prev
Andrew at 02:49, 27 January 2014
2014-01-27T02:49:08Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 02:49, 27 January 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Admon/obsolete}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[category: NexJ Express JSON Message Adapter]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[category: NexJ Express JSON Message Adapter]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Andrew
https://wiki.cdot.senecacollege.ca/w/index.php?title=JSON_Integration_Adapter_Code_Review_3_Changes&diff=80570&oldid=prev
Gbatumbya: /* JSONMessageFormatter.java */
2012-02-04T16:14:04Z
<p><span dir="auto"><span class="autocomment">JSONMessageFormatter.java</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:14, 4 February 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l252" >Line 252:</td>
<td colspan="2" class="diff-lineno">Line 252:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|<code>|| ((nMinCount == nMaxCount) && (nCount != nMinCount))</code> this condition is invalid and will produce an incorrect error message</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code>|| ((nMinCount == nMaxCount) && (nCount != nMinCount))</code> this condition is invalid and will produce an incorrect error message</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l261" >Line 261:</td>
<td colspan="2" class="diff-lineno">Line 262:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=====JSONMessageParser.java=====</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=====JSONMessageParser.java=====</div></td></tr>
</table>
Gbatumbya
https://wiki.cdot.senecacollege.ca/w/index.php?title=JSON_Integration_Adapter_Code_Review_3_Changes&diff=80569&oldid=prev
Gbatumbya: /* XMLJSONMessageMappingLoader.java */
2012-02-04T16:13:44Z
<p><span dir="auto"><span class="autocomment">XMLJSONMessageMappingLoader.java</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:13, 4 February 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l218" >Line 218:</td>
<td colspan="2" class="diff-lineno">Line 218:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|<code>if (!"true".equals(sFormat) || !"false".equals(sFormat))</code>  </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code>if (!"true".equals(sFormat) || !"false".equals(sFormat))</code>  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>-> this always evaluates to true - please fix the logic. <br/></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>-> this always evaluates to true - please fix the logic. <br/></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>A format that is just "true" or just "false" seems uncommon though. Did you mean "true;false"?</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>A format that is just "true" or just "false" seems uncommon though. Did you mean "true;false"?</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l226" >Line 226:</td>
<td colspan="2" class="diff-lineno">Line 227:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|Complete</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=====JSONMessageFormatter.java=====</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=====JSONMessageFormatter.java=====</div></td></tr>
</table>
Gbatumbya
https://wiki.cdot.senecacollege.ca/w/index.php?title=JSON_Integration_Adapter_Code_Review_3_Changes&diff=80568&oldid=prev
Gbatumbya: Created page with 'category: NexJ Express JSON Message Adapter ===== General ===== The most important changes are: * Changing the terminology and the mapping property type around the mapping m…'
2012-02-04T16:12:49Z
<p>Created page with '<a href="/wiki/Category:NexJ_Express_JSON_Message_Adapter" title="Category:NexJ Express JSON Message Adapter">category: NexJ Express JSON Message Adapter</a> ===== General ===== The most important changes are: * Changing the terminology and the mapping property type around the mapping m…'</p>
<p><b>New page</b></p><div>[[category: NexJ Express JSON Message Adapter]]<br />
<br />
===== General =====<br />
The most important changes are:<br />
* Changing the terminology and the mapping property type around the mapping modes.<br />
* Removing the circular ref and OID support, since they do not make sense for the integration engine.<br />
* Refactoring of the message parser to remove the duplicated parsing logic (there are two possible approaches with this)<br />
*Spaces generally must not be removed from existing files, as a trivial change and a goal in itself, since it makes it very hard to apply patches to already modified code.<br />
These include src/nexj/core/scripting/GenericParser.java and /core/test/nexj/core/integration/format/xml/XMLMessageParserTest.java<br />
<br />
<br />
=====GenericParser.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| Please undo (I have found only trivial space-removal changes)<br />
|Complete<br />
|}<br />
<br />
<br />
=====XML_FormatString.message, XMLMessageParserTest.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|Why have these been changed? Please undo.<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONWriter.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|Please undo all the method renaming - this breaks a number of classes in the enterprise project, and was not needed in the first place.<br />
Trivial code modifications are discouraged, since they tend to complicate merges and sometimes, like in this case, even break code.<br />
|Complete<br />
|-<br />
| Remove TOKEN_END_OBJECT and TOKEN_END_ARRAY public constants.<br />
The object and array should be closed by invoking a corresponding method on JSONWriter.<br />
Having these constants exposes implementation details and breaks any attempts to subclass this class.<br />
|Complete<br />
|-<br />
|Remove writeBoolean(Boolean). It will break if the value is null, and is not really needed. Invoke writeBoolean(boolean) instead.<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONMarshaller.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| Undo the trivial method renaming<br />
|Complete<br />
|}<br />
<br />
<br />
=====baseTypes.xsd=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| Array is JSON - leave only one space after JSON<br />
|Complete<br />
|-<br />
|Node -> message part<br />
|Complete<br />
|-<br />
|'It is also called "typed array".' -> remove this phrase<br />
|Complete<br />
|-<br />
|typed array -> root. Put this after the array.<br />
|Complete<br />
|-<br />
|mode -> subtype<br />
|Complete<br />
|-<br />
|Use an enum instead of an integer for mode, this is far more developer friendly, and does not need a coding table: e.g. subtype="array|root". The subtype should be empty by default.<br />
|Complete<br />
|-<br />
| We should have a "name" attribute for mapping object part keys, as well as subtypes for dates and binary values, like in the XML formatter<br />
|Complete<br />
|}<br />
<br />
<br />
=====en.strings=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| err.integration.json.parse.binary.expectedString=Error parsing binary for "{0}", was expecting a string value but found\: {1}. <br/><br />
-> err.integration.json.parse.binary=Invalid binary value for message part "{0}" (expected a string).<br />
|Complete<br />
|-<br />
|Do not include actual data values in error messages, for privacy reasons. <br/><br />
err.integration.json.parse.binary.invalidBase64=Invalid base64 format for message part "{0}". <br/><br />
-> err.integration.json.parse.base64=Invalid base64 value for message part "{0}".<br />
|Complete<br />
|-<br />
|*err.integration.json.parse.duplicateKey=Found duplicate key\: "{0}". <br/><br />
-> err.integration.json.parse.duplicateKey=Duplicate object key\: "{0}". <br />
*Can you include the message part path in the message? <br />
|Complete<br />
|-<br />
|err.integration.json.parse.oidExpectedString=Error parsing OID for "{0}", was expecting a string value but found\: {1}.<br/><br />
-> err.integration.json.parse.oid =Invalid OID for message part "{0}" (expected a string).<br />
|Complete<br />
|-<br />
|err.integration.json.parse.oidInvalidBase64=Error parsing OID for "{0}", invalid base64 format at\: Line "{1}", Column "{2}". <br/><br />
-> err.integration.json.parse.base64= Invalid base64 value for message part "{0}".<br />
|Complete<br />
|-<br />
| err.integration.json.parse.primitiveTypeMismatch=Error parsing "{0}", was expecting a {1} value but found\: {2}. <br/><br />
-> err.integration.json.parse.typeMismatch=Type mismatch in message part "{0}" (expected a "{1}").<br />
|Complete<br />
|-<br />
|err.integration.json.parse.requiredValueNull=Error parsing "{0}", required part cannot be "null". <br/><br />
-> err.integration.json.parse.requiredNull=Required message part "{0}" is null.<br />
|Complete<br />
|-<br />
|err.integration.json.parse.timestamp=Error parsing timestamp for "{0}", was expecting a number value but found\: {1}. <br/><br />
-> err.integration.json.parse.timestamp=Invalid timestamp for message part "{0}" (expected a numeric value).<br />
|Complete<br />
|-<br />
|err.integration.json.parse.unexpectedToken=Error parsing "{0}", was expecting "{1}" but found "{2}". <br/><br />
-> err.integration.json.parse.unexpectedToken=Unexpected token in message part "{0}" (expected "{1}").<br />
|Complete<br />
|-<br />
|err.meta.integration.json.anyOrdinalCannotHaveFormat=Primitive message part "{0}" of type any ordinal cannot have a format string.<br/><br />
-> err.meta.integration.json.anyFormat=Primitive message part "{0}" of type any cannot have a format pattern.<br />
|Complete<br />
|-<br />
|err.meta.integration.json.invalidMessageFormatMode=Invalid message format mode "{0}" in RootJSONMessagePartMapping for "{1}". <br/><br />
-> err.meta.integration.json.invalidSubtype=Invalid subtype "{0}" in the mapping of message part "{1}".<br />
|Complete<br />
|-<br />
|err.meta.integration.json.invalidTypedArray.notCollection=Typed array message {0} child part must be a collection. <br/><br />
-> no, not really. Remove.<br />
|Complete<br />
|-<br />
|err.meta.integration.json.invalidTypedArray.notOnePart=Typed array message {0} may only have one child part. <br/><br />
-> err.meta.integration.json.rootChild =Root message part "{0}" must have exactly one child part.<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONMessagePartMapping.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|move m_sFormat, m_bQuote up, into the // attributes section - this is a coding convention<br />
|Complete<br />
|-<br />
|m_bQuote -> m_bQuoted<br />
|Complete<br />
|-<br />
|ToBeQuoted -> Quoted<br />
|Compelte<br />
|-<br />
|Group setter and getters together logically, in the beginning of the operations: setter1 getter1 setter2 getter2... <br/><br />
Having the operations grouped alphabetically makes it hard to read the code.<br />
|Complete<br />
|}<br />
<br />
<br />
=====RootJSONMessagePartMapping.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| RootJSONMessagePartMapping -> CompositeJSONMessagePartMapping (since it is not just for the root message part, right?)<br />
|Complete<br />
|-<br />
|m_nMessageFormat -> m_nSubtype<br />
|Complete<br />
|-<br />
|Defaults to {@link RootJSONMessagePartMapping#FORMAT_OBJECT}. - remove the comment and assign the actual value instead.<br />
|Complete<br />
|-<br />
|static final -> final static (convention)<br />
|Complete<br />
|-<br />
|FORMAT_ -> SUBTYPE_<br />
|Complete<br />
|-<br />
|FORMAT_TYPED_ARRAY -> SUBTYPE_ROOT = 2<br />
|Complete<br />
|-<br />
|Move constants up, before the attributes<br />
|Complete<br />
|-<br />
|MessageFormatMode -> Subtype; The validation is not needed, since it will be validated in the loader when parsing the symbol value.<br />
|Complete<br />
|}<br />
<br />
<br />
=====XMLJSONMessageMappingLoader.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|<code>throw new MetadataException("err.meta.integration.json.anyOrdinalCannotHaveFormat", new Object[]{part.getFullPath()});</code><br />
*Try to do this validation in the mapping instead<br />
*The same applies to the format validation and the business logic for setting the quoted flag - move to the mapping<br />
|Complete<br />
|-<br />
|<code>if (!"true".equals(sFormat) || !"false".equals(sFormat))</code> <br />
-> this always evaluates to true - please fix the logic. <br/><br />
A format that is just "true" or just "false" seems uncommon though. Did you mean "true;false"?<br />
|Compelte<br />
|-<br />
|All regexp pattern should be precompiled in final static constants.<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONMessageFormatter.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|We should format or parse message part without OIDs and circular refs. <br/><br />
The integration engine is designed to deal with hierarchical messages and circular ones can get it into faulty code paths. <br/><br />
It is supposed to support only the most basic conventions and not output or expect messages that require special handling from the external system. <br/><br />
This is needed to facilitate easy integration. Circular refs and OIDs are used in our RPC marshaller, but the goals of the integration engine are quire different. <br/><br />
|Complete<br />
|-<br />
| m_objectMap - not needed anymore<br />
|Complete<br />
|-<br />
|formatCompositeMessagePart - instead of using nChar, invoke the corresponding writer output methods.<br />
|Complete<br />
|-<br />
|Remove the OID management code<br />
|Complete<br />
|-<br />
| Add code for handling the primitive subtypes (hex, base64, dateTime, date, time)<br />
|Complete<br />
|-<br />
|<code>|| ((nMinCount == nMaxCount) && (nCount != nMinCount))</code> this condition is invalid and will produce an incorrect error message<br />
|Complete<br />
|-<br />
|Do not use j as a counter. Use k instead. j looks like i under many fonts.<br />
|Complete<br />
|-<br />
|writePrimitive - use a switch for nPartType, rather than several if statements.<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONMessageParser.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
|m_objectMap - not needed anymore<br />
|Complete<br />
|-<br />
|The overridden methods, like parseObject(), parseElement(), parseArray() etc have a very similar logic to the superclass methods. To avoid duplication, it is better to handle any custom logic needed in these with template methods, like constructing a TransferObject instead of a hashtab e.g. Object createObject(), addObjectValue(Object obj, String sKey, Object value), createArray(), Object addArrayValue(Object array, Object value). <br/><br />
The overriden methods parse* will save and restore the current message part and will check if the structure they parse corresponds to the current message part type and mapping. <br/><br />
This should not introduce a dependency on the integration classes in JSONParser. <br/><br />
Keep the template methods simple. <br/><br />
Alternatively, do not override the base class parse* methods, but just convert the parsing results to transfer objects on a second pass (this can help with message tables, see below).<br />
|Complete (Implemented a hybrid, message table parsing uses a second pass, while direct parsing uses overridden methods)<br />
|-<br />
|It should be possible to parse a primitive message, e.g. 1 or "abc". The mapping for this has subtype="root" and the only message part corresponds to this primitive type.<br />
|Complete<br />
|-<br />
|parsePartValue - m_currentMessagePart .isCollection() - remove the space<br />
|Complete<br />
|- <br />
|initializeMessageTable - it is possible to support more than one message with an object subtype. The mapping can support an additional property key="<key>:<value>", designating a key and a value, which must establish a unique combination for identifying the message in the table. This way we can have also message polymorphism (later phase?).<br />
|Complete<br />
|}<br />
<br />
<br />
=====JSONMessageTest.java=====<br />
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"<br />
|-<br />
! Tasks<br />
! Status<br />
|-<br />
| FORMART -> FORMAT<br />
|Complete<br />
|}</div>
Gbatumbya