Package org.ossreviewtoolkit.downloader
Object VcsHost.Companion
-
- All Implemented Interfaces:
public class VcsHost.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static VcsHost.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final VcsHostfromUrl(URI url)Return the applicable VcsHost for the given url, or null if no applicable host is found. final VcsHostfromUrl(String url)Return the applicable VcsHost for the given url, or null if no applicable host is found. final VcsInfoparseUrl(String vcsUrl)Return all VcsInfo that can be parsed from the vcsUrl without actually making a network request. 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. 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. final StringgetProject(String projectUrl)Return the project's name, with generic handling of unknown VCS hosts (those not covered by the enumeration, e.g. -
-
Method Detail
-
parseUrl
final VcsInfo parseUrl(String vcsUrl)
Return all VcsInfo that can be parsed from the vcsUrl without actually making a network request.
-
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.
-
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.
-
getProject
final String getProject(String projectUrl)
Return the project's name, with generic handling of unknown VCS hosts (those not covered by the enumeration, e.g. an on-premises Git server).
-
-
-
-