-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Is your feature request related to a problem? Please describe
I'm interested in extending some inventory-tool cli and core functionalities. Currently, there is not method available other that forking both repositories.
For example, I want to extend core GraphMergerImpl logic. This logic should be invoked from cli.
Unfortunately cli hardcoded instantiation org.qubership.itool.modules.processor.GraphMerger in the org.qubership.itool.tasks.ci.MergeGraphsVerticle
And I have no any abilities to override this logic. All I can is copy-paste whole MergeGraphsVerticle even we are talking about single line.
All I can is to copy-paste this MergeGraphsVerticle and change GraphMerger instantiation. But it means I need to fork both CORE and CLI repositories.
The same problem with the DiagramProvider. If I want to change/add DiagramProvider there is not method to do it.
All I can is to copy-paste all classes from the org.qubership.itool.cli.ci package and override AbstractCommand.configLoaded() method (need to change instantiation of the FlowContextImpl to the my new CustomFlowContextImpl class).
Describe the solution you'd like
Please provide a consistent and easy method for extending functionality in the CORE and CLI components.
Something like as a Plugin Management or Application Context + Dependency Injection solution.
Describe alternatives you've considered
No response
Additional information
Currently I'm blocked by the following codes:
qubership-inventory-tool-cli/src/main/java/org/qubership/itool/cli/AbstractCommand.java
Line 80 in 663f986
| FlowContextImpl flowContext = new FlowContextImpl(graphService); |
and
qubership-inventory-tool-cli/src/main/java/org/qubership/itool/tasks/ci/MergeGraphsVerticle.java
Line 46 in 663f986
| try (GraphMerger merger = new GraphMerger(vertx, false)) { |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status