Open main menu

CDOT Wiki β

Changes

JSON Integration Adapter Code Review 1 Changes

1,225 bytes removed, 20:52, 26 January 2014
no edit summary
[[category: NexJ Current Projects]]{{Admon/obsolete}} 
[[category: NexJ Express JSON Message Adapter]]
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Issue! DescriptionTasks
! Status
|-
| Exception TODO| Complete exceptions marked by TODO| |- | Document methods fully * Create localization strings in javadoc styleen.strings| Document every method fully in javadoc style. Also document parameters, and use full English sentences. Make sure special settings like root mode or mode are well documented enough * Use message part as argument to use| |- | Make sure exceptions output and not the correct whole message part.| Make sure exceptions output the correct message part, Complete for example the inner partformatter, rather than always the root part. More specific is better.| |- | Remove spaces after new Object[]{(remove space here)}| Remove spaces after the curly brackets may be revisited for all exceptions.| parser
|-
| Add a newline after creating each object or after each decision construct.Documentation| * Add newlines documentation to conform to NexJ coding style.all methods and members* Use full English sentences
|
|-
| Space before break keyword.Code Style* Apply NexJ Code Style* Lines that create new Objects should be between newlines| Put a space * Add newline before all break keywords.| Complete for now (revisit later)
|}
 
===== Design Document =====
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Issue! DescriptionTask
! Status
|-
|Update designDesign Proposal Document* Replace screenshots of Messages with valid messages (some values where missing type)|Design document should reflect all special settings * Make note of JSON parser and formatter. Specifically, any normally standard features which are not implemented by the JSON parser/formatter should be noted. * Add section about required parts and null values* Add section about channels with multiple messages|Complete
|}
 
===== JSONMessagePartMapping =====
{| 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
|}