@ThreadSafe public interface ScmProtocol
Scm's
support for a protocol and for generating protocol-specific
clone URLs for repositories
of that kind
.
This extension point is not used to implement such a protocol, merely to indicate that it is supported.
Note: Implementations of this interface are required to be thread-safe.
Modifier and Type | Method and Description |
---|---|
String |
getBaseUrl() |
String |
getCloneUrl(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.user.ApplicationUser user)
Retrieves the clone URL specific to this protocol for the supplied
repository and, if
appropriate, tailored to the supplied user . |
String |
getName() |
default boolean |
supports(Scm scm)
Determines if this protocol supports the specified
SCM . |
boolean |
supports(String scmId)
|
@Nonnull String getBaseUrl()
clone URLs
, which
must not be null
@Nullable String getCloneUrl(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nullable com.atlassian.bitbucket.user.ApplicationUser user)
repository
and, if
appropriate, tailored to the supplied user
. Implementations must handle the case where
there is no such user active.repository
- the repository to calculate the clone URL againstuser
- the possibly null user to tailor the clone URL for if this is appropriate to the protocol@Nonnull String getName()
default boolean supports(@Nonnull Scm scm)
SCM
.scm
- the scmScm
or false otherwiseCopyright © 2024 Atlassian. All rights reserved.