Skip to content

Possibilities for extending functionalities #41

@AleksandrDederer

Description

@AleksandrDederer

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:

FlowContextImpl flowContext = new FlowContextImpl(graphService);

and

try (GraphMerger merger = new GraphMerger(vertx, false)) {

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions