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.
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.