Package hudson.plugins.git.browser
Class GitRepositoryBrowser
- All Implemented Interfaces:
ExtensionPoint
,Describable<RepositoryBrowser<?>>
,Serializable
- Direct Known Subclasses:
AssemblaWeb
,BitbucketServer
,BitbucketWeb
,CGit
,FisheyeGitRepositoryBrowser
,GitBlitRepositoryBrowser
,GithubWeb
,Gitiles
,GitLab
,GitList
,GitoriousWeb
,GitWeb
,GogsGit
,KilnGit
,Phabricator
,RedmineWeb
,RhodeCode
,Stash
,TFS2013GitRepositoryBrowser
,ViewGitWeb
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Deprecated.protected
GitRepositoryBrowser
(String repourl) -
Method Summary
Modifier and TypeMethodDescriptionstatic URL
getChangeSetLink
(String commitId) Determines the link to the given change set ID (SHA).abstract URL
getDiffLink
(GitChangeSet.Path path) Determines the link to the diff between the version in the specified revision ofGitChangeSet.Path
to its previous version.abstract URL
getFileLink
(GitChangeSet.Path path) Determines the link to a single file under Git.protected int
Calculate the index of the given path in a sorted list of affected filesprotected boolean
Determines whether a URL should be normalized Overridden in the rare case where it shouldn'tfinal String
final URL
getUrl()
protected static boolean
initialChecksAndReturnOk
(Item project, String cleanUrl) protected static boolean
validateUrl
(String url) Methods inherited from class hudson.scm.RepositoryBrowser
all, getChangeSetLink, normalizeToEndWithSlash, trimHeadSlash
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
GitRepositoryBrowser
Deprecated. -
GitRepositoryBrowser
-
-
Method Details
-
getRepoUrl
-
getUrl
- Throws:
IOException
-
getDiffLink
Determines the link to the diff between the version in the specified revision ofGitChangeSet.Path
to its previous version.- Parameters:
path
- affected file path- Returns:
- null if the browser doesn't have any URL for diff.
- Throws:
IOException
- on input or output error
-
getFileLink
Determines the link to a single file under Git. This page should display all the past revisions of this file, etc.- Parameters:
path
- affected file path- Returns:
- null if the browser doesn't have any suitable URL.
- Throws:
IOException
- on input or output errorURISyntaxException
- on URI syntax error
-
getChangeSetLink
Determines the link to the given change set ID (SHA).- Parameters:
commitId
- commit identifier, usually a SHA-1 hash- Returns:
- the URL to the change set or
null
if this repository browser doesn't have any meaningful URL for a change set - Throws:
IOException
-
getNormalizeUrl
protected boolean getNormalizeUrl()Determines whether a URL should be normalized Overridden in the rare case where it shouldn't- Returns:
- True if the URL should be normalized
-
getIndexOfPath
Calculate the index of the given path in a sorted list of affected files- Parameters:
path
- affected file path- Returns:
- The index in the lexicographical sorted filelist
- Throws:
IOException
- on input or output error
-
encodeURL
- Throws:
IOException
-
initialChecksAndReturnOk
-
validateUrl
- Throws:
URISyntaxException
-