Interface VcsRepositoryViewer
- All Known Implementing Classes:
BitbucketCloudVcsRepositoryViewer,BitbucketServerForGitViewer,BitbucketServerVcsRepositoryViewer,FishEyeRepositoryViewer,GenericRepositoryViewer,GitHubVcsRepositoryViewer
public interface VcsRepositoryViewer
Provides links to a remote system based on repository configuration and commit information.
- Since:
- 5.14
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetWebRepositoryUrlForFile(@NotNull CommitFile file, @NotNull VcsRepositoryData repositoryData) Generate the link to a given file in a given repository@Nullable StringgetWebRepositoryUrlForFileDiff(@NotNull CommitFile file, @NotNull VcsRepositoryData repositoryData) Generate the link to a given file, showing changes in given revision.@Nullable StringgetWebRepositoryUrlForFileRevision(@NotNull CommitFile file, @NotNull VcsRepositoryData repositoryData) Generate the link to a given file in a given repository at given revision,@Nullable StringgetWebRepositoryUrlForRevision(@NotNull String revisionId, @NotNull VcsRepositoryData repositoryData) Provide the url to link to the given revision in the web repositorygetWebRepositoryUrlForRevisions(Stream<String> revisionIds, VcsRepositoryData repositoryDefinition) Provide the urls to link all the given commits in the web repository
-
Method Details
-
getWebRepositoryUrlForRevision
@Nullable @Nullable String getWebRepositoryUrlForRevision(@NotNull @NotNull String revisionId, @NotNull @NotNull VcsRepositoryData repositoryData) Provide the url to link to the given revision in the web repository- Parameters:
revisionId- the revision to links to. Should not be blank or null.repositoryData- the repository type the commit came from- Returns:
- a full url string.
-
getWebRepositoryUrlForRevisions
@NotNull @NotNull Map<String,String> getWebRepositoryUrlForRevisions(Stream<String> revisionIds, VcsRepositoryData repositoryDefinition) Provide the urls to link all the given commits in the web repository- Parameters:
revisionIds- to generate links for. Stream should not contain empty values or nulls.repositoryDefinition- the repository type the commit came from- Returns:
- a map of the commit to its url.
-
getWebRepositoryUrlForFile
@Nullable @Nullable String getWebRepositoryUrlForFile(@NotNull @NotNull CommitFile file, @NotNull @NotNull VcsRepositoryData repositoryData) Generate the link to a given file in a given repository- Parameters:
file- The file we want to link to.repositoryData- For the build (and hense the repository file belongs to).- Returns:
- The url
-
getWebRepositoryUrlForFileRevision
@Nullable @Nullable String getWebRepositoryUrlForFileRevision(@NotNull @NotNull CommitFile file, @NotNull @NotNull VcsRepositoryData repositoryData) Generate the link to a given file in a given repository at given revision,- Parameters:
file- The file we want to link to.repositoryData- For the build (and hense the repository file belongs to).- Returns:
- The url
-
getWebRepositoryUrlForFileDiff
@Nullable @Nullable String getWebRepositoryUrlForFileDiff(@NotNull @NotNull CommitFile file, @NotNull @NotNull VcsRepositoryData repositoryData) Generate the link to a given file, showing changes in given revision.- Parameters:
file- The file we want to link to.repositoryData- For the build (and hense the repository file belongs to).- Returns:
- The url
-