Closed MoonBow-1 closed 7 months ago
Renaming has been done in stages, going to work on the Promise class with a generic type next
Worked on other tickets first, so the refactoring would be simpler with new changes
Going to look more into generics, and how they could be used in the Promise class.
Going to switch the generic type argument to an interface for RelpPromise class
Initial Interface has been added, going to look more into overrides tomorrow
Decided to not override the default method, but use the implementation instead
Interface has been refactored to be more object-oriented, now has 3 methods for "getting" different objects from the Promises.
There is a possibility that the generic type parameter from the Promise class is removed, but going to discuss that soon/now. (This is related to the use of instanceof
method/function of Java)
Removal of the generic type argument is in progress, all unit tests pass, but will need to confirm with CFE-18 endpoints once the JSON response is implemented on both sides (breaking changes on CFE-18 responses).
The "Parser" name doesn't conform into OOP naming practices, hence it should be name something like "Hub". The parseDirs method inside the Parser class should be elevated into its own class and called PromiseList. CFE-01 and RELP Parsers should be renamed to ...Promise (This will be a single class with a generic type parameter.