Interface VcsRepositoryViewer
-
- All Known Implementing Classes:
BitbucketCloudVcsRepositoryViewer,BitbucketServerVcsRepositoryViewer,FishEyeRepositoryViewer,GenericRepositoryViewer,GitHubVcsRepositoryViewer,LegacyRepositoryViewer
public interface VcsRepositoryViewerProvides links to a remote system based on repository configuration and commit information.- Since:
- 5.14
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @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 repository@NotNull Map<String,String>getWebRepositoryUrlForRevisions(Stream<String> revisionIds, VcsRepositoryData repositoryDefinition)Provide the urls to link all the given commits in the web repository
-
-
-
Method Detail
-
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
-
-