Support connection to multiple its-servers
So far, its-base derived plugins were able to connect only to a single
server whose configuration was defined in gerrit_site/etc/gerrit.config.
In enterprise environments, it is not unusual to have multiple instances
of the same ITS serving different clients. In case of its-* plugins, the
only way to achieve the integration of different clients with Gerrit was
to deploy multiple copies of the its plugin with different names.
This change is an attempt to bring a more flexible way of supporting the
described use case, i.e., multiple instances of the same ITS. Given the
information about the project name is handled by its-base and not passed
directly to the derivative plugins, a new interface, 'ItsFacadeFactory',
facilitates the tunnelling of information to and from its-base.
The child its-plugins can implement both single or multiple servers as
In the first case, child its-plugins need to bind the 'ItsFacadeFactory'
interface to the 'SingleItsServer' implementation and no further code
change is required.
In the multiple servers case, child its-plugins need to implement the
'ItsFacade' interface in such a way that it captures the project name
passed by its-base to the its-child plugin and the latter will send back
the 'ItsFacade' object to its-base. An example of such mechanism is in
the its-jira plugin.
15 files changed