@Deprecated public interface

Scm3

implements Scm2
com.atlassian.stash.scm.Scm3

This interface is deprecated.
in 3.7 for removal in 4.0. In 4.0 this interface's methods will be folded into Scm and become a mandatory part of the SCM contract.

Class Overview

Overrides the standard Scm methods to require the new transitional interfaces introduced for migrating from "changeset" to "commit". This interface overrides:

This is a transitional interface to retain API compatibility for Scm. Its methods will be folded into Scm in the 4.0 major release.

Note: PluginCommandFactory includes methods which, due to the way erasure works for Java generics, cannot be updated to replace "changeset" with "commit" in a backwards-compatible way. As a result, the SCM changes made in 4.0 will be backwards-incompatible with no possible way to make an SCM compatible with both 3.x and 4.x. Those methods are:

Summary

Public Methods
@Nonnull PluginCommandFactory2 getCommandFactory()
Retrieves a PluginCommandFactory, used to create Command commands for performing standard SCM operations such as retrieving commits and viewing diffs.
@Nullable PluginCompareCommandFactory2 getCompareCommandFactory()
Retrieves a PluginCompareCommandFactory, used to create Command commands tailored for comparing refs.
@Nullable PluginPullRequestCommandFactory2 getPullRequestCommandFactory()
Retrieves a PluginPullRequestCommandFactory, used to create Command commands tailored for use supporting pull requests.
[Expand]
Inherited Methods
From interface com.atlassian.stash.scm.Scm
From interface com.atlassian.stash.scm.Scm2

Public Methods

@Nonnull public PluginCommandFactory2 getCommandFactory ()

Retrieves a PluginCommandFactory, used to create Command commands for performing standard SCM operations such as retrieving commits and viewing diffs. The commands created by the returned factory are used to support normal system functionality; as a result, SCMs are required to provide an implementation.

Implementation Note: This method is required and may not return null.

Returns
  • a command factory, providing access to required SCM functionality

@Nullable public PluginCompareCommandFactory2 getCompareCommandFactory ()

Retrieves a PluginCompareCommandFactory, used to create Command commands tailored for comparing refs.

Implementation Note: This method is optional. SCMs which do not support comparing refs may return null.

Returns
  • a compare command factory, or null if the SCM does not support it

@Nullable public PluginPullRequestCommandFactory2 getPullRequestCommandFactory ()

Retrieves a PluginPullRequestCommandFactory, used to create Command commands tailored for use supporting pull requests. Repositories using an SCM which implements this method will have the ability to create, view and merge pull requests.

Implementation Note: This method is optional. SCMs which do not support pull requests may return null. Repositories using such SCMs will not be able to create pull requests.

Returns
  • a pull request command factory, or null if the SCM does not support pull requests