Enum VcsHost
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classVcsHost.Companion
-
Enum Constant Summary
Enum Constants Enum Constant Description AZURE_DEVOPSBITBUCKETThe enum constant to handle Bitbucket[https://bitbucket.org/]-specific information.
GITHUBThe enum constant to handle GitHub[https://github.com/]-specific information.
GITLABThe enum constant to handle GitLab[https://gitlab.com/]-specific information.
SOURCEHUT
-
Method Summary
Modifier and Type Method Description BooleanisApplicable(URI url)Return whether this host is applicable for the url URI. final BooleanisApplicable(String url)Return whether this host is applicable for the url string. final BooleanisApplicable(VcsInfo vcsInfo)Return whether this host is applicable for vcsInfo. final StringgetUserOrOrganization(String projectUrl)Return the user or organization name the project belongs to. final StringgetProject(String projectUrl)Return the project's name. final VcsInfotoVcsInfo(String projectUrl)Return all VcsInfo that can be extracted from the host-specific projectUrl. final StringtoPermalink(VcsInfo vcsInfo, Integer startLine, Integer endLine)Return the host-specific permanent link to browse the code location described by vcsInfo with optional highlighting of startLine to endLine. final StringtoArchiveDownloadUrl(VcsInfo vcsInfo)Return the download URL to an archive generated for the referenced vcsInfo, or null if no download URL can be determined. abstract StringtoArchiveDownloadUrlInternal(String userOrOrg, String project, VcsInfo vcsInfo)final StringtoRawDownloadUrl(String fileUrl)Return the download URL to the raw file referenced by fileUrl, or null if no raw download URL can be determined. abstract StringtoRawDownloadUrlInternal(String userOrOrg, String project, VcsInfo vcsInfo)final VcsHostvalueOf(String value)Returns the enum constant of this type with the specified name. final Array<VcsHost>values()Returns an array containing the constants of this enum type, in the order they're declared. final StringgetHostname()The hostname of VCS host. final EnumEntries<VcsHost>getEntries()An enum to handle VCS-host-specific information. -
-
Method Detail
-
isApplicable
Boolean isApplicable(URI url)
Return whether this host is applicable for the url URI.
-
isApplicable
final Boolean isApplicable(String url)
Return whether this host is applicable for the url string.
-
isApplicable
final Boolean isApplicable(VcsInfo vcsInfo)
Return whether this host is applicable for vcsInfo.
-
getUserOrOrganization
final String getUserOrOrganization(String projectUrl)
Return the user or organization name the project belongs to.
-
getProject
final String getProject(String projectUrl)
Return the project's name.
-
toVcsInfo
final VcsInfo toVcsInfo(String projectUrl)
Return all VcsInfo that can be extracted from the host-specific projectUrl.
-
toPermalink
final String toPermalink(VcsInfo vcsInfo, Integer startLine, Integer endLine)
Return the host-specific permanent link to browse the code location described by vcsInfo with optional highlighting of startLine to endLine.
-
toArchiveDownloadUrl
final String toArchiveDownloadUrl(VcsInfo vcsInfo)
Return the download URL to an archive generated for the referenced vcsInfo, or null if no download URL can be determined.
-
toArchiveDownloadUrlInternal
abstract String toArchiveDownloadUrlInternal(String userOrOrg, String project, VcsInfo vcsInfo)
-
toRawDownloadUrl
final String toRawDownloadUrl(String fileUrl)
Return the download URL to the raw file referenced by fileUrl, or null if no raw download URL can be determined.
-
toRawDownloadUrlInternal
abstract String toRawDownloadUrlInternal(String userOrOrg, String project, VcsInfo vcsInfo)
-
valueOf
final VcsHost valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<VcsHost> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getHostname
final String getHostname()
The hostname of VCS host.
-
getEntries
final EnumEntries<VcsHost> getEntries()
An enum to handle VCS-host-specific information.
-
-
-
-