hudson.plugins.git.browser
Class GitWeb

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.scm.RepositoryBrowser<?>>
      extended by hudson.scm.RepositoryBrowser<GitChangeSet>
          extended by hudson.plugins.git.browser.GitRepositoryBrowser
              extended by hudson.plugins.git.browser.GitWeb
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.RepositoryBrowser<?>>, Serializable

public class GitWeb
extends GitRepositoryBrowser

Git Browser URLs

See Also:
Serialized Form

Nested Class Summary
static class GitWeb.GitWebDescriptor
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
GitWeb(String url)
           
 
Method Summary
 URL getChangeSetLink(GitChangeSet changeSet)
           
 URL getDiffLink(GitChangeSet.Path path)
          Creates a link to the file diff.
 URL getFileLink(GitChangeSet.Path path)
          Creates a link to the file.
 URL getUrl()
           
 
Methods inherited from class hudson.scm.RepositoryBrowser
all, normalizeToEndWithSlash, trimHeadSlash
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GitWeb

@DataBoundConstructor
public GitWeb(String url)
       throws MalformedURLException
Throws:
MalformedURLException
Method Detail

getUrl

public URL getUrl()

getChangeSetLink

public URL getChangeSetLink(GitChangeSet changeSet)
                     throws IOException
Specified by:
getChangeSetLink in class hudson.scm.RepositoryBrowser<GitChangeSet>
Throws:
IOException

getDiffLink

public URL getDiffLink(GitChangeSet.Path path)
                throws IOException
Creates a link to the file diff. http://[GitWeb URL]?a=blobdiff;f=[path];fp=[path];h=[dst];hp=[src];hb=[commit];hpb=[parent commit]

Specified by:
getDiffLink in class GitRepositoryBrowser
Parameters:
path - affected file path
Returns:
diff link
Throws:
IOException

getFileLink

public URL getFileLink(GitChangeSet.Path path)
                throws IOException
Creates a link to the file. http://[GitWeb URL]?a=blob;f=[path];h=[dst, or src for deleted files];hb=[commit]

Specified by:
getFileLink in class GitRepositoryBrowser
Parameters:
path - file
Returns:
file link
Throws:
IOException


Copyright © 2004-2011 Hudson. All Rights Reserved.