Riduidel / aadarchi

A maven archetype to generate easily projects allowing architecture description using a mix of C4, agile architecture, Asciidoc and PlantUML
https://riduidel.github.io/aadarchi/
Apache License 2.0
40 stars 12 forks source link

Rewrite SCMHandler to not require the for each loop when trying to use the good one #308

Closed Riduidel closed 1 year ago

Riduidel commented 1 year ago

Currently, when we want to access elements from SCM, we have to iterate over SCM Handler each time. This is not good, since it implies connections to each servers. Furthermore, this does not leverages our ability to use caching and other "smart" behaviours. We should rewrite that to have automated caching and avoid the SCMHandler iteration. For that, we maybe could use functional-style programming (and access SCMHandlers otherwise).

Typically, we could have a SCMHandlerFacade which has all SCM handlers injected and maintains a map linking projects paths to used SCMHandlers. This method would use functions with a project given as parameter and a function having as argument the SCMHandler to user.

Riduidel commented 1 year ago

Fixes in bc72758