Open main menu

CDOT Wiki β

Changes

JSON Integration Adapter Code Review 1 Changes

683 bytes removed, 20:52, 26 January 2014
no edit summary
{{Admon/obsolete}}
 
[[category: NexJ Express JSON Message Adapter]]
* Create localization strings in en.strings
* Use message part as argument to exceptions and not the whole message
| Complete for formatter, may be revisited for parser
|-
| Documentation
* Lines that create new Objects should be between newlines
* Add newline before break
| Complete for now (revisit later)
|}
* Replace screenshots of Messages with valid messages (some values where missing type)
* Make note of any normally standard features which are not implemented by the JSON parser/formatter
* Add section about required parts and null values* Add section about channels with multiple messages|Complete
|}
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Issue! DescriptionTask
! Status
|-
| Use Hashholder instead of HashSet
| Use HashHolder in the XMLJSONMessagePartLoader instead of HashSet and whenever appropriate replace HashSet with HashHolder|Complete
|-
| Change 0x000 for byteinitialization| For root modes, change 0xXXX to a cast to byte. Also do not use * Remove leading zeroes.zeros| Complete
|-
| StringParser* Remove StringParsre from JSONMessagePartMapping| Either remove StringParser from the mapping, or use it in formatting primitives. Do not leave it in if it is not used.needed| Complete
|-
| Create class called RootJSONMessagePartMapping| * Create a class called RootJSONMessagePartMapping for each CompositeMessagePart. This * Extend JSONMessagePartMapping and move all root JSON mapping will handle the "mode" for each CompositeMessagePartsettings to this.| Complete
|-
| Allow root Composite Message Part modes for each CompositeMessagePart| * Rename root mode to mode, so that each CompositeMessagePart can use every type of * Allow all composite message parts to have a mode.| Complete
|-
| Rename m_sFormat| Rename the variable m_sFormat * Remove if not used (or use it and keep the name).needed| Complete
|}
 
===== JSONMessageParser =====
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Issue! DescriptionTask
! Status
|-
| Remove/Use InvocationContextAware| * Do not implement the invocation context aware interface if not used by the class. Or, use the interface for formatting of primitives.| Complete
|-
| Name Rename methods XXXPart, not XXXNode| Rename methods to be XXXPart, for example as writeCompositeMessagePart, instead of writeCompositeMessageNode.| Complete
|-
| Wrap fail| 1. Wrap all instances of fail with IntegrationExceptionso that is throws expection right away<br>2.Move fail statements from bottom to top, remove else clauses | 1. Complete <br>2. Incomplete
|-
| Override JSONParseparse()| * Override parse method of JSONParser in the JSONMessageParser class. Do this to avoid changing JSONParser.always return a TransferObject
|
|-
| Use parsing primitive formatter when reading.values| When reading information in from a stream in the formatter, use * Use primitive formatter to determine the correct format of a primitive.on values that are parsed before storing them| Complete
|}
 
===== JSONMessageFormatter =====
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Issue! DescriptionTask
! Status
|-
| Format primitive values before outputting to writers.| Use the StringFormatter to format primitive values before outputting to the writer. For example, timestamps must be formatted before outputting to the writer* Make of use of mapping.getFormat()| Complete
|-
| Pass enumerations into formatMessageRoot
| * Do not use member/class variables for storing information unless absolutely necessary. Prefer to pass parameters around so that objects do not grow large as the parser/formatter iterates.| Complete
|}