Package sonia.scm

Interface SCMContextProvider

All Known Implementing Classes:
BasicContextProvider

public interface SCMContextProvider
The main class for retrieving the home and the version of the SCM-Manager. This class is a singleton which can be retrieved via injection or with the static SCMContext.getContext() method.
  • Method Details

    • getBaseDirectory

      File getBaseDirectory()
      Returns the base directory of the SCM-Manager.
    • resolve

      Path resolve(Path path)
      Resolves the given path against the base directory.
      Parameters:
      path - path to resolve
      Returns:
      absolute resolved path
      Since:
      2.0.0
    • getStage

      Stage getStage()
      Returns the current stage of SCM-Manager.
      Since:
      1.12
    • getStartupError

      Throwable getStartupError()
      Returns an exception which is occurred on context startup. The method returns null if the start was successful.
      Returns:
      startup exception of null
      Since:
      1.14
    • getVersion

      String getVersion()
      Returns the version of the SCM-Manager.
    • getDocumentationVersion

      default String getDocumentationVersion()
      Returns the version of the SCM-Manager used in documentation urls (e.g. version 2.17.0 and 2.17.1 will all result in 2.17.x). The default implementation works for versions with three parts (major version, minor version, and patch version, where the patch version will be replaced with an 'x').
      Since:
      2.17.0
    • getInstanceId

      default String getInstanceId()
      Returns the instance id of the SCM-Manager used.
      Since:
      2.30.0