@Deprecated public interface

Scm2

implements Scm
com.atlassian.stash.scm.Scm2
Known Indirect Subclasses

This interface is deprecated.
in 3.4 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

Adds support for enumerating supported features.

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

Summary

Public Methods
@Nonnull Set<ScmFeature> getFeatures()
Retrieves the ScmFeature features that are supported by this SCM.
[Expand]
Inherited Methods
From interface com.atlassian.stash.scm.Scm

Public Methods

@Nonnull public Set<ScmFeature> getFeatures ()

Retrieves the ScmFeature features that are supported by this SCM.

Since the system relies on optional features to provide some functionality, like branch compare and pull requests, it relies on this set to disable functionality that requires features the SCM doesn't provide. Similarly, plugin developers can use the returned features to control which optional features they try to use, rather than checking for null or handling UnsupportedOperationExceptions.

Returns
  • the set of optional features this SCM supports, which may be empty but never null