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

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.

Change-Id: I4d3a1710caa0817faf610f191c4d798a9a43d5ff
15 files changed
tree: 1df6c72f812c722cb56f9b82835ea4096c723beb
  1. .settings/
  2. src/
  3. tools/
  4. .gitignore
  5. bazlets.bzl
  6. BUILD