Class BackendManager

java.lang.Object
io.github.jbastgen.stemma.app.git.BackendManager

public final class BackendManager extends Object
Turns the user's BackendSettings into a ready-to-use GitBackend.
  • Constructor Details

    • BackendManager

      public BackendManager(io.github.jbastgen.stemma.git.cli.GitDiscovery discovery)
      Parameters:
      discovery - finds the git installations of this computer
  • Method Details

    • discovery

      public io.github.jbastgen.stemma.git.cli.GitDiscovery discovery()
      The discovery of git installations, also used by the settings dialog.
    • create

      public io.github.jbastgen.stemma.git.api.GitBackend create(BackendSettings settings)
      Creates the backend exactly as requested.
      Throws:
      io.github.jbastgen.stemma.git.api.GitException - if system git is requested but no usable installation is found
    • createOrFallback

      public BackendManager.Choice createOrFallback(BackendSettings settings)
      Like create(io.github.jbastgen.stemma.app.config.BackendSettings) but never fails: falls back to the built-in backend and says why.